Skip to content

Commit

Permalink
C-tags: use type def instead of type alias
Browse files Browse the repository at this point in the history
  • Loading branch information
jtibshirani committed Oct 23, 2023
1 parent 0a17ccb commit f1a2af4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cmd/zoekt-sourcegraph-indexserver/sg.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/go-git/go-git/v5"
retryablehttp "github.com/hashicorp/go-retryablehttp"
proto "github.com/sourcegraph/zoekt/cmd/zoekt-sourcegraph-indexserver/protos/sourcegraph/zoekt/configuration/v1"
"github.com/sourcegraph/zoekt/ctags"
"golang.org/x/net/trace"
"google.golang.org/grpc"

Expand Down Expand Up @@ -455,10 +456,10 @@ func (o *indexOptionsItem) FromProto(x *proto.ZoektIndexOptions) {
}

item := indexOptionsItem{}
languageMap := make(map[string]uint8)
languageMap := make(map[string]ctags.CTagsParserType)

for _, lang := range x.GetLanguageMap() {
languageMap[lang.GetLanguage()] = uint8(lang.GetCtags().Number())
languageMap[lang.GetLanguage()] = ctags.CTagsParserType(lang.GetCtags().Number())
}

item.IndexOptions = IndexOptions{
Expand Down
2 changes: 1 addition & 1 deletion ctags/parser_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
)

type CTagsParserType = uint8
type CTagsParserType uint8

const (
UnknownCTags CTagsParserType = iota
Expand Down

0 comments on commit f1a2af4

Please sign in to comment.