Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: go-yaml/yaml
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.2.8
Choose a base ref
...
head repository: go-yaml/yaml
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.3.0
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on May 6, 2020

  1. Copy the full SHA
    0b1645d View commit details
Showing with 6 additions and 0 deletions.
  1. +1 −0 apic.go
  2. +5 −0 encode_test.go
1 change: 1 addition & 0 deletions apic.go
Original file line number Diff line number Diff line change
@@ -86,6 +86,7 @@ func yaml_emitter_initialize(emitter *yaml_emitter_t) {
raw_buffer: make([]byte, 0, output_raw_buffer_size),
states: make([]yaml_emitter_state_t, 0, initial_stack_size),
events: make([]yaml_event_t, 0, initial_queue_size),
best_width: -1,
}
}

5 changes: 5 additions & 0 deletions encode_test.go
Original file line number Diff line number Diff line change
@@ -397,6 +397,11 @@ var marshalTests = []struct {
map[string]interface{}{"a": jsonNumberT("bogus")},
"a: bogus\n",
},
// Ensure that strings do not wrap
{
map[string]string{"a": "abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890 abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890 "},
"a: 'abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890 abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890 '\n",
},
}

func (s *S) TestMarshal(c *C) {