1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-18 08:26:45 +02:00
woodpecker/vendor/github.com/lib/pq/user_posix.go

16 lines
290 B
Go
Raw Normal View History

2015-05-22 20:37:40 +02:00
// Package pq is a pure Go Postgres driver for the database/sql package.
2015-09-30 03:21:17 +02:00
// +build darwin freebsd linux nacl netbsd openbsd solaris
2015-05-22 20:37:40 +02:00
package pq
2015-09-30 03:21:17 +02:00
import "os/user"
2015-05-22 20:37:40 +02:00
func userCurrent() (string, error) {
u, err := user.Current()
2015-09-30 03:21:17 +02:00
if err != nil {
return "", err
2015-05-22 20:37:40 +02:00
}
2015-09-30 03:21:17 +02:00
return u.Username, nil
2015-05-22 20:37:40 +02:00
}