C-like:
func main()
(one-and-only “main” function)error
, if err != nil
, …
panic()
/ recover()
C++-like:
auto
type (:=
)io.Reader
→ Read(...) ...
interface{}
→ any
switch v := i.(type)
) ← Templatespublic
/ private
via naming conventions(Java?)-like:
a := 1
is int
, int64(1)
is int64
)unsafe.Pointer
if you really need (but Cgo = ?
)(Python?)-like:
func init()
Feature:
net/http.Server
, Caddy)context
only solves this problem partially