Skip to content

Commit

Permalink
Add field tags for yaml parsing of yamlpatch.Operation (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Mar 29, 2024
1 parent db085ec commit 933b548
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions yamlpatch/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ type Patch []Operation

// Operation represents a RFC6902 JSON Patch operation.
type Operation struct {
Type string `json:"op"`
Path Path `json:"path"`
From Path `json:"from,omitempty"`
Value interface{} `json:"value,omitempty"`
Type string `json:"op" yaml:"op"`
Path Path `json:"path" yaml:"path"`
From Path `json:"from,omitempty" yaml:"from,omitempty"`
Value interface{} `json:"value,omitempty" yaml:"value,omitempty"`
}

func (op Operation) String() string {
Expand Down

0 comments on commit 933b548

Please sign in to comment.