https://github.com/rvflash/tools
Lists of underrated tools to use and more.
https://github.com/rvflash/tools
Last synced: 2 months ago
JSON representation
Lists of underrated tools to use and more.
- Host: GitHub
- URL: https://github.com/rvflash/tools
- Owner: rvflash
- Created: 2021-05-21T20:13:39.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-04-16T14:04:20.000Z (about 2 years ago)
- Last Synced: 2025-01-28T16:16:30.597Z (4 months ago)
- Size: 9.77 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tools
Lists of underrated tools to use and more.
* Package documentation is now managed by `pkgsite` (previously `godoc`). Install it with the following command and then, in the project root , launch this command: `pkgsite`. It launches a website on http://localhost:8080 to explore the packages documentation.
```
go install golang.org/x/pkgsite/cmd/pkgsite@latest
```
* Structured logger https://pkg.go.dev/golang.org/x/exp/slog ([see the live presentaion](https://www.youtube.com/watch?v=gd_Vyb5vEw0))
* `go:embed` provides access to files embedded in the running Go program (like bo-bindata) https://pkg.go.dev/embed
* Golang Vulnerability: https://vuln.go.dev/
```
$ go install golang.org/x/vuln/cmd/govulncheck@latest
```
* Golang updates
> https://github.com/golang/dl
```
$ go install golang.org/dl/go1.19.2@latest
$ go1.19.2 download
$ ln -s /home/rv/sdk/go1.19.2 /usr/local/go
```
* Online converter from JSON to Go struct
> https://mholt.github.io/json-to-go/
* Fieldalignment: A part of gotools and govet linter, `fieldalignment` prints out misaligned structs and the current/ideal size of struct.
> https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment
```bash
fieldalignment -fix ${package_path}
```
* Stringer is a tool to automate the creation of methods that satisfy the fmt.Stringer interface.
> https://pkg.go.dev/golang.org/x/[email protected]/cmd/stringer
* Go fmt also provides an interface to perform replacements in the codes base
> https://pkg.go.dev/cmd/gofmt