Skip to content

Commit

Permalink
Update action.go
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Jun 22, 2023
1 parent 3f13a09 commit 0ec2c5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/types/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (a *Action) WriteDocumentation(inputTable, outputTable *strings.Builder) er
re := regexp.MustCompile(fmt.Sprintf("(?m)^%s", internal.InputsHeader))
output = re.ReplaceAllFunc(input, func(match []byte) []byte {
if bytes.HasPrefix(match, []byte(internal.InputsHeader)) {
if inputsStr {
if inputsStr != "" {
return []byte(fmt.Sprintf("%s\n\n%v", internal.InputsHeader, inputsStr))
} else {
return []byte(fmt.Sprintf("%s", internal.InputsHeader))

Check failure on line 103 in internal/types/action.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] internal/types/action.go#L103

S1025: the argument is already a string, there's no need to use fmt.Sprintf (gosimple)
Raw output
internal/types/action.go:103:20: S1025: the argument is already a string, there's no need to use fmt.Sprintf (gosimple)
					return []byte(fmt.Sprintf("%s", internal.InputsHeader))
					              ^
Expand Down

0 comments on commit 0ec2c5e

Please sign in to comment.