An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 5.6% on proxy.golang.org
Top 0.1% dependent packages on proxy.golang.org
Top 0.3% dependent repos on proxy.golang.org
Top 0.8% docker downloads on proxy.golang.org

proxy.golang.org : github.com/tweekmonster/luser

Package luser is a drop-in replacement for 'os/user' which allows you to lookup users and groups in cross-compiled builds without 'cgo'. 'os/user' requires 'cgo' to lookup users using the target OS's API. This is the most reliable way to look up user and group information. However, cross-compiling means that 'os/user' will only work for the OS you're using. 'user.Current()' is usable when building without 'cgo', but doesn't always work. The '$USER' and '$HOME' variables could be different from what you expect or not even exist. If you want to cross-compile a relatively simple program that needs to write a config file somewhere in the user's directory, the last thing you want to do is figure out some elaborate build scheme involving virtual machines. When cgo is not available for a build, one of the following methods will be used to lookup user and group information: You should be able to simply replace 'user.' with 'luser.' (in most cases).

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/tweekmonster/luser
License: MIT
Latest release: over 8 years ago
First release: over 8 years ago
Namespace: github.com/tweekmonster
Dependent packages: 784
Dependent repositories: 630
Stars: 4 on GitHub
Forks: 1 on GitHub
Docker dependents: 56
Docker downloads: 100,513
See more repository details: repos.ecosyste.ms
Last synced: 8 days ago

    Loading...
    Readme
    Loading...