mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 02:09:56 +00:00
add source filename in error message
This commit is contained in:
parent
13ae40681a
commit
6b79dcaa4d
@ -39,7 +39,7 @@ type Mapper struct {
|
|||||||
func (m *Mapper) InfoForData(data []byte, source string) (*Info, error) {
|
func (m *Mapper) InfoForData(data []byte, source string) (*Info, error) {
|
||||||
json, err := yaml.ToJSON(data)
|
json, err := yaml.ToJSON(data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("unable to parse %q: %v", err)
|
return nil, fmt.Errorf("unable to parse %q: %v", source, err)
|
||||||
}
|
}
|
||||||
data = json
|
data = json
|
||||||
version, kind, err := m.DataVersionAndKind(data)
|
version, kind, err := m.DataVersionAndKind(data)
|
||||||
|
Loading…
Reference in New Issue
Block a user