go-common/app/tool/bgr/model.go

25 lines
394 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
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)
}