mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 14:22:37 +01:00
kvdb/postgres: remove old +build directive and cleanup
Due to the update of the kvdb package to go1.18, the `// +build` directives are no longer required. They are removed in this commit in order to simplify upcoming commits. Along the way, a few typos are fixed and an unused struct is removed.
This commit is contained in:
parent
c6abf585ee
commit
3dfaa88bb4
8 changed files with 2 additions and 16 deletions
|
@ -1,5 +1,4 @@
|
|||
//go:build kvdb_postgres
|
||||
// +build kvdb_postgres
|
||||
|
||||
package postgres
|
||||
|
||||
|
@ -21,13 +20,7 @@ const (
|
|||
kvTableName = "kv"
|
||||
)
|
||||
|
||||
// KV stores a key/value pair.
|
||||
type KV struct {
|
||||
key string
|
||||
val string
|
||||
}
|
||||
|
||||
// db holds a reference to the postgres connection connection.
|
||||
// db holds a reference to the postgres connection.
|
||||
type db struct {
|
||||
// cfg is the postgres connection config.
|
||||
cfg *Config
|
||||
|
@ -76,7 +69,7 @@ func Init(maxConnections int) {
|
|||
}
|
||||
|
||||
// newPostgresBackend returns a db object initialized with the passed backend
|
||||
// config. If postgres connection cannot be estabished, then returns error.
|
||||
// config. If postgres connection cannot be established, then returns error.
|
||||
func newPostgresBackend(ctx context.Context, config *Config, prefix string) (
|
||||
*db, error) {
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
//go:build kvdb_postgres
|
||||
// +build kvdb_postgres
|
||||
|
||||
package postgres
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
//go:build kvdb_postgres
|
||||
// +build kvdb_postgres
|
||||
|
||||
package postgres
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
//go:build kvdb_postgres
|
||||
// +build kvdb_postgres
|
||||
|
||||
package postgres
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
//go:build !kvdb_postgres
|
||||
// +build !kvdb_postgres
|
||||
|
||||
package postgres
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
//go:build kvdb_postgres
|
||||
// +build kvdb_postgres
|
||||
|
||||
package postgres
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
//go:build kvdb_postgres
|
||||
// +build kvdb_postgres
|
||||
|
||||
package postgres
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
//go:build kvdb_postgres
|
||||
// +build kvdb_postgres
|
||||
|
||||
package postgres
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue