Remove unused YAML tags and GetYAML/SetYAML methods

Unneeded after move to ghodss/yaml.
This commit is contained in:
Sam Ghods
2014-11-30 21:31:52 -08:00
parent 1208946f55
commit 6399854240
34 changed files with 980 additions and 1069 deletions

View File

@@ -88,34 +88,6 @@ func NewIntOrStringFromString(val string) IntOrString {
return IntOrString{Kind: IntstrString, StrVal: val}
}
// SetYAML implements the yaml.Setter interface.
func (intstr *IntOrString) SetYAML(tag string, value interface{}) bool {
switch v := value.(type) {
case int:
intstr.Kind = IntstrInt
intstr.IntVal = v
return true
case string:
intstr.Kind = IntstrString
intstr.StrVal = v
return true
}
return false
}
// GetYAML implements the yaml.Getter interface.
func (intstr IntOrString) GetYAML() (tag string, value interface{}) {
switch intstr.Kind {
case IntstrInt:
value = intstr.IntVal
case IntstrString:
value = intstr.StrVal
default:
panic("impossible IntOrString.Kind")
}
return
}
// UnmarshalJSON implements the json.Unmarshaller interface.
func (intstr *IntOrString) UnmarshalJSON(value []byte) error {
if value[0] == '"' {