osutil: update docstring and tests (#6255)

This commit is contained in:
ᴜɴᴋɴᴡᴏɴ
2020-08-19 21:30:01 +08:00
committed by GitHub
parent 252d0fd977
commit c6143edb44
2 changed files with 4 additions and 10 deletions

View File

@@ -34,7 +34,7 @@ func IsExist(path string) bool {
return err == nil || os.IsExist(err)
}
// CurrentUsername returns the current system user
// CurrentUsername returns the username of the current user.
func CurrentUsername() string {
username := os.Getenv("USER")
if len(username) > 0 {