Documentation
¶
Overview ¶
Package console implements `w17ctl console` — list the consoles you are logged into and choose which one subsequent commands talk to.
Why this exists ¶
~/.w17/auth.yaml holds one entry per console (`instances`) plus a pointer at the active one (`default_instance`), and the store has always assumed the pointer is something a person moves: `RemoveInstance` clears it on logout and says in as many words that "a remaining instance is NOT auto-promoted — the user chooses explicitly". There was nothing to choose WITH. The only writer of that pointer was `login`, which sets it to whatever it just authenticated against.
That made a two-console setup a trap rather than a configuration. Signing a plugin release needs the console holding the signing key — production — while everyday work belongs on a local console: codegen, dev locks, `plugin dev`, e2e. Logging into production to publish silently moved the default there, and the next ordinary `w17ctl codegen` would ask the PRODUCTION console to sign a development lock and register a throwaway project in the production registry. Nothing fails; it just quietly happens on the wrong console.
Switching back meant hand-editing YAML, which is not a thing to put in a workflow people repeat.
Deliberately offline ¶
Choosing the active console does not call it. The pointer is local state, and requiring a round-trip would make the command unusable in the case it is most needed — the console you are leaving is down, or unreachable from here. A stale token surfaces at the next command that actually talks, with that command's own error.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Cmd struct {
List ListCmd `cmd:"" help:"List the consoles you are logged into, marking the active one."`
Use UseCmd `` /* 148-byte string literal not displayed */
}
Cmd is the `w17ctl console` group.