From ff21a5c75f090d5c27446eeaa6fb3ff6f82c5ab4 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Sun, 12 Jul 2015 14:56:44 -0800 Subject: Fixes mm-1420 adding postgres support --- .../_workspace/src/github.com/lib/pq/user_posix.go | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Godeps/_workspace/src/github.com/lib/pq/user_posix.go (limited to 'Godeps/_workspace/src/github.com/lib/pq/user_posix.go') diff --git a/Godeps/_workspace/src/github.com/lib/pq/user_posix.go b/Godeps/_workspace/src/github.com/lib/pq/user_posix.go new file mode 100644 index 000000000..e937d7d08 --- /dev/null +++ b/Godeps/_workspace/src/github.com/lib/pq/user_posix.go @@ -0,0 +1,24 @@ +// Package pq is a pure Go Postgres driver for the database/sql package. + +// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris + +package pq + +import ( + "os" + "os/user" +) + +func userCurrent() (string, error) { + u, err := user.Current() + if err == nil { + return u.Username, nil + } + + name := os.Getenv("USER") + if name != "" { + return name, nil + } + + return "", ErrCouldNotDetectUsername +} -- cgit v1.2.3-1-g7c22