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

@@ -79,35 +79,3 @@ func (t Time) MarshalJSON() ([]byte, error) {
return json.Marshal(t.Format(time.RFC3339))
}
// SetYAML implements the yaml.Setter interface.
func (t *Time) SetYAML(tag string, value interface{}) bool {
if value == nil {
t.Time = time.Time{}
return true
}
str, ok := value.(string)
if !ok {
return false
}
pt, err := time.Parse(time.RFC3339, str)
if err != nil {
return false
}
t.Time = pt
return true
}
// GetYAML implements the yaml.Getter interface.
func (t Time) GetYAML() (tag string, value interface{}) {
if t.IsZero() {
value = "null"
return
}
value = t.Format(time.RFC3339)
return tag, value
}