Skip to content

Commit 0548f89

Browse files
author
Kevin Wiesmueller
committed
move parseConfig method
1 parent f933328 commit 0548f89

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/fixture/state.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ func (s *State) CompareLive(obj typed.YAMLObject, version fieldpath.APIVersion)
184184
return live.Compare(tv)
185185
}
186186

187+
func (s *State) parseConfig(apiVersion fieldpath.APIVersion, obj typed.YAMLObject) (*typed.TypedValue, error) {
188+
return s.Parser.Type(string(apiVersion)).FromYAML(FixTabsOrDie(obj))
189+
}
190+
187191
// dummyConverter doesn't convert, it just returns the same exact object, as long as a version is provided.
188192
type dummyConverter struct{}
189193

@@ -546,7 +550,3 @@ func (op ExpectState) run(state *State) error {
546550
func (op ExpectState) preprocess(parser Parser) (Operation, error) {
547551
return op, nil
548552
}
549-
550-
func (s *State) parseConfig(apiVersion fieldpath.APIVersion, obj typed.YAMLObject) (*typed.TypedValue, error) {
551-
return s.Parser.Type(string(apiVersion)).FromYAML(FixTabsOrDie(obj))
552-
}

0 commit comments

Comments
 (0)