user

package
v0.0.0-...-a6941c0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Current

func Current() (*user.User, error)

Current is a portable implementation to determine the current user. Golang's user.Current does not work reliably under docker or 32bit linux

Two issues this code handles :-

Docker Container - For static binaries NSS library will not be a part of the static binary hence user.Current() fails.
Linux Intel 32 bit - CGO is not enabled so it will not link with NSS library.

func HomeDir

func HomeDir() (string, error)

HomeDir - return current home directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL