Skip to content

Commit 94f751d

Browse files
committed
Don't log to console from library
1 parent ec4820d commit 94f751d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Description
44

5-
This project wraps the [Cloud Backed SQLite](https://sqlite.org/cloudsqlite/doc/trunk/www/index.wiki) (CSB)
5+
This project wraps the [Cloud Backed SQLite](https://sqlite.org/cloudsqlite/doc/trunk/www/index.wiki) (CBS)
66
solution into a golang package. The project uses [The SQLite OS Interface or "VFS"](https://www.sqlite.org/vfs.html)
77
concept to create a VFS which is backed by either Azure Blob Storage or Google Cloud Storage. The VFS can be used
88
with every SQLite golang package as long as it supports setting a custom VFS name.
@@ -18,7 +18,7 @@ This package can be installed with the `go get` command:
1818
go get github.com/PDOK/go-cloud-sqlite-vfs
1919
```
2020

21-
**go-cloud-sqlite-vfs is cgo package**. If you want to build your app using go-cloud-sqlite-vfs , you need gcc.
21+
**go-cloud-sqlite-vfs is cgo package**. If you want to build your app using go-cloud-sqlite-vfs , you need a C-compiler like gcc.
2222

2323
# Usage
2424

cloud_sqlite_vfs.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ import (
2121
type VFS struct {
2222
bcvfs *C.sqlite3_bcvfs
2323
cacheDir string
24+
25+
// true when running Cloud-Backed SQLite in daemonless mode, false when running as a daemon.
26+
Daemonless bool
2427
}
2528

2629
var KEY = ""
@@ -71,9 +74,9 @@ func NewVFS(vfsName string, storage string, account string, key string, containe
7174

7275
if rc == C.SQLITE_OK {
7376
if C.sqlite3_bcvfs_isdaemon(pVfs) == 1 {
74-
fmt.Println("virtual filesystem is using a daemon")
77+
vfs.Daemonless = false
7578
} else {
76-
fmt.Println("virtual filesystem is in daemon less mode")
79+
vfs.Daemonless = true
7780
}
7881
} else {
7982
_ = removeCacheDir(cacheDir)

0 commit comments

Comments
 (0)