Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
# Change these variables as necessary. | |
MAIN_PACKAGE_PATH := ./cmd/example | |
BINARY_NAME := example | |
# ==================================================================================== # | |
# HELPERS | |
# ==================================================================================== # | |
## help: print this help message | |
.PHONY: help |
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
// Name of the struct tag used in examples | |
const tagName = "validate" |
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────── | |
│ printf Format Specifiers │ | |
│ ┌──────────┬──────────────────────────────────────────────────┬───────────────────────────────────────┐ │/** printf format specifiers | |
│ │ Specifier│Description │ Example Output │ │ * ███ ▄████████ ███ ▄████████ ███ █▄ ▄██████▄ | |
│ ├──────────┼──────────────────────────────────────────────────┼───────────────────────────────────────┤ │ *▀█████████▄ ███ ███ ▀█████████▄ ███ ███ ███ ███ ███ ███ | |
│ │ %d │Signed decimal integer │ printf("%d", 42); // 42 │ │ |
package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"syscall" | |
) | |
func main() { |