Documentation
¶
Overview ¶
user provides some rudimentary user information.
Is this a superior approach to os/user? No, it definitely is not! Why do you use it then? It is lightweight and available. Is it secure? Well, kind of. Environment variables are passed on execution and are only supposed to be mutable by the attached process for it's lifetime. The pwd.h/registry requesting way in os/user is better though as it respects changes to the useraccount even if the process is already running. What about reliability? No guarantee. If the used static env value is not set, then you'll receive an empty value. If you fork a process with a different user and preserve environment variables on that call, you may run into trouble. So what is this about? I did not want to use CGO. In the end, please check your applications threat model.
Index ¶
Constants ¶
View Source
const (
Separator string = "/"
)
Variables ¶
This section is empty.
Functions ¶
func LocalAppData ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.