func NormalizeYAMLForGoJQ(v interface{}) interface{} {
	switch v := v.(type) {
	case map[interface{}]interface{}:
		w := make(map[string]interface{}, len(v))
		for k, v := range v {
			w[fmt.Sprint(k)] = NormalizeYAMLForGoJQ(v)
		}
		return w

	case map[string]interface{}:
		w := make(map[string]interface{}, len(v))
		for k, v := range v {
			w[k] = NormalizeYAMLForGoJQ(v)
		}
		return w

	case []interface{}:
		for i, w := range v {
			v[i] = NormalizeYAMLForGoJQ(w)
		}
		return v

	// go-yaml unmarshals timestamp string to time.Time but gojq cannot handle it.
	// It is impossible to keep the original timestamp strings.
	case time.Time:
		return v.Format(time.RFC3339)

	default:
		return v
	}
}
// NormalizeYAMLForGoJQ normalizes output from YAML parsing to be gojq compatible
NormalizeYAMLForGoJQ normalizes output from YAML parsing to be gojq compatible
// NormalizeYAMLForGoJQ normalizes output from YAML parsing to be gojq compatible
func NormalizeYAMLForGoJQ(v interface{}) interface{} {
	switch v := v.(type) {
	case map[interface{}]interface{}:
		w := make(map[string]interface{}, len(v))
		for k, v := range v {
			w[fmt.Sprint(k)] = NormalizeYAMLForGoJQ(v)
		}
		return w
	case map[string]interface{}:
		w := make(map[string]interface{}, len(v))
		for k, v := range v {
			w[k] = NormalizeYAMLForGoJQ(v)
		}
		return w
	case []interface{}:
		for i, w := range v {
			v[i] = NormalizeYAMLForGoJQ(w)
		}
		return v
	case time.Time:
		return v.Format(time.RFC3339)
	default:
		return v
	}
}
func NormalizeYAMLForGoJQ ( v interface { } ) interface { } { switch v := v . ( type ) { case map [ interface { } ] interface { } : w := make ( map [ string ] interface { } , len ( v ) ) for k , v := range v { w [ fmt . Sprint ( k ) ] = NormalizeYAMLForGoJQ ( v ) } return w case map [ string ] interface { } : w := make ( map [ string ] interface { } , len ( v ) ) for k , v := range v { w [ k ] = NormalizeYAMLForGoJQ ( v ) } return w case [ ] interface { } : for i , w := range v { v [ i ] = NormalizeYAMLForGoJQ ( w ) } return v case time . Time : return v . Format ( time . RFC3339 ) default : return v } }
NormalizeYAMLForGoJQ normalizes output from YAML parsing to be gojq compatible
NormalizeYAMLForGoJQ normalizes output from YAML parsing to be gojq compatible
// go-yaml unmarshals timestamp string to time.Time but gojq cannot handle it. // It is impossible to keep the original timestamp strings.