fix golint issues (#450)
This commit is contained in:
@@ -107,7 +107,7 @@ func createWith(dir string, api *spec.ApiSpec, route spec.Route, packetName stri
|
||||
}
|
||||
|
||||
_, err = fp.WriteString(formatSource(tmplBytes.String()))
|
||||
return nil
|
||||
return err
|
||||
}
|
||||
|
||||
func doc(route spec.Route) string {
|
||||
|
||||
@@ -334,13 +334,13 @@ func TestTypeBlock(t *testing.T) {
|
||||
return p.TypeBlock().Accept(visitor)
|
||||
}
|
||||
t.Run("normal", func(t *testing.T) {
|
||||
v, err := parser.Accept(fn, `type(
|
||||
_, err := parser.Accept(fn, `type(
|
||||
// doc
|
||||
Foo int
|
||||
)`)
|
||||
assert.Error(t, err)
|
||||
|
||||
v, err = parser.Accept(fn, `type (
|
||||
v, err := parser.Accept(fn, `type (
|
||||
// doc
|
||||
Foo {
|
||||
Bar int
|
||||
|
||||
@@ -49,7 +49,7 @@ func ToMap(in interface{}) map[string]interface{} {
|
||||
return out
|
||||
}
|
||||
|
||||
// deprecated: use RawFieldNames instead automaticly while model generating after goctl version v1.1.0
|
||||
// deprecated: use RawFieldNames instead automatically while model generating after goctl version v1.1.0
|
||||
func FieldNames(in interface{}) []string {
|
||||
out := make([]string, 0)
|
||||
v := reflect.ValueOf(in)
|
||||
|
||||
Reference in New Issue
Block a user