autosklo/db.go

16 lines
352 B
Go
Raw Normal View History

2024-01-05 14:49:46 +00:00
package main
import (
"fmt"
_ "github.com/go-kivik/couchdb/v3"
kivik "github.com/go-kivik/kivik/v3"
)
func getDBClient() (*kivik.Client, error) {
config := getConfig()
client, err := kivik.New("couch", fmt.Sprintf("%s://%s:%s@%s", config.CouchDBProto, config.CouchDBUsername, config.CouchDBPassword, config.CouchDBHost))
return client, err
}