mirror of
https://github.com/golang/go
synced 2024-11-18 23:14:43 -07:00
16 lines
249 B
Go
16 lines
249 B
Go
|
package highlights
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
type F struct{ bar int }
|
||
|
|
||
|
var foo = F{bar: 52} //@highlight("foo", "foo")
|
||
|
|
||
|
func Print() {
|
||
|
fmt.Println(foo) //@highlight("foo", "foo")
|
||
|
}
|
||
|
|
||
|
func (x *F) Inc() { //@highlight("x", "x")
|
||
|
x.bar++ //@highlight("x", "x")
|
||
|
}
|