Skip to content

Commit b390162

Browse files
committed
Fix golint suggestions
1 parent 5d82a89 commit b390162

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

main.go

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ import (
1010
"strings"
1111
)
1212

13+
// Contants used for the meta tags
1314
const (
14-
VERSION = "1.2.0"
15-
NAME = "gotags"
16-
URL = "https://github.com/jstemmer/gotags"
17-
AUTHOR_NAME = "Joel Stemmer"
18-
AUTHOR_EMAIL = "[email protected]"
15+
Version = "1.2.0"
16+
Name = "gotags"
17+
URL = "https://github.com/jstemmer/gotags"
18+
AuthorName = "Joel Stemmer"
19+
AuthorEmail = "[email protected]"
1920
)
2021

2122
var (
@@ -37,7 +38,7 @@ func init() {
3738
flag.BoolVar(&printTree, "tree", false, "print syntax tree (debugging)")
3839

3940
flag.Usage = func() {
40-
fmt.Fprintf(os.Stderr, "gotags version %s\n\n", VERSION)
41+
fmt.Fprintf(os.Stderr, "gotags version %s\n\n", Version)
4142
fmt.Fprintf(os.Stderr, "Usage: %s [options] file(s)\n\n", os.Args[0])
4243
flag.PrintDefaults()
4344
}
@@ -124,7 +125,7 @@ func main() {
124125
flag.Parse()
125126

126127
if printVersion {
127-
fmt.Printf("gotags version %s\n", VERSION)
128+
fmt.Printf("gotags version %s\n", Version)
128129
return
129130
}
130131

@@ -181,9 +182,9 @@ func createMetaTags() []string {
181182
return []string{
182183
"!_TAG_FILE_FORMAT\t2",
183184
fmt.Sprintf("!_TAG_FILE_SORTED\t%d\t/0=unsorted, 1=sorted/", sorted),
184-
fmt.Sprintf("!_TAG_PROGRAM_AUTHOR\t%s\t/%s/", AUTHOR_NAME, AUTHOR_EMAIL),
185-
fmt.Sprintf("!_TAG_PROGRAM_NAME\t%s", NAME),
185+
fmt.Sprintf("!_TAG_PROGRAM_AUTHOR\t%s\t/%s/", AuthorName, AuthorEmail),
186+
fmt.Sprintf("!_TAG_PROGRAM_NAME\t%s", Name),
186187
fmt.Sprintf("!_TAG_PROGRAM_URL\t%s", URL),
187-
fmt.Sprintf("!_TAG_PROGRAM_VERSION\t%s", VERSION),
188+
fmt.Sprintf("!_TAG_PROGRAM_VERSION\t%s", Version),
188189
}
189190
}

tag.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ type Tag struct {
1717
Fields map[TagField]string
1818
}
1919

20+
// TagField represents a single field in a tag line.
2021
type TagField string
2122

23+
// Tag fields.
2224
const (
23-
// Tag fields
2425
Access TagField = "access"
2526
Signature TagField = "signature"
2627
TypeField TagField = "type"
@@ -29,10 +30,11 @@ const (
2930
InterfaceType TagField = "ntype"
3031
)
3132

33+
// TagType represents the type of a tag in a tag line.
3234
type TagType string
3335

36+
// Tag types.
3437
const (
35-
// Tag types
3638
Package TagType = "p"
3739
Import TagType = "i"
3840
Constant TagType = "c"

0 commit comments

Comments
 (0)