An open API service indexing awesome lists of open source software.

https://github.com/xaionaro-go/hackery

About builtin Golang magic comments
https://github.com/xaionaro-go/hackery

comment go golang internals magic

Last synced: about 2 months ago
JSON representation

About builtin Golang magic comments

Awesome Lists containing this project

README

          

# Magic comments

* [`//go:generate`](https://golang.org/pkg/cmd/go/internal/generate/)
* [`//go:linkname`](https://sitano.github.io/2016/04/28/golang-private/)
* [`//go:noescape`](https://dave.cheney.net/2018/01/08/gos-hidden-pragmas)
* [`//go:noinline`](https://dave.cheney.net/2018/01/08/gos-hidden-pragmas)
* [`//go:nosplit`](https://dave.cheney.net/2018/01/08/gos-hidden-pragmas)
* [`//go:norace`](https://dave.cheney.net/2018/01/08/gos-hidden-pragmas)
* [`//line`](https://dave.cheney.net/2018/01/08/gos-hidden-pragmas)
* [`// import`](https://dave.cheney.net/2018/01/08/gos-hidden-pragmas)
* [`//go:systemstack`](https://github.com/golang/go/blob/master/src/runtime/HACKING.md)
* [`//go:nowritebarrierrec`](https://github.com/golang/go/blob/master/src/runtime/HACKING.md)
* [`//go:yeswritebarrierrec`](https://github.com/golang/go/blob/master/src/runtime/HACKING.md)
* [`//go:notinheap`](https://github.com/golang/go/blob/master/src/runtime/HACKING.md)

# Hidden (but useful) functions

To use this functions you need to use `//go:linkname`.

* [`notewakeup`](https://lk4d4.darth.io/posts/go-timers/)
* [`getg`](https://github.com/golang/go/issues/18590)

# Guides

* [Reduce the size of a binary](https://github.com/xaionaro/documentation/blob/master/golang/reduce-binary-size.md)