Repository: coder/envbuilder
Pull request #289 (2024-07-29 12:04:50)

chore: move log package out of internal


Patch:
diff --git a/cmd/envbuilder/main.go b/cmd/envbuilder/main.go
index 24d63fd..fcbf26d 100644
--- a/cmd/envbuilder/main.go
+++ b/cmd/envbuilder/main.go
@@ -12,7 +12,7 @@ import (
 
 	"github.com/coder/coder/v2/codersdk"
 	"github.com/coder/envbuilder"
-	"github.com/coder/envbuilder/internal/log"
+	"github.com/coder/envbuilder/log"
 	"github.com/coder/serpent"
 
 	// *Never* remove this. Certificates are not bundled as part
diff --git a/envbuilder.go b/envbuilder.go
index 2a00c84..98adab0 100644
--- a/envbuilder.go
+++ b/envbuilder.go
@@ -34,7 +34,7 @@ import (
 	"github.com/GoogleContainerTools/kaniko/pkg/util"
 	"github.com/coder/envbuilder/devcontainer"
 	"github.com/coder/envbuilder/internal/ebutil"
-	"github.com/coder/envbuilder/internal/log"
+	"github.com/coder/envbuilder/log"
 	"github.com/containerd/containerd/platforms"
 	"github.com/distribution/distribution/v3/configuration"
 	"github.com/distribution/distribution/v3/registry/handlers"
diff --git a/git/git.go b/git/git.go
index 019c68e..199e350 100644
--- a/git/git.go
+++ b/git/git.go
@@ -12,7 +12,7 @@ import (
 	"github.com/coder/envbuilder/options"
 
 	giturls "github.com/chainguard-dev/git-urls"
-	"github.com/coder/envbuilder/internal/log"
+	"github.com/coder/envbuilder/log"
 	"github.com/go-git/go-billy/v5"
 	"github.com/go-git/go-git/v5"
 	"github.com/go-git/go-git/v5/plumbing"
diff --git a/internal/ebutil/remount.go b/internal/ebutil/remount.go
index 21de0a3..c6c6e6e 100644
--- a/internal/ebutil/remount.go
+++ b/internal/ebutil/remount.go
@@ -9,7 +9,7 @@ import (
 	"sync"
 	"syscall"
 
-	"github.com/coder/envbuilder/internal/log"
+	"github.com/coder/envbuilder/log"
 	"github.com/hashicorp/go-multierror"
 	"github.com/prometheus/procfs"
 )
diff --git a/options/options.go b/options/options.go
index dd5ee8b..5771b50 100644
--- a/options/options.go
+++ b/options/options.go
@@ -4,7 +4,7 @@ import (
 	"os"
 	"strings"
 
-	"github.com/coder/envbuilder/internal/log"
+	"github.com/coder/envbuilder/log"
 	"github.com/coder/serpent"
 	"github.com/go-git/go-billy/v5"
 )


Test patch:
diff --git a/git/git_test.go b/git/git_test.go
index a65e90f..08ab1f9 100644
--- a/git/git_test.go
+++ b/git/git_test.go
@@ -16,7 +16,7 @@ import (
 
 	"github.com/coder/envbuilder/options"
 
-	"github.com/coder/envbuilder/internal/log"
+	"github.com/coder/envbuilder/log"
 	"github.com/coder/envbuilder/testutil/gittest"
 	"github.com/coder/envbuilder/testutil/mwtest"
 	"github.com/go-git/go-billy/v5"
diff --git a/internal/ebutil/remount_internal_test.go b/internal/ebutil/remount_internal_test.go
index f6b6817..8ff0440 100644
--- a/internal/ebutil/remount_internal_test.go
+++ b/internal/ebutil/remount_internal_test.go
@@ -8,7 +8,7 @@ import (
 	"testing"
 	time "time"
 
-	"github.com/coder/envbuilder/internal/log"
+	"github.com/coder/envbuilder/log"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 	"go.uber.org/mock/gomock"
diff --git a/internal/log/coder.go b/log/coder.go
similarity index 100%
rename from internal/log/coder.go
rename to log/coder.go
diff --git a/internal/log/coder_internal_test.go b/log/coder_internal_test.go
similarity index 100%
rename from internal/log/coder_internal_test.go
rename to log/coder_internal_test.go
diff --git a/internal/log/log.go b/log/log.go
similarity index 100%
rename from internal/log/log.go
rename to log/log.go
diff --git a/internal/log/log_test.go b/log/log_test.go
similarity index 92%
rename from internal/log/log_test.go
rename to log/log_test.go
index acf6247..adeff7b 100644
--- a/internal/log/log_test.go
+++ b/log/log_test.go
@@ -4,7 +4,7 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/coder/envbuilder/internal/log"
+	"github.com/coder/envbuilder/log"
 	"github.com/stretchr/testify/require"
 )