github.com/goplus/llgo@v0.8.3/cl/_testlibc/sqlite/in.go (about)

     1  package main
     2  
     3  import (
     4  	"github.com/goplus/llgo/c"
     5  	"github.com/goplus/llgo/c/sqlite"
     6  )
     7  
     8  func main() {
     9  	db, err := sqlite.OpenV2(c.Str(":memory:"), sqlite.OpenReadWrite|sqlite.OpenMemory, nil)
    10  	check(err)
    11  
    12  	db.Close()
    13  }
    14  
    15  func check(err sqlite.Errno) {
    16  	if err != sqlite.OK {
    17  		c.Printf(c.Str("==> Error: (%d) %s\n"), err, err.Errstr())
    18  		c.Exit(1)
    19  	}
    20  }