chore(cmd/joj3): remove redundant return value
Some checks failed
build / build (push) Failing after 0s
build / trigger-build-image (push) Has been skipped
submodules sync / sync (push) Failing after 0s

This commit is contained in:
张泊明518370910136 2025-01-29 08:39:30 -05:00
parent b61e2e8464
commit 41734ef5d5
GPG Key ID: D47306D7062CDA9D
3 changed files with 4 additions and 5 deletions

View File

@ -90,12 +90,12 @@ func mainImpl() (err error) {
return err
}
slog.Info("try to load conf", "path", confPath)
confObj, confName, err := conf.ParseConfFile(confPath)
confObj, err = conf.ParseConfFile(confPath)
if err != nil {
slog.Error("parse conf", "error", err)
return err
}
env.Attr.ConfName = confName
env.Attr.ConfName = confObj.Name
slog.Debug("conf loaded", "conf", confObj)
if err := setupSlog(confObj); err != nil { // after conf is loaded
slog.Error("setup slog", "error", err)

View File

@ -84,7 +84,7 @@ func prepareTeapotCheck() (
slog.Error("parse commit msg", "error", err)
return
}
confObj, _, err = conf.ParseConfFile(confPath)
confObj, err = conf.ParseConfFile(confPath)
if err != nil {
slog.Error("parse conf", "error", err)
return

View File

@ -51,7 +51,7 @@ func ParseConventionalCommit(commit string) (*ConventionalCommit, error) {
return cc, nil
}
func ParseConfFile(path string) (conf *Conf, name string, err error) {
func ParseConfFile(path string) (conf *Conf, err error) {
conf = new(Conf)
d := &multiconfig.DefaultLoader{}
d.Loader = multiconfig.MultiLoader(
@ -67,7 +67,6 @@ func ParseConfFile(path string) (conf *Conf, name string, err error) {
slog.Error("validate stages conf", "error", err)
return
}
name = conf.Name
return
}