Skip to content

Instantly share code, notes, and snippets.

@0xmycf
Created February 16, 2024 14:56
Show Gist options
  • Save 0xmycf/aa44b2f94db1bcf90d630666dea816ad to your computer and use it in GitHub Desktop.
Save 0xmycf/aa44b2f94db1bcf90d630666dea816ad to your computer and use it in GitHub Desktop.
package main
type strc struct {
f1 int
}
type newtype strc
type inter interface {
f1() int
}
var x0 = strc{f1: 1}
var x newtype = newtype{f1: 1}
const y = 1
const y2 int = 1
const (
z1 = 1
z2 int = 1
)
var (
z3 = 1
z4 int = 1
)
func bla() int {
var x int
x = 1
return x
}
func (s strc) getf2() int {
return s.f1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment