diff --git a/cmd/gin-kit/main.go b/cmd/gin-kit/main.go index 6ed6a1e..f0fb73c 100644 --- a/cmd/gin-kit/main.go +++ b/cmd/gin-kit/main.go @@ -1,7 +1,6 @@ package main import ( - "flag" "fmt" protogen2 "git.diulo.com/mogfee/kit/protogen" "google.golang.org/protobuf/compiler/protogen" @@ -10,17 +9,14 @@ import ( ) func main() { - var httpPrefix = flag.String("prefix", "", "http prefix") u := &Kit{ imports: map[string]string{}, - prefix: *httpPrefix, } protogen.Options{}.Run(u.Generate) } type Kit struct { imports map[string]string - prefix string } func (u *Kit) addImports(imp string) { @@ -65,10 +61,6 @@ func (u *Kit) Generate(plugin *protogen.Plugin) error { if method == "" { continue } - if u.prefix != "" { - path = u.prefix + path - } - t.P(`app.`, method, `("`, path, `",http`, m.GoName, `Handler(srv,m...))`) } t.P(`}`)