Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importing go-sqlite hangs my application!!?? #1228

Open
tamis-laan opened this issue Mar 18, 2024 · 2 comments
Open

importing go-sqlite hangs my application!!?? #1228

tamis-laan opened this issue Mar 18, 2024 · 2 comments

Comments

@tamis-laan
Copy link

given main.go

package main

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

func main() {
	log.Println("hello world")
}

running go run -v cmd/main/main.go produces:

github.com/mattn/go-sqlite3
^C⏎ 

the application just hangs...

Removing _ "github.com/mattn/go-sqlite3" allows the application to run again.

go.mod:

module test-go-sqlite

go 1.22.0

require github.com/mattn/go-sqlite3 v1.14.22
@itaranto
Copy link

itaranto commented May 9, 2024

This happens to me too.

I'm using Arch Linux, Go 1.22.2 and go-sqlite3 v1.14.22.

@itaranto
Copy link

itaranto commented May 9, 2024

Oh, I just read the docs, you need to have CGo enabled: export CGO_ENABLED=1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants