1 Keyify turns unkeyed struct literals (`T{1, 2, 3}`) into keyed
2 ones (`T{A: 1, B: 2, C: 3}`)
6 See [the main README](https://github.com/dominikh/go-tools#installation) for installation instructions.
10 Call keyify with a position such as `/some/file.go:#5`, where #5 is
11 the byte offset in the file and has to point at or into a struct
14 By default, keyify will print the new literal on stdout, formatted as
15 Go code. By using the `-json` flag, it will print a JSON object
16 denoting the start and end of the original literal, and its
17 replacement. This is useful for integration with editors.
19 For a description of all available flags, see `keyify -help`.
23 For Emacs integration, add the following to your `.emacs` file:
26 (add-to-list 'load-path "/your/gopath/src/honnef.co/go/tools/cmd/keyify)
27 (eval-after-load 'go-mode
29 (require 'go-keyify)))
32 With point on or in a struct literal, call the `go-keyify` command.
34 ![gif of keyify](http://stuff.fork-bomb.org/keyify.gif)