Skip to content

Commit

Permalink
C-tags: use type def instead of type alias (#672)
Browse files Browse the repository at this point in the history
Tiny change to use a type def, as we usually prefer those over type aliases.
  • Loading branch information
jtibshirani authored Oct 24, 2023
1 parent d4ba942 commit 0f21f32
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 0f21f32

Please sign in to comment.