Golang

Functions

Printf

In this example, fmt.Printf formats and writes to standard output:

fmt.Printf("Binary: %b\\%b", 4, 5)
Binary: 100\101

Sprintf (format without printing)

Use fmt.Sprintf to format a string without printing it:

s := fmt.Sprintf("Binary: %b\\%b", 4, 5)

No output but the value is :

s == 'Binary: 100\101'

Sources

Optimization

Optimizing a golang service to reduce over 40 cpu

results matching ""

    No results matching ""

    results matching ""

      No results matching ""