package main
import (
- big "gmp"
"fmt"
+ big "gmp"
"runtime"
)
package main
import (
- "swig/callback"
"fmt"
+ "swig/callback"
)
type GoCallback struct{}
&fileInfo{
name,
os.ModeDir,
- 0, // no size for directory
- time.Time{}, // no mtime for directory
+ 0, // no size for directory
+ time.Time{}, // no mtime for directory
},
nil,
fs.list[index:],
//
func timefileinfoIsOld(f *ast.File, typeof map[interface{}]string) bool {
old := false
-
+
// called records the expressions that appear as
// the function part of a function call, so that
// we can distinguish a ref to the possibly new time.UTC
}
var writeTests = []WriteTest{
- WriteTest{
+ {
Name: "foo",
Data: []byte("Rabbits, guinea pigs, gophers, marsupial rats, and quolls."),
Method: Store,
},
- WriteTest{
+ {
Name: "bar",
Data: nil, // large data set in the test
Method: Deflate,
Type: ElementNode,
Data: "p",
Attr: []Attribute{
- Attribute{
+ {
Key: "id",
Val: "A",
},
- Attribute{
+ {
Key: "foo",
Val: `abc"def`,
},
Type: ElementNode,
Data: "b",
Attr: []Attribute{
- Attribute{
+ {
Key: "empty",
Val: "",
},
Type: ElementNode,
Data: "i",
Attr: []Attribute{
- Attribute{
+ {
Key: "backslash",
Val: `\`,
},
// commit applies changes to actions and template calls needed to contextually
// autoescape content and adds any derived templates to the set.
func (e *escaper) commit() {
- for name, _ := range e.output {
+ for name := range e.output {
e.template(name).Funcs(funcMap)
}
for _, t := range e.derived {
for n0, m := range redundantFuncs {
f0 := funcMap[n0].(func(...interface{}) string)
- for n1, _ := range m {
+ for n1 := range m {
f1 := funcMap[n1].(func(...interface{}) string)
for _, input := range inputs {
want := f0(input)