summaryrefslogtreecommitdiff
path: root/loadByAppname.go
diff options
context:
space:
mode:
Diffstat (limited to 'loadByAppname.go')
-rw-r--r--loadByAppname.go41
1 files changed, 1 insertions, 40 deletions
diff --git a/loadByAppname.go b/loadByAppname.go
index 28f7fee..42a44a9 100644
--- a/loadByAppname.go
+++ b/loadByAppname.go
@@ -23,7 +23,7 @@ func LoadAppnameCache(pb proto.Message, appname string) error {
return err
}
if curfilename == "" {
- log.Printf("ConfigLoad() reading in %s\n", fullname)
+ // log.Printf("ConfigLoad() read in %s\n", fullname)
}
err = loadPB(pb, fullname)
@@ -43,42 +43,3 @@ func LoadAppnameCache(pb proto.Message, appname string) error {
}
return nil
}
-
-/*
-// deprecate
-func LoadByAppname(pb proto.Message, appname string) error {
- protoname, err := GetProtobufName(pb) // defined in the foo.proto file
- if err != nil {
- return err
- }
-
- // Get ~/.cache/appname/protoname.text
- fullname := makeCacheFilename(appname, protoname)
-
- // get the current filename in the protobuf file
- curfilename, err := GetFilename(pb)
- if err != nil {
- return err
- }
- if curfilename == "" {
- log.Printf("ConfigLoad() reading in %s\n", fullname)
- }
-
- err = loadPB(pb, fullname)
- if err != nil {
- return ErrMarshal
- }
-
- // If the cache file is new or has moved, this updates it to correct filename
- // (the filename is what is used by pb.Save()
- if curfilename != fullname {
- _, err := SetFilename(pb, fullname)
- if err != nil {
- log.Info("FILENAME COULD NOT BE SET old=", curfilename)
- log.Info("FILENAME COULD NOT BE SET new=", fullname)
- return errors.Join(err, errors.New("something is wrong in lib/config"))
- }
- }
- return nil
-}
-*/