Skip to content

Commit 98a788b

Browse files
author
Antoine Pelisse
committed
Remove unused New empty typed value
1 parent 2faa01f commit 98a788b

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

internal/fixture/state.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func FixTabsOrDie(in typed.YAMLObject) typed.YAMLObject {
8787

8888
func (s *State) checkInit() error {
8989
if s.Live == nil {
90-
obj, err := s.Parser.New()
90+
obj, err := s.Parser.FromYAML("{}")
9191
if err != nil {
9292
return fmt.Errorf("failed to create new empty object: %v", err)
9393
}

typed/parser.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,6 @@ func (p *ParseableType) IsValid() bool {
8787
return ok
8888
}
8989

90-
// New returns a new empty object with the current schema and the
91-
// type "typename".
92-
func (p *ParseableType) New() (TypedValue, error) {
93-
return p.FromYAML(YAMLObject("{}"))
94-
}
95-
9690
// FromYAML parses a yaml string into an object with the current schema
9791
// and the type "typename" or an error if validation fails.
9892
func (p *ParseableType) FromYAML(object YAMLObject) (TypedValue, error) {

0 commit comments

Comments
 (0)