Vendor all dependencies

Uses godep to vendor dependencies. Godeps is not necessary during build,
golang's new vendor support is used instead.
This commit is contained in:
Tobias Schmidt 2016-01-20 22:19:15 -05:00
commit 33f99c4fc1
325 changed files with 127217 additions and 40 deletions

45
vendor/github.com/godbus/dbus/homedir_static.go generated vendored Normal file
View file

@ -0,0 +1,45 @@
// +build static_build
package dbus
import (
"bufio"
"os"
"strconv"
"strings"
)
func lookupHomeDir() string {
myUid := os.Getuid()
f, err := os.Open("/etc/passwd")
if err != nil {
return "/"
}
defer f.Close()
s := bufio.NewScanner(f)
for s.Scan() {
if err := s.Err(); err != nil {
break
}
line := strings.TrimSpace(s.Text())
if line == "" {
continue
}
parts := strings.Split(line, ":")
if len(parts) >= 6 {
uid, err := strconv.Atoi(parts[2])
if err == nil && uid == myUid {
return parts[5]
}
}
}
// Default to / if we can't get a better value
return "/"
}