pkg/model/resources.go
Function LoadResource
has 62 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func LoadResource(data []byte) (interface{}, error) {
m := make(map[string]interface{})
err := yaml.Unmarshal(data, &m)
if err != nil {
return nil, fmt.Errorf("%w: %w", ErrNotDirektivAPIResource, err)
Function LoadResource
has 13 return statements (exceeds 4 allowed). Open
Open
func LoadResource(data []byte) (interface{}, error) {
m := make(map[string]interface{})
err := yaml.Unmarshal(data, &m)
if err != nil {
return nil, fmt.Errorf("%w: %w", ErrNotDirektivAPIResource, err)