diff --git a/api/boot.go b/bootcfg/api/boot.go similarity index 100% rename from api/boot.go rename to bootcfg/api/boot.go diff --git a/api/cloud.go b/bootcfg/api/cloud.go similarity index 97% rename from api/cloud.go rename to bootcfg/api/cloud.go index a56091a8..d7ad850f 100644 --- a/api/cloud.go +++ b/bootcfg/api/cloud.go @@ -51,7 +51,7 @@ func cloudHandler(store Store) ContextHandler { config := buf.String() if !cloudinit.IsCloudConfig(config) && !cloudinit.IsScript(config) { - log.Errorf("error parsing user-data") + log.Error("error parsing user-data") http.NotFound(w, req) return } diff --git a/api/cloud_test.go b/bootcfg/api/cloud_test.go similarity index 100% rename from api/cloud_test.go rename to bootcfg/api/cloud_test.go diff --git a/api/context.go b/bootcfg/api/context.go similarity index 100% rename from api/context.go rename to bootcfg/api/context.go diff --git a/api/context_test.go b/bootcfg/api/context_test.go similarity index 100% rename from api/context_test.go rename to bootcfg/api/context_test.go diff --git a/api/groups.go b/bootcfg/api/groups.go similarity index 100% rename from api/groups.go rename to bootcfg/api/groups.go diff --git a/api/groups_test.go b/bootcfg/api/groups_test.go similarity index 100% rename from api/groups_test.go rename to bootcfg/api/groups_test.go diff --git a/api/handlers.go b/bootcfg/api/handlers.go similarity index 100% rename from api/handlers.go rename to bootcfg/api/handlers.go diff --git a/api/handlers_test.go b/bootcfg/api/handlers_test.go similarity index 100% rename from api/handlers_test.go rename to bootcfg/api/handlers_test.go diff --git a/api/http.go b/bootcfg/api/http.go similarity index 100% rename from api/http.go rename to bootcfg/api/http.go diff --git a/api/http_test.go b/bootcfg/api/http_test.go similarity index 100% rename from api/http_test.go rename to bootcfg/api/http_test.go diff --git a/api/ignition.go b/bootcfg/api/ignition.go similarity index 100% rename from api/ignition.go rename to bootcfg/api/ignition.go diff --git a/api/ignition_test.go b/bootcfg/api/ignition_test.go similarity index 100% rename from api/ignition_test.go rename to bootcfg/api/ignition_test.go diff --git a/api/ipxe.go b/bootcfg/api/ipxe.go similarity index 100% rename from api/ipxe.go rename to bootcfg/api/ipxe.go diff --git a/api/ipxe_test.go b/bootcfg/api/ipxe_test.go similarity index 100% rename from api/ipxe_test.go rename to bootcfg/api/ipxe_test.go diff --git a/api/matchers.go b/bootcfg/api/matchers.go similarity index 100% rename from api/matchers.go rename to bootcfg/api/matchers.go diff --git a/api/matchers_test.go b/bootcfg/api/matchers_test.go similarity index 100% rename from api/matchers_test.go rename to bootcfg/api/matchers_test.go diff --git a/api/metadata.go b/bootcfg/api/metadata.go similarity index 100% rename from api/metadata.go rename to bootcfg/api/metadata.go diff --git a/api/metadata_test.go b/bootcfg/api/metadata_test.go similarity index 100% rename from api/metadata_test.go rename to bootcfg/api/metadata_test.go diff --git a/api/pixiecore.go b/bootcfg/api/pixiecore.go similarity index 100% rename from api/pixiecore.go rename to bootcfg/api/pixiecore.go diff --git a/api/pixiecore_test.go b/bootcfg/api/pixiecore_test.go similarity index 100% rename from api/pixiecore_test.go rename to bootcfg/api/pixiecore_test.go diff --git a/api/serialize.go b/bootcfg/api/serialize.go similarity index 100% rename from api/serialize.go rename to bootcfg/api/serialize.go diff --git a/api/serialize_test.go b/bootcfg/api/serialize_test.go similarity index 100% rename from api/serialize_test.go rename to bootcfg/api/serialize_test.go diff --git a/api/server.go b/bootcfg/api/server.go similarity index 97% rename from api/server.go rename to bootcfg/api/server.go index d58e950c..ea8b42a6 100644 --- a/api/server.go +++ b/bootcfg/api/server.go @@ -3,7 +3,7 @@ package api import ( "net/http" - "github.com/coreos/coreos-baremetal/sign" + "github.com/coreos/coreos-baremetal/bootcfg/sign" "github.com/coreos/pkg/capnslog" ) @@ -12,7 +12,7 @@ const ( APIVersion = "v1alpha1" ) -var log = capnslog.NewPackageLogger("github.com/coreos/coreos-baremetal", "api") +var log = capnslog.NewPackageLogger("github.com/coreos/coreos-baremetal/bootcfg", "api") // Config configures the api Server. type Config struct { diff --git a/api/server_test.go b/bootcfg/api/server_test.go similarity index 100% rename from api/server_test.go rename to bootcfg/api/server_test.go diff --git a/api/spec.go b/bootcfg/api/spec.go similarity index 100% rename from api/spec.go rename to bootcfg/api/spec.go diff --git a/api/spec_test.go b/bootcfg/api/spec_test.go similarity index 100% rename from api/spec_test.go rename to bootcfg/api/spec_test.go diff --git a/api/store.go b/bootcfg/api/store.go similarity index 100% rename from api/store.go rename to bootcfg/api/store.go diff --git a/api/store_test.go b/bootcfg/api/store_test.go similarity index 100% rename from api/store_test.go rename to bootcfg/api/store_test.go diff --git a/config/config.go b/bootcfg/config/config.go similarity index 97% rename from config/config.go rename to bootcfg/config/config.go index 55490924..eea18925 100644 --- a/config/config.go +++ b/bootcfg/config/config.go @@ -8,7 +8,7 @@ import ( "os" "strings" - "github.com/coreos/coreos-baremetal/api" + "github.com/coreos/coreos-baremetal/bootcfg/api" "github.com/coreos/coreos-baremetal/bootcfg/storage/storagepb" "github.com/satori/go.uuid" "gopkg.in/yaml.v2" diff --git a/config/config_test.go b/bootcfg/config/config_test.go similarity index 97% rename from config/config_test.go rename to bootcfg/config/config_test.go index 08e782f0..b2a46ce4 100644 --- a/config/config_test.go +++ b/bootcfg/config/config_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - "github.com/coreos/coreos-baremetal/api" + "github.com/coreos/coreos-baremetal/bootcfg/api" "github.com/stretchr/testify/assert" ) diff --git a/sign/fixtures/empty.gpg b/bootcfg/sign/fixtures/empty.gpg similarity index 100% rename from sign/fixtures/empty.gpg rename to bootcfg/sign/fixtures/empty.gpg diff --git a/sign/fixtures/mangled.gpg b/bootcfg/sign/fixtures/mangled.gpg similarity index 100% rename from sign/fixtures/mangled.gpg rename to bootcfg/sign/fixtures/mangled.gpg diff --git a/sign/fixtures/pubring.gpg b/bootcfg/sign/fixtures/pubring.gpg similarity index 100% rename from sign/fixtures/pubring.gpg rename to bootcfg/sign/fixtures/pubring.gpg diff --git a/sign/fixtures/secring.gpg b/bootcfg/sign/fixtures/secring.gpg similarity index 100% rename from sign/fixtures/secring.gpg rename to bootcfg/sign/fixtures/secring.gpg diff --git a/sign/signer.go b/bootcfg/sign/signer.go similarity index 100% rename from sign/signer.go rename to bootcfg/sign/signer.go diff --git a/sign/signer_test.go b/bootcfg/sign/signer_test.go similarity index 100% rename from sign/signer_test.go rename to bootcfg/sign/signer_test.go diff --git a/sign/writer.go b/bootcfg/sign/writer.go similarity index 100% rename from sign/writer.go rename to bootcfg/sign/writer.go diff --git a/sign/writer_test.go b/bootcfg/sign/writer_test.go similarity index 100% rename from sign/writer_test.go rename to bootcfg/sign/writer_test.go diff --git a/cmd/bootcfg-rpc/main.go b/cmd/bootcfg-rpc/main.go index 5641e0eb..ef37a048 100644 --- a/cmd/bootcfg-rpc/main.go +++ b/cmd/bootcfg-rpc/main.go @@ -11,10 +11,10 @@ import ( "github.com/coreos/pkg/flagutil" "google.golang.org/grpc" + "github.com/coreos/coreos-baremetal/bootcfg/config" bootcfg "github.com/coreos/coreos-baremetal/bootcfg/server" pb "github.com/coreos/coreos-baremetal/bootcfg/server/serverpb" "github.com/coreos/coreos-baremetal/bootcfg/storage" - "github.com/coreos/coreos-baremetal/config" ) var ( diff --git a/cmd/bootcfg/main.go b/cmd/bootcfg/main.go index 5df344cf..cf35ff4a 100644 --- a/cmd/bootcfg/main.go +++ b/cmd/bootcfg/main.go @@ -11,9 +11,9 @@ import ( "github.com/coreos/pkg/capnslog" "github.com/coreos/pkg/flagutil" - "github.com/coreos/coreos-baremetal/api" - "github.com/coreos/coreos-baremetal/config" - "github.com/coreos/coreos-baremetal/sign" + "github.com/coreos/coreos-baremetal/bootcfg/api" + "github.com/coreos/coreos-baremetal/bootcfg/config" + "github.com/coreos/coreos-baremetal/bootcfg/sign" ) var ( @@ -79,7 +79,7 @@ func main() { // logging setup lvl, err := capnslog.ParseLevel(strings.ToUpper(flags.logLevel)) if err != nil { - log.Fatalf("Invalid log-level: %v", err.Error()) + log.Fatalf("invalid log-level: %v", err) } capnslog.SetGlobalLogLevel(lvl) capnslog.SetFormatter(capnslog.NewPrettyFormatter(os.Stdout, false))