whoami

package
v1.0.99 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdWhoami

func NewCmdWhoami(f *cmdutil.Factory) *cobra.Command

NewCmdWhoami creates the top-level whoami command. It reports the identity that the next API call would actually use (resolved via Factory.ResolveAs), together with the active profile, app, and token status. Output is always JSON — whoami is consumed by agents. With the built-in credential path it is local-only; when an external credential provider manages tokens, resolving the identity may contact that provider.

func NewCmdWhoamiWithRecovery added in v1.0.84

func NewCmdWhoamiWithRecovery(f *cmdutil.Factory, projector *recovery.Projector) *cobra.Command

NewCmdWhoamiWithRecovery creates whoami with a build-local recovery presenter while preserving NewCmdWhoami's established function signature.

Types

type Options

type Options struct {
	Factory *cmdutil.Factory
	As      string
}

Options holds inputs for the whoami command.

Jump to

Keyboard shortcuts

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