Permalink
Browse files

runs 'gofmt -w *.go' on gopkg.in/yaml.v2

  • Loading branch information...
1 parent d466437 commit 4f03e946c120a8f146f43bee6f392f9bb5d0a677 @hkjn hkjn committed Dec 12, 2014
Showing with 8 additions and 11 deletions.
  1. +6 −8 decode.go
  2. +1 −2 yaml.go
  3. +1 −1 yamlh.go
View
@@ -32,9 +32,9 @@ type node struct {
// Parser, produces a node tree out of a libyaml event stream.
type parser struct {
- parser yaml_parser_t
- event yaml_event_t
- doc *node
+ parser yaml_parser_t
+ event yaml_event_t
+ doc *node
}
func newParser(b []byte) *parser {
@@ -194,10 +194,10 @@ type decoder struct {
}
var (
- mapItemType = reflect.TypeOf(MapItem{})
- durationType = reflect.TypeOf(time.Duration(0))
+ mapItemType = reflect.TypeOf(MapItem{})
+ durationType = reflect.TypeOf(time.Duration(0))
defaultMapType = reflect.TypeOf(map[interface{}]interface{}{})
- ifaceType = defaultMapType.Elem()
+ ifaceType = defaultMapType.Elem()
)
func newDecoder() *decoder {
@@ -503,8 +503,6 @@ func (d *decoder) sequence(n *node, out reflect.Value) (good bool) {
return true
}
-
-
func (d *decoder) mapping(n *node, out reflect.Value) (good bool) {
switch out.Kind() {
case reflect.Struct:
View
@@ -32,7 +32,6 @@ type Unmarshaler interface {
UnmarshalYAML(unmarshal func(interface{}) error) error
}
-
// The Marshaler interface may be implemented by types to customize their
// behavior when being marshaled into a YAML document. The returned value
// is marshaled in place of the original value implementing Marshaler.
@@ -164,7 +163,7 @@ func fail(err error) {
}
func failf(format string, args ...interface{}) {
- panic(yamlError{fmt.Errorf("yaml: " + format, args...)})
+ panic(yamlError{fmt.Errorf("yaml: "+format, args...)})
}
// A TypeError is returned by Unmarshal when one or more fields in
View
@@ -296,7 +296,7 @@ const (
// Not in original libyaml.
yaml_BINARY_TAG = "tag:yaml.org,2002:binary"
- yaml_MERGE_TAG = "tag:yaml.org,2002:merge"
+ yaml_MERGE_TAG = "tag:yaml.org,2002:merge"
yaml_DEFAULT_SCALAR_TAG = yaml_STR_TAG // The default scalar tag is !!str.
yaml_DEFAULT_SEQUENCE_TAG = yaml_SEQ_TAG // The default sequence tag is !!seq.

0 comments on commit 4f03e94

Please sign in to comment.