From 8c9acde1073b1b17aae323f3808a843e8d593e7d Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 22 Oct 2025 09:19:08 -0500 Subject: step1 --- argv.template.go | 3 ++- placement.config.go | 4 ++-- placement.proto | 4 ++-- 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() } -- cgit v1.2.3