unbed

command module
v0.0.0-...-e8e11cf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2022 License: BSD-3-Clause Imports: 14 Imported by: 0

README

About:

The unbed program rewrites selector expressions to avoid implicit embedded field
traversals. For example, given:

	type T struct { U }
	type U struct { f int }
	var x T

unbed can automatically rewrite all expressions "x.f" to "x.U.f".

Installation:

	$ go install github.com/mdempsky/unbed@latest

Usage:

Unbed takes a single command-line argument specifying the
package-scoped named struct type and embedded field to rewrite.

	$ unbed '"cmd/internal/obj".LSym.FuncInfo'
	Rewrote 161 selections in 20 files in 9 packages.

Similar to gorename, quotes may be omitted for single-segment package
paths like "fmt".

Caveats:

Unbed is alpha quality.

Unbed should support specifying function-scoped and anonymous structs.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL