diff options
Diffstat (limited to 'generate.go')
| -rw-r--r-- | generate.go | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/generate.go b/generate.go index 3dc70c7..43e5092 100644 --- a/generate.go +++ b/generate.go @@ -193,34 +193,6 @@ func (pb *Files) makeNewSortfile(pf *File) error { */ } - // make delete() - /* - for _, msg := range pf.allMsg() { - PARENT := msg.Name - - for _, v := range msg.Vars { - if !v.HasUnique { - continue - } - funcname := "func (x *" + PARENT + ") Delete" + msg.Name + "By" + v.VarName + "(" + v.VarType + ") bool" - log.Printf(" %-2s %20s %20s %20s %s %s\n", "", "", "", "", "", funcname) - FRUIT := PARENT - APPLES := msg.Name - APPLE := msg.VarName - COLOR := v.VarName - FUNCNAME := "Delete" + msg.Name + "By" + v.VarName - - var funcdef string - if argv.Delete { - funcdef = msg.deleteByWithCopy(wSort, FRUIT, APPLES, APPLE, COLOR, FUNCNAME) - } else { - funcdef = msg.deleteBy(wSort, FRUIT, APPLES, APPLE, COLOR, FUNCNAME) - } - log.Printf(" %-2s %20s %20s %20s %s %s\n", "", "", "", "done", "", funcdef) - } - } - */ - // add Find() Delete() Append() Insert() log.Printf(" %-2s %20s %20s %20s %20s\n", "", "PARENT STRUCT", "VAR STRUCT TYPE", "VAR NAME", "LOCK") for i, s := range pf.ToSort { @@ -295,7 +267,7 @@ func (pb *Files) makeNewSortfile(pf *File) error { log.Printf(" %-2s %20s %20s %20s %s %s\n", "", "", "", "done", "", funcdef) } - // AppendBy() functions. these maybe need to be rethought + // AppendBy() functions. todo: fix these so Append() is for simple things and Insert() is for unique keys var ucount int for _, v := range msg.Vars { if v.IsRepeated { @@ -316,6 +288,7 @@ func (pb *Files) makeNewSortfile(pf *File) error { } } + // TODO: do this next // x *Repos) InsertPath( string) *Repo // returns existing record or new record if path != exists if ucount == 1 { for _, v := range msg.Vars { if !v.HasUnique { @@ -329,7 +302,6 @@ func (pb *Files) makeNewSortfile(pf *File) error { funcname = "func (x *" + PARENT + ") Insert(a *" + CHILD + ") (*" + CHILD + ", isNew bool) // todo" log.Printf(" %-2s %20s %20s %20s %s %s\n", "", "", "", "", "", funcname) } - } return nil } |
