Skip to main content

read_token_from_stdin

Function read_token_from_stdin 

Source
pub fn read_token_from_stdin() -> Result<String, GorError>
Expand description

Read a token from stdin, trimming whitespace.

Used for piping tokens: echo gho_abc | gor auth login --with-token

§Errors

Returns an I/O error if stdin cannot be read.

§Examples

use gor::auth::token::read_token_from_stdin;

let token = read_token_from_stdin().unwrap();