Fix pre-commit config typo and run goimports

- Fix typo in .pre-commit-config.yaml: "litestrem" -> "litestream"
- Run goimports with correct -local flag to fix import ordering
- All imports are now properly grouped according to Go conventions

This ensures the pre-commit hooks work correctly and CI will pass.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Cory LaNou
2025-07-31 17:08:59 -05:00
parent c7a8797dda
commit cb521ca751
14 changed files with 34 additions and 21 deletions

View File

@@ -14,7 +14,7 @@ repos:
- id: go-imports-repo
args:
- "-local"
- "github.com/benbjohnson/litestrem"
- "github.com/benbjohnson/litestream"
- "-w"
- id: go-vet-repo-mod
- id: go-staticcheck-repo-mod

View File

@@ -11,10 +11,11 @@ import (
"time"
"github.com/Azure/azure-storage-blob-go/azblob"
"github.com/benbjohnson/litestream"
"github.com/benbjohnson/litestream/internal"
"github.com/superfly/ltx"
"golang.org/x/sync/errgroup"
"github.com/benbjohnson/litestream"
"github.com/benbjohnson/litestream/internal"
)
// ReplicaClientType is the client type for this package.

View File

@@ -16,6 +16,10 @@ import (
"time"
"filippo.io/age"
_ "github.com/mattn/go-sqlite3"
"github.com/superfly/ltx"
"gopkg.in/yaml.v2"
"github.com/benbjohnson/litestream"
"github.com/benbjohnson/litestream/abs"
"github.com/benbjohnson/litestream/file"
@@ -23,9 +27,6 @@ import (
"github.com/benbjohnson/litestream/internal"
"github.com/benbjohnson/litestream/s3"
"github.com/benbjohnson/litestream/sftp"
_ "github.com/mattn/go-sqlite3"
"github.com/superfly/ltx"
"gopkg.in/yaml.v2"
)
// Build information.

View File

@@ -11,14 +11,15 @@ import (
"os"
"os/exec"
"github.com/mattn/go-shellwords"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/benbjohnson/litestream"
"github.com/benbjohnson/litestream/abs"
"github.com/benbjohnson/litestream/file"
"github.com/benbjohnson/litestream/gcs"
"github.com/benbjohnson/litestream/s3"
"github.com/benbjohnson/litestream/sftp"
"github.com/mattn/go-shellwords"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
// ReplicateCommand represents a command that continuously replicates SQLite databases.

3
db.go
View File

@@ -17,10 +17,11 @@ import (
"sync"
"time"
"github.com/benbjohnson/litestream/internal"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/superfly/ltx"
"github.com/benbjohnson/litestream/internal"
)
// Default DB settings.

View File

@@ -12,9 +12,10 @@ import (
"testing"
"time"
"github.com/superfly/ltx"
"github.com/benbjohnson/litestream"
"github.com/benbjohnson/litestream/internal"
"github.com/superfly/ltx"
)
var logLevel = flag.String("log.level", "debug", "")

View File

@@ -6,9 +6,10 @@ import (
"os"
"path/filepath"
"github.com/superfly/ltx"
"github.com/benbjohnson/litestream"
"github.com/benbjohnson/litestream/internal"
"github.com/superfly/ltx"
)
// ReplicaClientType is the client type for this package.

View File

@@ -10,10 +10,11 @@ import (
"time"
"cloud.google.com/go/storage"
"github.com/benbjohnson/litestream"
"github.com/benbjohnson/litestream/internal"
"github.com/superfly/ltx"
"google.golang.org/api/iterator"
"github.com/benbjohnson/litestream"
"github.com/benbjohnson/litestream/internal"
)
// ReplicaClientType is the client type for this package.

View File

@@ -5,9 +5,10 @@ import (
"encoding/hex"
"testing"
"github.com/benbjohnson/litestream"
_ "github.com/mattn/go-sqlite3"
"github.com/superfly/ltx"
"github.com/benbjohnson/litestream"
)
func TestChecksum(t *testing.T) {

View File

@@ -4,8 +4,9 @@ import (
"context"
"io"
"github.com/benbjohnson/litestream"
"github.com/superfly/ltx"
"github.com/benbjohnson/litestream"
)
var _ litestream.ReplicaClient = (*ReplicaClient)(nil)

View File

@@ -12,13 +12,14 @@ import (
"testing"
"time"
"github.com/superfly/ltx"
"github.com/benbjohnson/litestream"
"github.com/benbjohnson/litestream/abs"
"github.com/benbjohnson/litestream/file"
"github.com/benbjohnson/litestream/gcs"
"github.com/benbjohnson/litestream/s3"
"github.com/benbjohnson/litestream/sftp"
"github.com/superfly/ltx"
)
var (

View File

@@ -5,10 +5,11 @@ import (
"testing"
"time"
"github.com/superfly/ltx"
"github.com/benbjohnson/litestream"
"github.com/benbjohnson/litestream/file"
"github.com/benbjohnson/litestream/mock"
"github.com/superfly/ltx"
)
func TestReplica_Sync(t *testing.T) {

View File

@@ -19,10 +19,11 @@ import (
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/aws/aws-sdk-go/service/s3/s3manager"
"github.com/benbjohnson/litestream"
"github.com/benbjohnson/litestream/internal"
"github.com/superfly/ltx"
"golang.org/x/sync/errgroup"
"github.com/benbjohnson/litestream"
"github.com/benbjohnson/litestream/internal"
)
// ReplicaClientType is the client type for this package.

View File

@@ -11,11 +11,12 @@ import (
"sync"
"time"
"github.com/benbjohnson/litestream"
"github.com/benbjohnson/litestream/internal"
"github.com/pkg/sftp"
"github.com/superfly/ltx"
"golang.org/x/crypto/ssh"
"github.com/benbjohnson/litestream"
"github.com/benbjohnson/litestream/internal"
)
// ReplicaClientType is the client type for this package.