diff options
author | NeonXP <i@neonxp.dev> | 2023-01-04 18:44:58 +0300 |
---|---|---|
committer | NeonXP <i@neonxp.dev> | 2023-01-04 18:44:58 +0300 |
commit | 8716ac3e650075525cab7fb5caf1aa62b3efe55b (patch) | |
tree | f34dcb33400ef6bfd7f01b55a04f59784505c506 /internal/model/mutations.go | |
parent | e91712e388c530dd5bdfb46f028157a62a60b1e3 (diff) |
Diffstat (limited to 'internal/model/mutations.go')
-rw-r--r-- | internal/model/mutations.go | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/internal/model/mutations.go b/internal/model/mutations.go deleted file mode 100644 index 6463823..0000000 --- a/internal/model/mutations.go +++ /dev/null @@ -1,36 +0,0 @@ -package model - -import ( - "fmt" - "strings" - "time" - - "go.neonxp.dev/json/model" -) - -type Mutation struct { - Date time.Time - Type CommandType - Path []string - Body model.Node -} - -func (m *Mutation) String() string { - body, _ := m.Body.MarshalJSON() - return fmt.Sprintf( - "Date=%s Type=%s Path='%s' Body=%s", - m.Date.Format(time.RFC3339), - m.Type, - strings.Join(m.Path, "/"), - string(body), - ) -} - -//go:generate stringer -type=CommandType -type CommandType int - -const ( - Create CommandType = iota - Merge - Remove -) |