var typeToTag … // FormatNonStringStyle makes sure that values which parse as non-string values in yaml 1.1 // are correctly formatted given the Schema type. func FormatNonStringStyle(node *Node, schema spec.Schema) { … } // IsYaml1_1NonString returns true if the value parses as a non-string value in yaml 1.1 // when unquoted. // // Note: yaml 1.2 uses different keywords than yaml 1.1. Example: yaml 1.2 interprets // `field: on` and `field: "on"` as equivalent (both strings). However Yaml 1.1 interprets // `field: on` as on being a bool and `field: "on"` as on being a string. // If an input is read with `field: "on"`, and the style is changed from DoubleQuote to 0, // it will change the type of the field from a string to a bool. For this reason, fields // which are keywords in yaml 1.1 should never have their style changed, as it would break // backwards compatibility with yaml 1.1 -- which is what is used by the Kubernetes apiserver. func IsYaml1_1NonString(node *Node) bool { … } func IsValueNonString(value string) bool { … } var stringType …