Skip to content

Commit

Permalink
Fix Lint errors and resort GitHub action steps.
Browse files Browse the repository at this point in the history
  • Loading branch information
awalsh128 committed Nov 27, 2023
1 parent 1d63750 commit 90d6c1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:
contents: read

jobs:
lint_build_test:
integrate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -18,12 +18,12 @@ jobs:
with:
go-version-file: "go.mod"

- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2

- name: Build and test
run: |
go build -v ./...
go test -v ./...
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
5 changes: 3 additions & 2 deletions src/cmd/apt_query/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func execCommand(name string, arg ...string) string {
cmd := exec.Command(name, arg...)
out, err := cmd.CombinedOutput()
if err != nil {
fmt.Fprintln(os.Stderr, fmt.Sprintf("Error code %d encountered while running %s\n%s", cmd.ProcessState.ExitCode(), strings.Join(cmd.Args, " "), string(out)))
fmt.Fprintf(os.Stderr, "Error code %d encountered while running %s\n%s\n", cmd.ProcessState.ExitCode(), strings.Join(cmd.Args, " "), string(out))
os.Exit(2)
}
return string(out)
Expand Down Expand Up @@ -97,10 +97,11 @@ func main() {
pkgNames := os.Args[2:]

switch command {

case "normalized-list":
pkgs := getPackages(pkgNames)
fmt.Println(pkgs.serialize())
break

default:
exitOnError("Command '%s' not recognized.", command)
}
Expand Down

0 comments on commit 90d6c1c

Please sign in to comment.