summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-22 09:19:08 -0500
committerJeff Carr <[email protected]>2025-10-22 09:19:08 -0500
commit8c9acde1073b1b17aae323f3808a843e8d593e7d (patch)
tree1cafb2754e336d69155ea7ba4b24b49849f7933b
parentce698610b7617bf44f3c639676511c4eb7590000 (diff)
step1
-rw-r--r--argv.template.go3
-rw-r--r--placement.config.go4
-rw-r--r--placement.proto4
3 files changed, 6 insertions, 5 deletions
diff --git a/argv.template.go b/argv.template.go
index e7a9948..1808722 100644
--- a/argv.template.go
+++ b/argv.template.go
@@ -10,6 +10,7 @@ import (
"go.wit.com/dev/alexflint/arg"
"go.wit.com/gui"
+ "go.wit.com/lib/ENV"
"go.wit.com/lib/fhelp"
"go.wit.com/log"
)
@@ -63,7 +64,7 @@ func (args) InitGui() error {
func (args) Exit() {
gui.UnloadToolkits()
- if me.argv.Verbose() {
+ if ENV.Verbose() {
log.Info("argv.Exit() called", APPNAME+".Exit()")
}
// remove this from the template for your app (or make one for youself if you need it)
diff --git a/placement.config.go b/placement.config.go
index 4ceba86..2007a19 100644
--- a/placement.config.go
+++ b/placement.config.go
@@ -8,9 +8,9 @@ import (
)
func (pb *Placements) ConfigSave() error {
- return config.ConfigSave(pb)
+ return pb.Save()
}
func (pb *Placements) ConfigLoad() error {
- return config.ConfigLoad(pb, APPNAME, "placements")
+ return config.ConfigLoad(pb)
}
diff --git a/placement.proto b/placement.proto
index a28c819..34d0923 100644
--- a/placement.proto
+++ b/placement.proto
@@ -23,9 +23,9 @@ message Placement {
repeated string argv = 5; // argv. argv[0] should be the executable name
string namespace = 6; // namespace of the executable (go.wit.com/apps/forge)
}
-message Placements { // `autogenpb:marshal` `autogenpb:mutex`
+message Placements { // `autogenpb:marshal` `autogenpb:mutex` `autogenpb:sort`
string uuid = 1; // `autogenpb:uuid:31769bcb-5865-4926-b7d6-501083312eea`
string version = 2; // `autogenpb:version:v0.0.1`
repeated Placement Placement = 3;
- string filename = 4; // used by the config save function
+ string filename = 4; // `autogenpb:save` -- this enables autogenerated pb.Load() and pb.Save()
}