Examples using... os.Stderr

Recent
Fscanf scans text read from r, storing successive space-separated values into successive arguments as determined by the format. It returns the number of items successfully parsed. Newlines in the input must match newlines in the format.
Fprintln formats using the default formats for its operands and writes to w. Spaces are always added between operands and a newline is appended. It returns the number of bytes written and any write error encountered.
Fprintf formats according to a format specifier and writes to w. It returns the number of bytes written and any write error encountered.
Fprint formats using the default formats for its operands and writes to w. Spaces are added between operands when neither is a string. It returns the number of bytes written and any write error encountered.
VerifyPKCS1v15 verifies an RSA PKCS#1 v1.5 signature. hashed is the result of hashing the input message using the given hash function and sig is the signature. A valid signature is indicated by returning a nil error. If hash is zero then hashed is used directly. This isn't advisable except for inter...
SignPKCS1v15 calculates the signature of hashed using RSASSA-PKCS1-V1_5-SIGN from RSA PKCS#1 v1.5. Note that hashed must be the result of hashing the input message using the given hash function. If hash is zero, hashed is signed directly. This isn't advisable except for interoperability.
EncryptOAEP encrypts the given message with RSA-OAEP.
DecryptPKCS1v15SessionKey decrypts a session key using RSA and the padding scheme from PKCS#1 v1.5. If rand != nil, it uses RSA blinding to avoid timing side-channel attacks. It returns an error if the ciphertext is the wrong length or if the ciphertext is greater than the public modulus. Otherwise,...
DecryptOAEP decrypts ciphertext using RSA-OAEP.
Return the most recent call to Scan as a []byte.
Use a Scanner to implement a simple word-count utility by scanning the input as a sequence of space-delimited tokens.
The simplest use of a Scanner, to read standard input as a set of lines.
Use a Scanner with a custom split function to parse a comma-separated list with an empty final value.
Here’s an example line filter in Go that writes a capitalized version of all input text. You can use this pattern to write your own Go line filters.
Go offers excellent support for string formatting in the printf tradition. Here are some examples of common string formatting tasks.
Defer is used to ensure that a function call is performed later in a program’s execution, usually for purposes of cleanup. defer is often used where e.g. ensure and finally would be used in other languages.