Skip to content

Commit

Permalink
Put internal methods in separate, embedded interface to make the godo…
Browse files Browse the repository at this point in the history
…c rendering cleaner.
  • Loading branch information
josephburnett committed Jun 26, 2022
1 parent a246ff2 commit e04fb95
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ import (
type JsonNode interface {
Json(metadata ...Metadata) string
Yaml(metadata ...Metadata) string
raw() interface{}
Equals(n JsonNode, metadata ...Metadata) bool
hashCode(metadata []Metadata) [8]byte
Diff(n JsonNode, metadata ...Metadata) Diff
diff(n JsonNode, p path, metadata []Metadata, strategy patchStrategy) Diff
Patch(d Diff) (JsonNode, error)
jsonNodeInternals
}

type jsonNodeInternals interface {
raw() interface{}
hashCode(metadata []Metadata) [8]byte
diff(n JsonNode, p path, metadata []Metadata, strategy patchStrategy) Diff
patch(pathBehind, pathAhead path, oldValues, newValues []JsonNode, strategy patchStrategy) (JsonNode, error)
}

Expand Down

0 comments on commit e04fb95

Please sign in to comment.