Skip to content
Gert-Jan Timmer edited this page Jul 20, 2018 · 1 revision

Quick Start

go get github.com/mattn/go-sqlite3/driver

Use the driver by including it in your code

import (
    _ "github.com/mattn/go-sqlite3/driver"
)

go-sqlite3 is cgo package. If you want to build your app using go-sqlite3, you need gcc. However, after you have built and installed go-sqlite3 with go install github.com/mattn/go-sqlite3 (which requires gcc), you can build your app without relying on gcc in future.

Important: because this is a CGO enabled package you are required to set the environment variable CGO_ENABLED=1 and have a gcc compile present within your path.