gowrtr

(★ 122)

gowrtr is a library that supports golang code generation

File Explorer

  • .gitignore
  • go.mod
  • go.sum
  • LICENSE
  • Makefile
  • README.md

# Use via CDN

jsDelivr

jsDelivr 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 ▼

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 ▼

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:

🔍

func

View Details ▼

Azure Functions Core Tools: develop and test Azure Functions locally.
Local functions can connect to live Azure services, and can deploy a function app to an Azure subscription.

func init {{project}}

Create a new functions project:

func new

Create a new function:

func start

Run functions locally:

🔍

gofmt

View Details ▼

Format Go source code.

gofmt {{path/to/source.go}}

Format a file and display the result to the console:

gofmt -w {{path/to/source.go}}

Format a file, overwriting the original file in-place:

gofmt -s -w {{path/to/source.go}}

Format a file, and then simplify the code, overwriting the original file:

🔍

goimports

View Details ▼

Update Go import lines, adding missing ones and removing unreferenced ones.

goimports {{path/to/file.go}}

Display the completed import source file:

goimports -w {{path/to/file.go}}

Write the result back to the source file instead of `stdout`:

goimports -w -d {{path/to/file.go}}

Display diffs and write the result back to the source file:

// repository documentation