Skip to content

Commit 821eea9

Browse files
author
Kevin Wiesmueller
committed
move parseConfig method
1 parent 6050e29 commit 821eea9

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
@@ -183,6 +183,10 @@ func (s *State) CompareLive(obj typed.YAMLObject, version fieldpath.APIVersion)
183183
return live.Compare(tv)
184184
}
185185

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

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

0 commit comments

Comments
 (0)