Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 26452c82ea
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (31 sloc) 0.459 kB
package main
import (
"io/ioutil"
)
func lim(s string, i int) string {
if len(s) > i {
return s[:i]
}
return s
}
func min(a, b int) int {
if a > b {
return b
}
return a
}
func max(a, b int) int {
if a > b {
return a
}
return b
}
func mkTemp(content string) string {
f, err := ioutil.TempFile("", "masc")
if err != nil { panic(err) }
_, err = f.Write([]byte(content))
if err != nil { panic(err) }
n := f.Name()
f.Close()
return n
}
Jump to Line
Something went wrong with that request. Please try again.