chore(cmd/joj3): remove redundant return value
This commit is contained in:
parent
b61e2e8464
commit
41734ef5d5
|
@ -90,12 +90,12 @@ func mainImpl() (err error) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
slog.Info("try to load conf", "path", confPath)
|
slog.Info("try to load conf", "path", confPath)
|
||||||
confObj, confName, err := conf.ParseConfFile(confPath)
|
confObj, err = conf.ParseConfFile(confPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error("parse conf", "error", err)
|
slog.Error("parse conf", "error", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
env.Attr.ConfName = confName
|
env.Attr.ConfName = confObj.Name
|
||||||
slog.Debug("conf loaded", "conf", confObj)
|
slog.Debug("conf loaded", "conf", confObj)
|
||||||
if err := setupSlog(confObj); err != nil { // after conf is loaded
|
if err := setupSlog(confObj); err != nil { // after conf is loaded
|
||||||
slog.Error("setup slog", "error", err)
|
slog.Error("setup slog", "error", err)
|
||||||
|
|
|
@ -84,7 +84,7 @@ func prepareTeapotCheck() (
|
||||||
slog.Error("parse commit msg", "error", err)
|
slog.Error("parse commit msg", "error", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
confObj, _, err = conf.ParseConfFile(confPath)
|
confObj, err = conf.ParseConfFile(confPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error("parse conf", "error", err)
|
slog.Error("parse conf", "error", err)
|
||||||
return
|
return
|
||||||
|
|
|
@ -51,7 +51,7 @@ func ParseConventionalCommit(commit string) (*ConventionalCommit, error) {
|
||||||
return cc, nil
|
return cc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func ParseConfFile(path string) (conf *Conf, name string, err error) {
|
func ParseConfFile(path string) (conf *Conf, err error) {
|
||||||
conf = new(Conf)
|
conf = new(Conf)
|
||||||
d := &multiconfig.DefaultLoader{}
|
d := &multiconfig.DefaultLoader{}
|
||||||
d.Loader = multiconfig.MultiLoader(
|
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)
|
slog.Error("validate stages conf", "error", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
name = conf.Name
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user