vendor/gopkg.in/yaml.v2/yaml.go
changeset 256 6d9efbef00a9
parent 251 1c52a0eeb952
equal deleted inserted replaced
255:4f153a23adab 256:6d9efbef00a9
   173 //     omitempty    Only include the field if it's not set to the zero
   173 //     omitempty    Only include the field if it's not set to the zero
   174 //                  value for the type or to empty slices or maps.
   174 //                  value for the type or to empty slices or maps.
   175 //                  Zero valued structs will be omitted if all their public
   175 //                  Zero valued structs will be omitted if all their public
   176 //                  fields are zero, unless they implement an IsZero
   176 //                  fields are zero, unless they implement an IsZero
   177 //                  method (see the IsZeroer interface type), in which
   177 //                  method (see the IsZeroer interface type), in which
   178 //                  case the field will be included if that method returns true.
   178 //                  case the field will be excluded if IsZero returns true.
   179 //
   179 //
   180 //     flow         Marshal using a flow style (useful for structs,
   180 //     flow         Marshal using a flow style (useful for structs,
   181 //                  sequences and maps).
   181 //                  sequences and maps).
   182 //
   182 //
   183 //     inline       Inline the field, which must be a struct or a map,
   183 //     inline       Inline the field, which must be a struct or a map,
   462 		}
   462 		}
   463 		return true
   463 		return true
   464 	}
   464 	}
   465 	return false
   465 	return false
   466 }
   466 }
       
   467 
       
   468 // FutureLineWrap globally disables line wrapping when encoding long strings.
       
   469 // This is a temporary and thus deprecated method introduced to faciliate
       
   470 // migration towards v3, which offers more control of line lengths on
       
   471 // individual encodings, and has a default matching the behavior introduced
       
   472 // by this function.
       
   473 //
       
   474 // The default formatting of v2 was erroneously changed in v2.3.0 and reverted
       
   475 // in v2.4.0, at which point this function was introduced to help migration.
       
   476 func FutureLineWrap() {
       
   477 	disableLineWrapping = true
       
   478 }