func currentUser() (string, error) {
	u, err := user.Current()
	if err == nil {
		return u.Username, nil
	}
	name := os.Getenv("USER")
	if name != "" {
		return name, nil
	}
	return "", errCantDetectUser
}
currentUser returns a current user name
package connection
import (
	"errors"
	"fmt"
	neturl "net/url"
	"os"
	"os/user"
	"strings"
	"github.com/sosedoff/pgweb/pkg/command"
)
var (
	errCantDetectUser   = errors.New("Could not detect default username")
	errInvalidURLFormat = errors.New("Invalid URL. Valid format: postgres://user:password@host:port/db?sslmode=mode")
)