diff --git a/arangodb/arangodb.go b/arangodb/arangodb.go index 2136ca62..945c4eb7 100644 --- a/arangodb/arangodb.go +++ b/arangodb/arangodb.go @@ -3,10 +3,11 @@ package arangodb import ( "context" "fmt" + "time" + "github.com/arangodb/go-driver" "github.com/arangodb/go-driver/http" "github.com/gofiber/utils" - "time" ) // Storage interface that is implemented by storage providers diff --git a/arangodb/config.go b/arangodb/config.go index b996a4c7..f1dbe2b7 100644 --- a/arangodb/config.go +++ b/arangodb/config.go @@ -64,15 +64,12 @@ func (c Config) hostComposed() string { // Helper function to set default values func configDefault(cfg Config) Config { - if cfg.Username == "" || cfg.Password == "" { - panic("username and password are mandatory") - } // Set default values if cfg.Host == "" { cfg.Host = ConfigDefault.Host } else { if !strings.HasPrefix(cfg.Host, "http") { - panic("the host should start with http:// or https://") + panic("Host should start with `http://` or `https://`") } } if cfg.Port <= 0 {