You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
394 B
24 lines
394 B
package main |
|
|
|
import ( |
|
"fmt" |
|
"go/ast" |
|
"strings" |
|
) |
|
|
|
type lint struct { |
|
s *script |
|
fn func(curDir string, f *ast.File, node ast.Node) bool |
|
} |
|
|
|
type script struct { |
|
dir string |
|
ts []string // type slice |
|
v string |
|
l string |
|
d string |
|
} |
|
|
|
func (s script) String() string { |
|
return fmt.Sprintf("script path: %s, type: %s, value: %s, level: %s", s.dir, strings.Join(s.ts, "."), s.v, s.l) |
|
}
|
|
|