Skip to content

Commit

Permalink
Move gocloud.dev/blob driver imports to main.go (#110)
Browse files Browse the repository at this point in the history
Importing blob drivers in one place makes it easier to customize the
resulting binary. Users who don't want/need these drivers can cut the
binary size in half by not importing them.
  • Loading branch information
l9i authored May 9, 2022
1 parent 6202306 commit 37e385b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions cmd/sansshell-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ import (
"github.com/go-logr/logr"
"github.com/go-logr/stdr"

_ "gocloud.dev/blob/azureblob" // Pull in Azure blob support
_ "gocloud.dev/blob/gcsblob" // Pull in GCS blob support
_ "gocloud.dev/blob/s3blob" // Pull in S3 blob support

"github.com/Snowflake-Labs/sansshell/auth/mtls"
mtlsFlags "github.com/Snowflake-Labs/sansshell/auth/mtls/flags"
"github.com/Snowflake-Labs/sansshell/auth/opa"
Expand Down
3 changes: 0 additions & 3 deletions services/localfile/server/localfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ import (
"time"

"gocloud.dev/blob"
_ "gocloud.dev/blob/azureblob" // Pull in Azure blob support
_ "gocloud.dev/blob/gcsblob" // Pull in GCS blob support
_ "gocloud.dev/blob/s3blob" // Pull in S3 blob support

"github.com/Snowflake-Labs/sansshell/services"
pb "github.com/Snowflake-Labs/sansshell/services/localfile"
Expand Down
3 changes: 0 additions & 3 deletions services/process/server/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ import (
"syscall"

"gocloud.dev/blob"
_ "gocloud.dev/blob/azureblob" // Bring Azure blob support in.
_ "gocloud.dev/blob/gcsblob" // Bring GCS blob support in.
_ "gocloud.dev/blob/s3blob" // Bring S3 blob support in.

"github.com/Snowflake-Labs/sansshell/services"
pb "github.com/Snowflake-Labs/sansshell/services/process"
Expand Down

0 comments on commit 37e385b

Please sign in to comment.