Skip to content

Commit

Permalink
Merge pull request #211 from TomWright/expose-storage-package
Browse files Browse the repository at this point in the history
Expose the storage package
  • Loading branch information
TomWright authored Mar 28, 2022
2 parents eabe44d + 425a646 commit 46fe0a8
Show file tree
Hide file tree
Showing 27 changed files with 30 additions and 20 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Nothing yet.

## [v1.24.1] - 2022-03-28

### Changed

- `storage` package has been moved outside the `internal` package.

### Fixed

- New funcs added in `v1.24.0` can now be used as expected since you can now access the `storage.ReadWriteOption`.

## [v1.24.0] - 2022-03-18

### Added
Expand Down Expand Up @@ -428,7 +438,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Everything!

[unreleased]: https://github.com/TomWright/dasel/compare/v1.24.0...HEAD
[unreleased]: https://github.com/TomWright/dasel/compare/v1.24.1...HEAD
[v1.24.1]: https://github.com/TomWright/dasel/compare/v1.24.0...v1.24.1
[v1.24.0]: https://github.com/TomWright/dasel/compare/v1.23.0...v1.24.0
[v1.23.0]: https://github.com/TomWright/dasel/compare/v1.22.1...v1.23.0
[v1.22.1]: https://github.com/TomWright/dasel/compare/v1.22.0...v1.22.1
Expand Down
2 changes: 1 addition & 1 deletion internal/command/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"github.com/spf13/cobra"
"github.com/tomwright/dasel"
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"io"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/command/put.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"github.com/spf13/cobra"
"github.com/tomwright/dasel"
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"io"
"os"
"strconv"
Expand Down
2 changes: 1 addition & 1 deletion internal/command/put_document_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package command
import (
"fmt"
"github.com/spf13/cobra"
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"io"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/command/put_document_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package command

import (
"errors"
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"strings"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/command/put_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package command
import (
"bytes"
"fmt"
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"io"
"reflect"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion internal/command/put_object_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"github.com/spf13/cobra"
"github.com/tomwright/dasel/internal/oflag"
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"io"
"strings"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/command/select.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"github.com/spf13/cobra"
"github.com/tomwright/dasel"
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"io"
"reflect"
)
Expand Down
3 changes: 1 addition & 2 deletions node.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ package dasel

import (
"fmt"
"github.com/tomwright/dasel/storage"
"io"
"os"
"reflect"
"regexp"

"github.com/tomwright/dasel/internal/storage"
)

// Selector represents the selector for a node.
Expand Down
2 changes: 1 addition & 1 deletion node_put.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package dasel

import (
"fmt"
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"reflect"
)

Expand Down
2 changes: 1 addition & 1 deletion node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/tomwright/dasel/storage"
"reflect"
"strings"
"testing"

"github.com/tomwright/dasel"
"github.com/tomwright/dasel/internal/storage"
)

// ExampleNode_ReadmeExample tests the code from the readme explanation.
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/storage/csv_test.go → storage/csv_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package storage_test

import (
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"reflect"
"testing"
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/storage/json_test.go → storage/json_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package storage_test

import (
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"reflect"
"testing"
)
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions internal/storage/parser_test.go → storage/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package storage_test
import (
"bytes"
"errors"
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"reflect"
"strings"
"testing"
Expand Down Expand Up @@ -194,7 +194,7 @@ var jsonData = map[string]interface{}{

func TestLoadFromFile(t *testing.T) {
t.Run("ValidJSON", func(t *testing.T) {
data, err := storage.LoadFromFile("../../tests/assets/example.json", &storage.JSONParser{})
data, err := storage.LoadFromFile("../tests/assets/example.json", &storage.JSONParser{})
if err != nil {
t.Errorf("unexpected error: %s", err)
return
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/storage/plain_test.go → storage/plain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package storage_test

import (
"errors"
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"testing"
)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/storage/toml_test.go → storage/toml_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package storage_test

import (
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"reflect"
"strings"
"testing"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/storage/xml_test.go → storage/xml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package storage_test
import (
"bytes"
"fmt"
"github.com/tomwright/dasel/storage"
"io"
"reflect"
"testing"

"github.com/tomwright/dasel/internal/storage"
"golang.org/x/text/encoding/charmap"
"golang.org/x/text/encoding/unicode"
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/storage/yaml_test.go → storage/yaml_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package storage_test

import (
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"reflect"
"strings"
"testing"
Expand Down

0 comments on commit 46fe0a8

Please sign in to comment.