gofmt no coding standards

This commit is contained in:
obscuren
2014-01-11 15:27:08 +01:00
parent 8bbf879cb3
commit 9571a51286
14 changed files with 922 additions and 887 deletions

View File

@@ -1,35 +1,35 @@
package main
import (
"fmt"
"testing"
"encoding/json"
"encoding/json"
"fmt"
"testing"
)
type TestSource struct {
Inputs map[string]string
Expectation string
Inputs map[string]string
Expectation string
}
func NewTestSource(source string) *TestSource {
s := &TestSource{}
err := json.Unmarshal([]byte(source), s)
if err != nil {
fmt.Println(err)
}
s := &TestSource{}
err := json.Unmarshal([]byte(source), s)
if err != nil {
fmt.Println(err)
}
return s
return s
}
type TestRunner struct {
source *TestSource
source *TestSource
}
func NewTestRunner(t *testing.T) *TestRunner {
return &TestRunner{}
return &TestRunner{}
}
func (runner *TestRunner) RunFromString(input string, Cb func(*TestSource)) {
source := NewTestSource(input)
Cb(source)
source := NewTestSource(input)
Cb(source)
}