From 353c19e55110043a09588c6b9b2f916d9384fa75 Mon Sep 17 00:00:00 2001 From: mpl Date: Wed, 28 Aug 2013 21:38:57 +0200 Subject: [PATCH] osutil: doc on Username Change-Id: Ic6deb921e9fb7cdce34e4e50143b321b6aedd697 --- pkg/osutil/paths.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/osutil/paths.go b/pkg/osutil/paths.go index 60a8a2761..96615ab78 100644 --- a/pkg/osutil/paths.go +++ b/pkg/osutil/paths.go @@ -36,6 +36,8 @@ func HomeDir() string { return os.Getenv("HOME") } +// Username returns the current user's username, as +// reported by the relevant environment variable. func Username() string { if runtime.GOOS == "windows" { return os.Getenv("USERNAME")