Movatterモバイル変換


[0]ホーム

URL:


osuser

package
v1.92.2Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License:BSD-3-ClauseImports:11Imported by:2

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package osuser implements OS user lookup. It's a wrapper around os/user thatworks on non-cgo builds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcGetGroupIdsadded inv1.66.0

func GetGroupIds(user *user.User) ([]string,error)

GetGroupIds returns the list of group IDs that the user is a member of, oran error. It will first try to use the 'id' command to get the group IDs,and if that fails, it will fall back to the user.GroupIds method.

funcLookupByUID

func LookupByUID(uidstring) (*user.User,error)

LookupByUID is like os/user.LookupId but handles a few edge cases likegokrazy and non-cgo lookups.

funcLookupByUIDWithShell

func LookupByUIDWithShell(uidstring) (u *user.User, shellstring, errerror)

LookupByUIDWithShell is like os/user.LookupId but handles a few edge caseslike gokrazy and non-cgo lookups, and returns the user shell. The user shelllookup is best-effort and may be empty.

funcLookupByUsername

func LookupByUsername(usernamestring) (*user.User,error)

LookupByUsername is like os/user.Lookup but handles a few edge cases likegokrazy and non-cgo lookups.

funcLookupByUsernameWithShell

func LookupByUsernameWithShell(usernamestring) (u *user.User, shellstring, errerror)

LookupByUsernameWithShell is like os/user.Lookup but handles a few edgecases like gokrazy and non-cgo lookups, and returns the user shell. The usershell lookup is best-effort and may be empty.

Types

This section is empty.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp