Skip to content

Commit

Permalink
apiviewgo supports tree tokens (#9409)
Browse files Browse the repository at this point in the history
  • Loading branch information
chlowell authored Dec 6, 2024
1 parent 813a920 commit e199ffa
Show file tree
Hide file tree
Showing 25 changed files with 3,957 additions and 2,059 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class GoLanguageService : LanguageProcessor
public override string Name { get; } = "Go";
public override string [] Extensions { get; } = { ".gosource" };
public override string ProcessName { get; } = "apiviewgo";
public override string VersionString { get; } = "2";
public override string VersionString { get; } = "0.1";

public GoLanguageService(TelemetryClient telemetryClient) : base(telemetryClient)
{
Expand Down
8 changes: 4 additions & 4 deletions src/go/cmd/api_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ func CreateAPIView(pkgDir, outputDir string) error {
return nil
}

func createReview(pkgDir string) (PackageReview, error) {
func createReview(pkgDir string) (CodeFile, error) {
r, err := NewReview(pkgDir)
if err != nil {
return PackageReview{}, err
return CodeFile{}, err
}
return r.Review()
}

func recursiveSortNavigation(n Navigation) {
func recursiveSortNavigation(n NavigationItem) {
for _, nn := range n.ChildItems {
recursiveSortNavigation(nn)
}
slices.SortFunc(n.ChildItems, func(a Navigation, b Navigation) int {
slices.SortFunc(n.ChildItems, func(a NavigationItem, b NavigationItem) int {
aa, err := json.Marshal(a)
if err != nil {
panic(err)
Expand Down
Loading

0 comments on commit e199ffa

Please sign in to comment.