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
|
||||
}
|
||||
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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user