Skip to main content
Sign in
Snippets Groups Projects
Commit 7062ddef authored by Niall Sheridan's avatar Niall Sheridan
Browse files

Allow building static binaries

sqlite uses CGO which prevents the building of statically-linked binaries.
This change will omit sqlite support when building a static binary with:
CGO_ENABLED=0 go build --ldflags '-extldflags "-static"'
parent d7129803
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,6 @@ import ( ...@@ -10,7 +10,6 @@ import (
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"
"github.com/go-sql-driver/mysql" "github.com/go-sql-driver/mysql"
_ "github.com/mattn/go-sqlite3" // required by sql driver
"github.com/nsheridan/cashier/server/config" "github.com/nsheridan/cashier/server/config"
) )
... ...
......
// +build cgo
package store
import _ "github.com/mattn/go-sqlite3"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment