aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2023-05-18 05:55:01 +0200
committerTeddy Wing2023-05-18 05:55:01 +0200
commit3fb25b9de7f5673fe2af04606c7b35bb53f1f2bf (patch)
tree38146d6f3066bdb817da7a103dc9abac8c92caf4
parentc66cfe0f25a43687a342f3ddce5d4b081bfadc1e (diff)
downloadgocapturedrefrace-3fb25b9de7f5673fe2af04606c7b35bb53f1f2bf.tar.bz2
Rename package to "capturedrefrace"
I decided I don't like the "go" prefix for a Go package name. It doesn't make sense. Rename the module and package accordingly. I do like the "go" prefix in the command line program, so leave it there.
-rw-r--r--capturedrefrace.go (renamed from gocapturedrefrace.go)4
-rw-r--r--capturedrefrace_test.go (renamed from gocapturedrefrace_test.go)6
-rw-r--r--cmd/gocapturedrefrace/main.go4
-rw-r--r--go.mod2
4 files changed, 8 insertions, 8 deletions
diff --git a/gocapturedrefrace.go b/capturedrefrace.go
index a3c1699..21a8b2d 100644
--- a/gocapturedrefrace.go
+++ b/capturedrefrace.go
@@ -17,7 +17,7 @@
// <https://www.gnu.org/licenses/>.
// TODO: package documentation.
-package gocapturedrefrace
+package capturedrefrace
import (
"go/ast"
@@ -32,7 +32,7 @@ import (
var version = "0.0.1"
var Analyzer = &analysis.Analyzer{
- Name: "gocapturedrefrace",
+ Name: "capturedrefrace",
Doc: "reports captured references in goroutine closures",
Run: run,
Requires: []*analysis.Analyzer{inspect.Analyzer},
diff --git a/gocapturedrefrace_test.go b/capturedrefrace_test.go
index fd5fc53..f4bb43d 100644
--- a/gocapturedrefrace_test.go
+++ b/capturedrefrace_test.go
@@ -17,17 +17,17 @@
// <https://www.gnu.org/licenses/>.
-package gocapturedrefrace_test
+package capturedrefrace_test
import (
"testing"
"golang.org/x/tools/go/analysis/analysistest"
- "gopkg.teddywing.com/gocapturedrefrace"
+ "gopkg.teddywing.com/capturedrefrace"
)
func Test(t *testing.T) {
testdata := analysistest.TestData()
- analysistest.Run(t, testdata, gocapturedrefrace.Analyzer, ".")
+ analysistest.Run(t, testdata, capturedrefrace.Analyzer, ".")
}
diff --git a/cmd/gocapturedrefrace/main.go b/cmd/gocapturedrefrace/main.go
index bab8032..60c7838 100644
--- a/cmd/gocapturedrefrace/main.go
+++ b/cmd/gocapturedrefrace/main.go
@@ -21,9 +21,9 @@ package main
import (
"golang.org/x/tools/go/analysis/singlechecker"
- "gopkg.teddywing.com/gocapturedrefrace"
+ "gopkg.teddywing.com/capturedrefrace"
)
func main() {
- singlechecker.Main(gocapturedrefrace.Analyzer)
+ singlechecker.Main(capturedrefrace.Analyzer)
}
diff --git a/go.mod b/go.mod
index 2a93e77..5d08fa1 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module gopkg.teddywing.com/gocapturedrefrace
+module gopkg.teddywing.com/capturedrefrace
go 1.20