From 486b6856676be6eaf267890ae1ba3a1485e1e8ec Mon Sep 17 00:00:00 2001 From: tcr-ableton Date: Thu, 22 Aug 2019 15:30:48 +0200 Subject: [PATCH] Move reusable packages in pkg/ --- actions.go | 2 +- download.go | 8 ++++---- go.sum | 4 ++++ {dsn => pkg/dsn}/dsn.go | 0 {dsn => pkg/dsn}/dsn_test.go | 0 {dsn => pkg/dsn}/expressions.go | 0 {dsn => pkg/dsn}/expressions_test.go | 0 {remote => pkg/remote}/gist/constants.go | 0 {remote => pkg/remote}/gist/storage.go | 0 {remote => pkg/remote}/s3/constants.go | 0 {remote => pkg/remote}/s3/storage.go | 0 {remote => pkg/remote}/ssh/storage.go | 0 {remote => pkg/remote}/storage.go | 0 upload.go | 8 ++++---- 14 files changed, 13 insertions(+), 9 deletions(-) rename {dsn => pkg/dsn}/dsn.go (100%) rename {dsn => pkg/dsn}/dsn_test.go (100%) rename {dsn => pkg/dsn}/expressions.go (100%) rename {dsn => pkg/dsn}/expressions_test.go (100%) rename {remote => pkg/remote}/gist/constants.go (100%) rename {remote => pkg/remote}/gist/storage.go (100%) rename {remote => pkg/remote}/s3/constants.go (100%) rename {remote => pkg/remote}/s3/storage.go (100%) rename {remote => pkg/remote}/ssh/storage.go (100%) rename {remote => pkg/remote}/storage.go (100%) diff --git a/actions.go b/actions.go index 2eb191f..53b0492 100644 --- a/actions.go +++ b/actions.go @@ -10,7 +10,7 @@ import ( "os" "strings" - "github.com/oleiade/trousseau/dsn" + "github.com/oleiade/trousseau/pkg/dsn" ) func CreateAction(ct CryptoType, ca CryptoAlgorithm, recipients []string) error { diff --git a/download.go b/download.go index adddd77..9a9c71b 100644 --- a/download.go +++ b/download.go @@ -4,10 +4,10 @@ import ( "fmt" "github.com/crowdmob/goamz/aws" - "github.com/oleiade/trousseau/dsn" - "github.com/oleiade/trousseau/remote/gist" - "github.com/oleiade/trousseau/remote/s3" - "github.com/oleiade/trousseau/remote/ssh" + "github.com/oleiade/trousseau/pkg/dsn" + "github.com/oleiade/trousseau/pkg/remote/gist" + "github.com/oleiade/trousseau/pkg/remote/s3" + "github.com/oleiade/trousseau/pkg/remote/ssh" ) // downloadUsingS3 executes the whole process of pulling diff --git a/go.sum b/go.sum index d4f0f38..409fe8b 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,6 @@ github.com/crowdmob/goamz v0.0.0-20150128194925-3a06871fe9fc h1:Gn/roShKxUNtNYEEH+ZeGxMJ+RsCBZdIdb8pKOesTaA= github.com/crowdmob/goamz v0.0.0-20150128194925-3a06871fe9fc/go.mod h1:4zrXGiIhmCfgVUO6nJpSa9QVXylPKBYkLa179m59HzE= +github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2 h1:5zdDAMuB3gvbHB1m2BZT9+t9w+xaBmK3ehb7skDXcwM= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-github v0.0.0-20160802180827-56add9d4071b h1:RqHoi09dHniK/7ZOXEgPoXGQDxteuNCMD09OEgOJllQ= github.com/google/go-github v0.0.0-20160802180827-56add9d4071b/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= @@ -12,8 +13,11 @@ github.com/oleiade/reflections v0.0.0-20131121131850-632977f98cd3 h1:shfb0dwW+oU github.com/oleiade/reflections v0.0.0-20131121131850-632977f98cd3/go.mod h1:RbATFBbKYkVdqmSFtx13Bb/tVhR0lgOBXunWTZKeL4w= github.com/oleiade/serrure v0.0.0-20160812094227-28794589ac9b h1:3D0HyVLogm3spti98Jp9tRAEkgLq0dzLVVNcTD6/DxA= github.com/oleiade/serrure v0.0.0-20160812094227-28794589ac9b/go.mod h1:mPec4DPLMKWSD0cuiTXUDLe6W96ERayhfXz8QAVq2Sc= +github.com/oleiade/tempura v0.0.0-20140528162001-1e4f5790d506 h1:M7Y+MexyOaIR9jhUJ0L0Ubi1hvyl1Zf/HNj2MCluegQ= github.com/oleiade/tempura v0.0.0-20140528162001-1e4f5790d506/go.mod h1:ntxgn8lHBBO3Id3152amVvKq3HdvNRIOX3IT6AxMHZc= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v0.0.0-20160615092844-d77da356e56a h1:VxiXq5jE8Z1dkOLZxIb+6JaOOok04E8ZWos4rsRSlzw= github.com/stretchr/testify v0.0.0-20160615092844-d77da356e56a/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/tmc/keyring v0.0.0-20160307194037-adec3bef79f7 h1:WhLeVc9Ces9elO8LWkwY4eI8WLE2yc1uDZ2WW2RJsbU= github.com/tmc/keyring v0.0.0-20160307194037-adec3bef79f7/go.mod h1:gsa3jftQ3xia55nzIN4lXLYzDcWdxjojdKoz+N0St2Y= diff --git a/dsn/dsn.go b/pkg/dsn/dsn.go similarity index 100% rename from dsn/dsn.go rename to pkg/dsn/dsn.go diff --git a/dsn/dsn_test.go b/pkg/dsn/dsn_test.go similarity index 100% rename from dsn/dsn_test.go rename to pkg/dsn/dsn_test.go diff --git a/dsn/expressions.go b/pkg/dsn/expressions.go similarity index 100% rename from dsn/expressions.go rename to pkg/dsn/expressions.go diff --git a/dsn/expressions_test.go b/pkg/dsn/expressions_test.go similarity index 100% rename from dsn/expressions_test.go rename to pkg/dsn/expressions_test.go diff --git a/remote/gist/constants.go b/pkg/remote/gist/constants.go similarity index 100% rename from remote/gist/constants.go rename to pkg/remote/gist/constants.go diff --git a/remote/gist/storage.go b/pkg/remote/gist/storage.go similarity index 100% rename from remote/gist/storage.go rename to pkg/remote/gist/storage.go diff --git a/remote/s3/constants.go b/pkg/remote/s3/constants.go similarity index 100% rename from remote/s3/constants.go rename to pkg/remote/s3/constants.go diff --git a/remote/s3/storage.go b/pkg/remote/s3/storage.go similarity index 100% rename from remote/s3/storage.go rename to pkg/remote/s3/storage.go diff --git a/remote/ssh/storage.go b/pkg/remote/ssh/storage.go similarity index 100% rename from remote/ssh/storage.go rename to pkg/remote/ssh/storage.go diff --git a/remote/storage.go b/pkg/remote/storage.go similarity index 100% rename from remote/storage.go rename to pkg/remote/storage.go diff --git a/upload.go b/upload.go index 7806b63..a3ab168 100644 --- a/upload.go +++ b/upload.go @@ -4,10 +4,10 @@ import ( "fmt" "github.com/crowdmob/goamz/aws" - "github.com/oleiade/trousseau/dsn" - "github.com/oleiade/trousseau/remote/gist" - "github.com/oleiade/trousseau/remote/s3" - "github.com/oleiade/trousseau/remote/ssh" + "github.com/oleiade/trousseau/pkg/dsn" + "github.com/oleiade/trousseau/pkg/remote/gist" + "github.com/oleiade/trousseau/pkg/remote/s3" + "github.com/oleiade/trousseau/pkg/remote/ssh" ) // uploadUsingS3 executes the whole process of pushing