Skip to main content

Crate goish

Crate goish 

Source

Re-exports§

pub use crate::types::*;

Modules§

bufio
bytes
chan
context
defer
errors
filepath
fmt
goroutine
io
log
math
os
prelude
range
sort
strconv
strings
sync
time
types

Macros§

Errorf
fmt.Errorf(format, args…) — returns an error with the formatted message.
Fprintf
fmt.Fprintf(w, format, args…) — writes to anything that impls io::Write. Returns (int, error).
Printf
fmt.Printf(format, args…) — Go-style verbs. Returns (int, error).
Println
fmt.Println(a, b, c) — space-separated, trailing newline. Returns (int, error).
Sprintf
fmt.Sprintf(format, args…) — returns the formatted string.
append
append!(s, x, y, z) — Go’s append(s, ...) for slices.
chan
chan!(T) → unbuffered channel (rendezvous) chan!(T, n) → buffered channel with capacity n
defer
defer!{ stmts } — run stmts at the end of the enclosing scope.
delete
delete!(m, k) — Go’s delete(m, k) builtin for maps.
go
go!{ stmts } — spawn a goroutine running the block.
len
len!(x) — Go’s polymorphic len() builtin.
log_Fatalf
log.Fatalf — like Printf, but then os.Exit(1).
log_Panic
log.Panic — like Printf, but then panic!.
log_Printf
log.Printf(fmt, …) — Go-style verbs, written to stderr with timestamp.
log_Println
log.Println(a, b, c) — space-separated, newline-terminated, stderr.
make
make!(...) — Go’s make() builtin: allocate empty/sized container.
map
Two forms — pick the one closest to your Go original:
range
range!(x, |i, v| body) — Go’s for i, v := range x { body } pattern.
slice
Three forms — pick the one closest to your Go original:
stringer
Generate Stringer + Display + an inherent String() method from one Go-style block.