Repository: scionproto/scion
Pull request #3804 (2020-06-25 12:32:48)

sig: rename sigconfig package to config


<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/scionproto/scion/3804)
<!-- Reviewable:end -->



Patch:
diff --git a/go/pkg/sig/sigconfig/BUILD.bazel b/go/pkg/sig/config/BUILD.bazel
similarity index 87%
rename from go/pkg/sig/sigconfig/BUILD.bazel
rename to go/pkg/sig/config/BUILD.bazel
index 4a0bde907..20142eb10 100644
--- a/go/pkg/sig/sigconfig/BUILD.bazel
+++ b/go/pkg/sig/config/BUILD.bazel
@@ -3,10 +3,10 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
 go_library(
     name = "go_default_library",
     srcs = [
-        "conf.go",
+        "config.go",
         "sample.go",
     ],
-    importpath = "github.com/scionproto/scion/go/pkg/sig/sigconfig",
+    importpath = "github.com/scionproto/scion/go/pkg/sig/config",
     visibility = ["//visibility:public"],
     deps = [
         "//go/lib/addr:go_default_library",
@@ -19,7 +19,7 @@ go_library(
 
 go_test(
     name = "go_default_test",
-    srcs = ["conf_test.go"],
+    srcs = ["config_test.go"],
     embed = [":go_default_library"],
     deps = [
         "//go/lib/env/envtest:go_default_library",
diff --git a/go/pkg/sig/sigconfig/conf.go b/go/pkg/sig/config/config.go
similarity index 99%
rename from go/pkg/sig/sigconfig/conf.go
rename to go/pkg/sig/config/config.go
index 389939204..015ed0242 100644
--- a/go/pkg/sig/sigconfig/conf.go
+++ b/go/pkg/sig/config/config.go
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package sigconfig
+package config
 
 import (
 	"fmt"
diff --git a/go/pkg/sig/sigconfig/sample.go b/go/pkg/sig/config/sample.go
similarity index 98%
rename from go/pkg/sig/sigconfig/sample.go
rename to go/pkg/sig/config/sample.go
index e09ab5412..1a7093f87 100644
--- a/go/pkg/sig/sigconfig/sample.go
+++ b/go/pkg/sig/config/sample.go
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package sigconfig
+package config
 
 const idSample = "sig4"
 
diff --git a/go/sig/BUILD.bazel b/go/sig/BUILD.bazel
index 7b8622162..aeaac93ce 100644
--- a/go/sig/BUILD.bazel
+++ b/go/sig/BUILD.bazel
@@ -16,7 +16,7 @@ go_library(
         "//go/lib/serrors:go_default_library",
         "//go/lib/sigdisp:go_default_library",
         "//go/lib/sigjson:go_default_library",
-        "//go/pkg/sig/sigconfig:go_default_library",
+        "//go/pkg/sig/config:go_default_library",
         "//go/sig/egress:go_default_library",
         "//go/sig/internal/base:go_default_library",
         "//go/sig/internal/ingress:go_default_library",
diff --git a/go/sig/internal/sigcmn/BUILD.bazel b/go/sig/internal/sigcmn/BUILD.bazel
index 6662c7a46..a2dbaae17 100644
--- a/go/sig/internal/sigcmn/BUILD.bazel
+++ b/go/sig/internal/sigcmn/BUILD.bazel
@@ -17,7 +17,7 @@ go_library(
         "//go/lib/serrors:go_default_library",
         "//go/lib/snet:go_default_library",
         "//go/lib/sock/reliable:go_default_library",
-        "//go/pkg/sig/sigconfig:go_default_library",
+        "//go/pkg/sig/config:go_default_library",
         "//go/sig/internal/snetmigrate:go_default_library",
     ],
 )
diff --git a/go/sig/internal/sigcmn/common.go b/go/sig/internal/sigcmn/common.go
index ccef9243f..cd7ca69b8 100644
--- a/go/sig/internal/sigcmn/common.go
+++ b/go/sig/internal/sigcmn/common.go
@@ -31,7 +31,7 @@ import (
 	"github.com/scionproto/scion/go/lib/serrors"
 	"github.com/scionproto/scion/go/lib/snet"
 	"github.com/scionproto/scion/go/lib/sock/reliable"
-	"github.com/scionproto/scion/go/pkg/sig/sigconfig"
+	sigconfig "github.com/scionproto/scion/go/pkg/sig/config"
 	"github.com/scionproto/scion/go/sig/internal/snetmigrate"
 )
 
diff --git a/go/sig/main.go b/go/sig/main.go
index 33c70d6e7..a9ded1a48 100644
--- a/go/sig/main.go
+++ b/go/sig/main.go
@@ -38,7 +38,7 @@ import (
 	"github.com/scionproto/scion/go/lib/serrors"
 	"github.com/scionproto/scion/go/lib/sigdisp"
 	"github.com/scionproto/scion/go/lib/sigjson"
-	"github.com/scionproto/scion/go/pkg/sig/sigconfig"
+	sigconfig "github.com/scionproto/scion/go/pkg/sig/config"
 	"github.com/scionproto/scion/go/sig/egress"
 	"github.com/scionproto/scion/go/sig/internal/base"
 	"github.com/scionproto/scion/go/sig/internal/ingress"


Test patch:
diff --git a/go/pkg/sig/sigconfig/conf_test.go b/go/pkg/sig/config/config_test.go
similarity index 97%
rename from go/pkg/sig/sigconfig/conf_test.go
rename to go/pkg/sig/config/config_test.go
index 242012aff..2f71014ac 100644
--- a/go/pkg/sig/sigconfig/conf_test.go
+++ b/go/pkg/sig/config/config_test.go
@@ -12,14 +12,14 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package sigconfig
+package config
 
 import (
 	"bytes"
 	"net"
 	"testing"
 
-	"github.com/pelletier/go-toml"
+	toml "github.com/pelletier/go-toml"
 	"github.com/stretchr/testify/assert"
 
 	"github.com/scionproto/scion/go/lib/env/envtest"