Skip to content

Commit 028c114

Browse files
committed
gofmt and remove lint
1 parent eab00b9 commit 028c114

File tree

4 files changed

+10
-23
lines changed

4 files changed

+10
-23
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,6 @@ on:
55
pull_request:
66

77
jobs:
8-
lint:
9-
name: lint
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/setup-go@v5
13-
with:
14-
go-version: "1.24.x"
15-
- uses: actions/checkout@v4
16-
- name: golangci-lint
17-
uses: golangci/golangci-lint-action@v4
18-
with:
19-
version: latest
20-
218
test:
229
runs-on: ubuntu-latest
2310
strategy:
@@ -51,11 +38,11 @@ jobs:
5138

5239
goreleaser:
5340
name: Release a new version
54-
needs: [lint, test]
41+
needs: [test]
5542
runs-on: ubuntu-latest
5643
environment: GoReleaser
5744
# This job only runs when
58-
# 1. When the previous `lint` and `test` jobs has completed successfully
45+
# 1. When the previous `test` job has completed successfully
5946
# 2. When the repository is not a fork, i.e. it will only run on the official golang-migrate/migrate
6047
# 3. When the workflow is triggered by a tag with `v` prefix
6148
if: ${{ success() && github.repository == 'golang-migrate/migrate' && startsWith(github.ref, 'refs/tags/v') }}

internal/cli/commands_install_to.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func installToCmd(destDir string) error {
1616

1717
// Get the base name of the executable
1818
executableName := filepath.Base(executablePath)
19-
19+
2020
// Create destination path
2121
destPath := filepath.Join(destDir, executableName)
2222
tempPath := destPath + ".tmp"

internal/cli/commands_install_to_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestInstallToCmdSuccess(t *testing.T) {
2929
t.Fatalf("Failed to get executable path: %v", err)
3030
}
3131
executableName := filepath.Base(executablePath)
32-
32+
3333
// Check that the file was created
3434
installedPath := filepath.Join(destDir, executableName)
3535
info, err := os.Stat(installedPath)
@@ -61,12 +61,12 @@ func TestInstallToCmdSuccess(t *testing.T) {
6161
func TestInstallToCmdNonexistentDirectory(t *testing.T) {
6262
tempDir := t.TempDir()
6363
nonexistentDir := filepath.Join(tempDir, "nonexistent", "deep", "path")
64-
64+
6565
err := installToCmd(nonexistentDir)
6666
if err == nil {
6767
t.Error("Expected error for nonexistent directory, got nil")
6868
}
69-
69+
7070
// Should contain a meaningful error message
7171
if err != nil && err.Error() == "" {
7272
t.Error("Error message should not be empty")
@@ -154,7 +154,7 @@ func TestInstallToCmdTempFileCleanup(t *testing.T) {
154154
t.Fatalf("Failed to get executable path: %v", err)
155155
}
156156
executableName := filepath.Base(executablePath)
157-
157+
158158
// We can't easily simulate a failure in the middle of installToCmd,
159159
// but we can check that no temp files are left after successful execution
160160
err = installToCmd(destDir)
@@ -235,7 +235,7 @@ func TestInstallToCmdIntegration(t *testing.T) {
235235
// Build a test binary first
236236
tempDir := t.TempDir()
237237
testBinary := filepath.Join(tempDir, "migrate-test")
238-
238+
239239
// Find the repo root by looking for go.mod
240240
repoRoot := "."
241241
for i := 0; i < 5; i++ { // Look up to 5 levels up
@@ -244,7 +244,7 @@ func TestInstallToCmdIntegration(t *testing.T) {
244244
}
245245
repoRoot = filepath.Join("..", repoRoot)
246246
}
247-
247+
248248
cmd := exec.Command("go", "build", "-o", testBinary, "./cmd/migrate")
249249
cmd.Dir = repoRoot
250250
output, err := cmd.CombinedOutput()

internal/cli/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const (
3737
Use -all to apply all down migrations`
3838
dropUsage = `drop [-f] Drop everything inside database
3939
Use -f to bypass confirmation`
40-
forceUsage = `force V Set version V but don't run migration (ignores dirty state)`
40+
forceUsage = `force V Set version V but don't run migration (ignores dirty state)`
4141
installToUsage = `install-to DIR Copy the running binary to the specified directory`
4242
)
4343

0 commit comments

Comments
 (0)