VarKind rename

This commit is contained in:
Ivan Daniluk 2015-05-02 20:12:53 +03:00
parent ce7ce63f13
commit bbb021723c
1 changed files with 3 additions and 3 deletions

6
var.go
View File

@ -10,10 +10,10 @@ import "strings"
// It also can have optional "kind:" modifier, like "mem:" or "duration:"
type VarName string
type varKind int
type VarKind int
const (
KindDefault varKind = iota
KindDefault VarKind = iota
KindMemory
KindDuration
)
@ -51,7 +51,7 @@ func (v VarName) Long() string {
return string(v)[start:]
}
func (v VarName) Kind() varKind {
func (v VarName) Kind() VarKind {
start := strings.IndexRune(string(v), ':')
if start == -1 {
return KindDefault