metaprogramming-go
Example project for an article Metaprogramming with Go
File Explorer
- main.go
- schema.sql
- main.go
- product.go
- mapping.go
- mapping_product_gen.go
- repository_product.go
- go.mod
- go.sum
- LICENSE
- README.md
# Use via CDN
jsDelivrjsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.
Command Glossary
Commands referenced in this DOCs, explained below.
interface
View Details ▼
interface
Manage interfaces.
Accessed in configuration mode.
interface vlan {{1}}
Configure a VLAN:
{{no shutdown|shutdown}}
Set an interface to be active or inactive (this is run inside the interface command):
fmt
View Details ▼
fmt
Reformat a text file by joining its paragraphs and limiting the line width to a number of characters (75 by default).
fmt {{path/to/file}}
Reformat a file:
fmt {{[-w|--width]}} {{n}} {{path/to/file}}
Reformat a file producing output lines of (at most) `n` characters:
fmt {{[-s|--split-only]}} {{path/to/file}}
Reformat a file without joining lines shorter than the given width together:
go generate
View Details ▼
go generate
Generate Go files by running commands within source files.
go generate
Generate Go files by running commands within source files:
go run
View Details ▼
go run
Compile and run Go code without saving a binary.
go run {{path/to/file.go}}
Run a Go file:
go run {{path/to/package}}
Run a main Go package:
strings
View Details ▼
strings
Find printable strings in an object file or binary.
strings {{path/to/file}}
Print all strings in a binary:
strings {{[-n|--bytes]}} {{n}} {{path/to/file}}
Limit results to strings at least n characters long:
strings {{[-t|--radix]}} d {{path/to/file}}
Prefix each result with its offset within the file:
