summaryrefslogtreecommitdiff
path: root/generate.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-12 06:13:42 -0600
committerJeff Carr <[email protected]>2025-01-12 06:13:42 -0600
commit08cd2afd86557f06d6b3f6e006d686fef4c7b2ee (patch)
tree5bff830418741290f2e13502e8137fb877a01999 /generate.go
parent5b4491f17ba4325ab9783374d4efa7e4aa652a9f (diff)
adding help
Diffstat (limited to 'generate.go')
-rw-r--r--generate.go32
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
}