style: fix golangci-lint errors
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c34ed3aa83
commit
e128f2eea8
|
@ -49,7 +49,11 @@ func generateStages(conf Conf) []stage.Stage {
|
||||||
var cmds []stage.Cmd
|
var cmds []stage.Cmd
|
||||||
for _, optionalCmd := range s.Executor.With.Cases {
|
for _, optionalCmd := range s.Executor.With.Cases {
|
||||||
cmd := s.Executor.With.Default
|
cmd := s.Executor.With.Default
|
||||||
copier.Copy(&cmd, &optionalCmd)
|
err := copier.Copy(&cmd, &optionalCmd)
|
||||||
|
if err != nil {
|
||||||
|
slog.Error("generate stages", "error", err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
cmds = append(cmds, cmd)
|
cmds = append(cmds, cmd)
|
||||||
}
|
}
|
||||||
if len(s.Executor.With.Cases) == 0 {
|
if len(s.Executor.With.Cases) == 0 {
|
||||||
|
|
|
@ -129,17 +129,6 @@ func convertPBFile(i stage.CmdFile) *pb.Request_File {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func convertAbsPath(cmdFile *stage.CmdFile) error {
|
|
||||||
if cmdFile.Src != nil && !filepath.IsAbs(*cmdFile.Src) {
|
|
||||||
absPath, err := filepath.Abs(*cmdFile.Src)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
cmdFile.Src = &absPath
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func convertPBResult(res []*pb.Response_Result) []stage.ExecutorResult {
|
func convertPBResult(res []*pb.Response_Result) []stage.ExecutorResult {
|
||||||
var ret []stage.ExecutorResult
|
var ret []stage.ExecutorResult
|
||||||
for _, r := range res {
|
for _, r := range res {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user