go-graphite / go-carbon

Usage of both value and pointer receivers GO-W1029
Anti-pattern
Major
4 occurrences in this check
Type "gdstate" has both value and pointer receivers
  99	return toStr(g)
 100}
 101
 102func (g gdstate) String() string { 103	var r []string
 104	for _, s := range g.gstates {
 105		r = append(r, s.String())
Type "gdstate" has both value and pointer receivers
 107	return strings.Join(r, ",")
 108}
 109
 110func (g *gdstate) step(c byte) *gdstate { 111	// if g.next[c] != nil {
 112	// 	g.cacheHit++
 113	// 	return g.next[c]
Type "gdstate" has both value and pointer receivers
 125	return &ng
 126}
 127
 128func (g *gdstate) add(list []*gstate, s *gstate) []*gstate { 129	if s.c[gstateSplit] {
 130		for _, ns := range s.next {
 131			list = g.add(list, ns)
Type "gdstate" has both value and pointer receivers
 138	return list
 139}
 140
 141func (g *gdstate) matched() bool { 142	for _, s := range g.gstates {
 143		if s == endGstate {
 144			return true