Skip to content

Commit

Permalink
Fix compilation errors with NOCGO
Browse files Browse the repository at this point in the history
Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed Aug 3, 2020
1 parent a12c422 commit 902e5bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/drivers/dqlite/no_dqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ package dqlite

import (
"context"
"fmt"
"errors"

"github.com/rancher/kine/pkg/drivers/generic"
"github.com/rancher/kine/pkg/server"
)

func New(ctx context.Context, datasourceName string, connPoolConfig generic.ConnectionPoolConfig) (server.Backend, error) {
return nil, fmt.Errorf("dqlite is not support, compile with \"-tags dqlite\"")
return nil, errors.New(`this binary is built without dqlite support, compile with "-tags dqlite"`)
}
4 changes: 2 additions & 2 deletions pkg/drivers/sqlite/sqlite_nocgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (

var errNoCgo = errors.New("this binary is built without CGO, sqlite is disabled")

func New(ctx context.Context, dataSourceName string) (server.Backend, error) {
func New(ctx context.Context, dataSourceName string, connPoolConfig generic.ConnectionPoolConfig) (server.Backend, error) {
return nil, errNoCgo
}

func NewVariant(driverName, dataSourceName string) (server.Backend, *generic.Generic, error) {
func NewVariant(driverName, dataSourceName string, connPoolConfig generic.ConnectionPoolConfig) (server.Backend, *generic.Generic, error) {
return nil, nil, errNoCgo
}

Expand Down

0 comments on commit 902e5bd

Please sign in to comment.