- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for UnmarshalYAML (0.37 sec)
-
cmd/batch-job-common-types.go
line, col int Key string `yaml:"key" json:"key"` Value string `yaml:"value" json:"value"` } var _ yaml.Unmarshaler = &BatchJobKV{} // UnmarshalYAML - BatchJobKV extends default unmarshal to extract line, col information. func (kv *BatchJobKV) UnmarshalYAML(val *yaml.Node) error { type jobKV BatchJobKV var tmp jobKV err := val.Decode(&tmp) if err != nil { return err } *kv = BatchJobKV(tmp)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Jun 11 03:13:30 UTC 2024 - 7.9K bytes - Viewed (0) -
operator/pkg/version/version.go
func (v *Version) String() string { if v.Suffix == "" { return v.PatchVersion.String() } return fmt.Sprintf("%s-%s", v.PatchVersion, v.Suffix) } // UnmarshalYAML implements the Unmarshaler interface. func (v *Version) UnmarshalYAML(unmarshal func(any) error) error { s := "" if err := unmarshal(&s); err != nil { return err } out, err := NewVersionFromString(s) if err != nil { return err
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Aug 29 14:15:26 UTC 2023 - 4.4K bytes - Viewed (0) -
cmd/batch-expire.go
line, col int RetainVersions int `yaml:"retainVersions" json:"retainVersions"` } var _ yaml.Unmarshaler = &BatchJobExpirePurge{} // UnmarshalYAML - BatchJobExpirePurge extends unmarshal to extract line, col func (p *BatchJobExpirePurge) UnmarshalYAML(val *yaml.Node) error { type purge BatchJobExpirePurge var tmp purge err := val.Decode(&tmp) if err != nil { return err }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Jun 11 13:50:53 UTC 2024 - 21.1K bytes - Viewed (0) -
operator/pkg/version/version_test.go
} }) } } func TestUnmarshalYAML(t *testing.T) { v := &Version{} expectedErr := fmt.Errorf("test error") errReturn := func(any) error { return expectedErr } gotErr := v.UnmarshalYAML(errReturn) if gotErr == nil { t.Errorf("expected error but got nil") } if gotErr != expectedErr { t.Errorf("error mismatch") }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jul 25 19:30:47 UTC 2022 - 6.1K bytes - Viewed (0)