autosklo/db.go
2024-01-05 15:50:47 +01:00

16 lines
352 B
Go

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
}