Fix cluster of silly Go nits.

This commit is contained in:
Jeffrey Regan
2018-07-18 17:27:20 -07:00
parent 5edae84a9e
commit 564b0d6827
29 changed files with 131 additions and 178 deletions

View File

@@ -20,7 +20,7 @@ package error
import (
"fmt"
yaml "k8s.io/apimachinery/pkg/util/yaml"
"k8s.io/apimachinery/pkg/util/yaml"
)
// YamlFormatError represents error with yaml file name where json/yaml format error happens.
@@ -33,8 +33,8 @@ func (e YamlFormatError) Error() string {
return fmt.Sprintf("YAML file [%s] encounters a format error.\n%s\n", e.Path, e.ErrorMsg)
}
// ErrorHandler handles YamlFormatError
func ErrorHandler(e error, path string) error {
// Handler handles YamlFormatError
func Handler(e error, path string) error {
if err, ok := e.(yaml.YAMLSyntaxError); ok {
return YamlFormatError{
Path: path,