Support both postgresql:// and posgres:// url prefix
This commit is contained in:
@@ -28,7 +28,7 @@ func FormatUrl(opts command.Options) (string, error) {
|
||||
url := opts.Url
|
||||
|
||||
// Make sure to only accept urls in a standard format
|
||||
if !strings.Contains(url, "postgres://") {
|
||||
if !strings.HasPrefix(url, "postgres://") && !strings.HasPrefix(url, "postgresql://") {
|
||||
return "", errors.New("Invalid URL. Valid format: postgres://user:password@host:port/db?sslmode=mode")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user