From c0f5843440616ccd645a76a75e83d95cea7c2644 Mon Sep 17 00:00:00 2001 From: Tom Meadows Date: Fri, 15 Dec 2023 15:55:22 +0000 Subject: [PATCH] Migrating go module (#328) * added all imports * fixing go sum * changing go-witness back for now, makes more sense --------- Co-authored-by: John Kjell --- cmd/config.go | 2 +- cmd/keyloader.go | 2 +- cmd/root.go | 6 ++---- cmd/root_test.go | 2 +- cmd/run.go | 2 +- cmd/run_test.go | 2 +- cmd/sign.go | 2 +- cmd/sign_test.go | 2 +- cmd/verify.go | 4 ++-- cmd/verify_test.go | 2 +- docgen/docs.go | 2 +- go.mod | 2 +- main.go | 2 +- 13 files changed, 15 insertions(+), 17 deletions(-) diff --git a/cmd/config.go b/cmd/config.go index 430c1813..6698d85f 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -20,11 +20,11 @@ import ( "os" "strings" + "github.com/in-toto/witness/options" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" "github.com/testifysec/go-witness/log" - "github.com/testifysec/witness/options" ) func initConfig(rootCmd *cobra.Command, rootOptions *options.RootOptions) error { diff --git a/cmd/keyloader.go b/cmd/keyloader.go index 467c3a8f..c7ee4fdf 100644 --- a/cmd/keyloader.go +++ b/cmd/keyloader.go @@ -19,11 +19,11 @@ import ( "fmt" "strings" + "github.com/in-toto/witness/options" "github.com/spf13/pflag" "github.com/testifysec/go-witness/cryptoutil" "github.com/testifysec/go-witness/log" "github.com/testifysec/go-witness/signer" - "github.com/testifysec/witness/options" ) // signerProvidersFromFlags looks at all flags that were set by the user to determine which signer providers we should use diff --git a/cmd/root.go b/cmd/root.go index 1bbf7fd9..261409b9 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -18,14 +18,12 @@ import ( "fmt" "os" + "github.com/in-toto/witness/options" "github.com/spf13/cobra" "github.com/testifysec/go-witness/log" - "github.com/testifysec/witness/options" ) -var ( - ro = &options.RootOptions{} -) +var ro = &options.RootOptions{} func New() *cobra.Command { cmd := &cobra.Command{ diff --git a/cmd/root_test.go b/cmd/root_test.go index 4a5a20f2..8e80fea7 100644 --- a/cmd/root_test.go +++ b/cmd/root_test.go @@ -26,12 +26,12 @@ import ( "testing" "time" + "github.com/in-toto/witness/options" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/testifysec/go-witness/cryptoutil" "github.com/testifysec/go-witness/signer" "github.com/testifysec/go-witness/signer/file" - "github.com/testifysec/witness/options" ) const ( diff --git a/cmd/run.go b/cmd/run.go index 59350447..5967768f 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -20,6 +20,7 @@ import ( "encoding/json" "fmt" + "github.com/in-toto/witness/options" "github.com/spf13/cobra" witness "github.com/testifysec/go-witness" "github.com/testifysec/go-witness/archivista" @@ -32,7 +33,6 @@ import ( "github.com/testifysec/go-witness/log" "github.com/testifysec/go-witness/registry" "github.com/testifysec/go-witness/timestamp" - "github.com/testifysec/witness/options" ) func RunCmd() *cobra.Command { diff --git a/cmd/run_test.go b/cmd/run_test.go index ef717b9c..8dce47e9 100644 --- a/cmd/run_test.go +++ b/cmd/run_test.go @@ -24,13 +24,13 @@ import ( "path/filepath" "testing" + "github.com/in-toto/witness/options" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/testifysec/go-witness/cryptoutil" "github.com/testifysec/go-witness/dsse" "github.com/testifysec/go-witness/signer" "github.com/testifysec/go-witness/signer/file" - "github.com/testifysec/witness/options" ) func TestRunRSAKeyPair(t *testing.T) { diff --git a/cmd/sign.go b/cmd/sign.go index d9b74232..9be676a3 100644 --- a/cmd/sign.go +++ b/cmd/sign.go @@ -19,12 +19,12 @@ import ( "fmt" "os" + "github.com/in-toto/witness/options" "github.com/spf13/cobra" witness "github.com/testifysec/go-witness" "github.com/testifysec/go-witness/cryptoutil" "github.com/testifysec/go-witness/dsse" "github.com/testifysec/go-witness/timestamp" - "github.com/testifysec/witness/options" ) func SignCmd() *cobra.Command { diff --git a/cmd/sign_test.go b/cmd/sign_test.go index 262f05a4..d98a1fbc 100644 --- a/cmd/sign_test.go +++ b/cmd/sign_test.go @@ -22,10 +22,10 @@ import ( "os" "testing" + "github.com/in-toto/witness/options" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/testifysec/go-witness/cryptoutil" - "github.com/testifysec/witness/options" ) func Test_runSignPolicyRSA(t *testing.T) { diff --git a/cmd/verify.go b/cmd/verify.go index ec9e90bc..fa899496 100644 --- a/cmd/verify.go +++ b/cmd/verify.go @@ -22,14 +22,14 @@ import ( "fmt" "os" + "github.com/in-toto/witness/options" "github.com/spf13/cobra" - "github.com/testifysec/go-witness" + witness "github.com/testifysec/go-witness" "github.com/testifysec/go-witness/archivista" "github.com/testifysec/go-witness/cryptoutil" "github.com/testifysec/go-witness/dsse" "github.com/testifysec/go-witness/log" "github.com/testifysec/go-witness/source" - "github.com/testifysec/witness/options" ) func VerifyCmd() *cobra.Command { diff --git a/cmd/verify_test.go b/cmd/verify_test.go index e2793163..ca03297a 100644 --- a/cmd/verify_test.go +++ b/cmd/verify_test.go @@ -28,6 +28,7 @@ import ( "testing" "time" + "github.com/in-toto/witness/options" "github.com/stretchr/testify/require" witness "github.com/testifysec/go-witness" "github.com/testifysec/go-witness/attestation/commandrun" @@ -36,7 +37,6 @@ import ( "github.com/testifysec/go-witness/policy" "github.com/testifysec/go-witness/signer" "github.com/testifysec/go-witness/signer/file" - "github.com/testifysec/witness/options" ) func TestRunVerifyCA(t *testing.T) { diff --git a/docgen/docs.go b/docgen/docs.go index 8653beaf..f7877adc 100644 --- a/docgen/docs.go +++ b/docgen/docs.go @@ -18,8 +18,8 @@ import ( "flag" "log" + "github.com/in-toto/witness/cmd" "github.com/spf13/cobra/doc" - "github.com/testifysec/witness/cmd" ) var directory string diff --git a/go.mod b/go.mod index a54dcaaa..af96936e 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/testifysec/witness +module github.com/in-toto/witness go 1.19 diff --git a/main.go b/main.go index 4f17cfdc..6ef21e1f 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,7 @@ package main import ( - "github.com/testifysec/witness/cmd" + "github.com/in-toto/witness/cmd" ) func main() {