-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathREADME
More file actions
31 lines (19 loc) · 730 Bytes
/
README
File metadata and controls
31 lines (19 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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.