Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Output multi-element TOML arrays on newlines #1461

Merged
merged 3 commits into from
Dec 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ NEW FEATURES:
* Allow override of cache directory location using environment variable
`DEPCACHEDIR`. ([#1234](https://github.com/golang/dep/pull/1234))
* Add support for template output in `dep status`. (#1389)
* Each element in a multi-item TOML array is output on its own line. (#1461)

BUG FIXES:

Expand Down
8 changes: 1 addition & 7 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
ignored = ["github.com/golang/notexist/samples","github.com/sdboyer/dep-test"]
ignored = [
"github.com/golang/notexist/samples",
"github.com/sdboyer/dep-test"
]

[[constraint]]
name = "github.com/sdboyer/deptestdos"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
ignored = ["github.com/golang/notexist/samples*","github.com/sdboyer/dep-test*"]
ignored = [
"github.com/golang/notexist/samples*",
"github.com/sdboyer/dep-test*"
]

[[constraint]]
name = "github.com/sdboyer/deptestdos"
Expand Down
6 changes: 4 additions & 2 deletions lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ func (l *Lock) toRaw() rawLock {
// MarshalTOML serializes this lock into TOML via an intermediate raw form.
func (l *Lock) MarshalTOML() ([]byte, error) {
raw := l.toRaw()
result, err := toml.Marshal(raw)
return result, errors.Wrap(err, "Unable to marshal lock to TOML string")
var buf bytes.Buffer
enc := toml.NewEncoder(&buf).ArraysWithOneElementPerLine(true)
err := enc.Encode(raw)
return buf.Bytes(), errors.Wrap(err, "Unable to marshal lock to TOML string")
}

// LockFromSolution converts a gps.Solution to dep's representation of a lock.
Expand Down
6 changes: 4 additions & 2 deletions manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,10 @@ func toProject(raw rawProject) (n gps.ProjectRoot, pp gps.ProjectProperties, err
// MarshalTOML serializes this manifest into TOML via an intermediate raw form.
func (m *Manifest) MarshalTOML() ([]byte, error) {
raw := m.toRaw()
result, err := toml.Marshal(raw)
return result, errors.Wrap(err, "unable to marshal the lock to a TOML string")
var buf bytes.Buffer
enc := toml.NewEncoder(&buf).ArraysWithOneElementPerLine(true)
err := enc.Encode(raw)
return buf.Bytes(), errors.Wrap(err, "unable to marshal the lock to a TOML string")
}

// toRaw converts the manifest into a representation suitable to write to the manifest file
Expand Down

This file was deleted.

This file was deleted.

62 changes: 0 additions & 62 deletions vendor/github.com/pelletier/go-buffruneio/README.md

This file was deleted.

117 changes: 0 additions & 117 deletions vendor/github.com/pelletier/go-buffruneio/buffruneio.go

This file was deleted.

Loading