mirror of
https://github.com/rancher/norman.git
synced 2025-09-25 06:26:50 +00:00
Fix golangci-lint issues
As part of updating dapper files, golangci-lint was set to be used. This caused a lot of lint issues to crop up, which this fixes.
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
commenter = regexp.MustCompile("(?m)^( *)zzz#\\((.*)\\)\\((.*)\\)([a-z]+.*):(.*)")
|
||||
commenter = regexp.MustCompile(`(?m)^( *)zzz#\\((.*)\\)\\((.*)\\)([a-z]+.*):(.*)`)
|
||||
)
|
||||
|
||||
func JSONEncoder(writer io.Writer, v interface{}) error {
|
||||
|
@@ -43,6 +43,9 @@ func (m Move) ModifySchema(s *types.Schema, schemas *types.Schemas) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !ok {
|
||||
return fmt.Errorf("failed to find field %s on schema %s", m.To, s.ID)
|
||||
}
|
||||
_, ok = toSchema.ResourceFields[toFieldName]
|
||||
if ok && !strings.Contains(m.To, "/") && !m.DestDefined {
|
||||
return fmt.Errorf("field %s already exists on schema %s", m.To, s.ID)
|
||||
|
Reference in New Issue
Block a user