1
0
mirror of https://github.com/TomWright/dasel.git synced 2022-05-22 02:32:45 +03:00

Merge pull request #211 from TomWright/expose-storage-package

Expose the storage package
This commit is contained in:
Tom Wright
2022-03-28 13:49:19 +01:00
committed by GitHub
27 changed files with 30 additions and 20 deletions

View File

@@ -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
@@ -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

View File

@@ -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"
)

View File

@@ -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"

View File

@@ -3,7 +3,7 @@ package command
import (
"fmt"
"github.com/spf13/cobra"
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"io"
)

View File

@@ -2,7 +2,7 @@ package command
import (
"errors"
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"strings"
"testing"
)

View File

@@ -3,7 +3,7 @@ package command
import (
"bytes"
"fmt"
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"io"
"reflect"
"strings"

View File

@@ -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"
)

View File

@@ -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"
)

View File

@@ -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.

View File

@@ -2,7 +2,7 @@ package dasel
import (
"fmt"
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"reflect"
)

View File

@@ -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.

View File

@@ -1,7 +1,7 @@
package storage_test
import (
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"reflect"
"testing"
)

View File

@@ -1,7 +1,7 @@
package storage_test
import (
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"reflect"
"testing"
)

View File

@@ -3,7 +3,7 @@ package storage_test
import (
"bytes"
"errors"
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"reflect"
"strings"
"testing"
@@ -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

View File

@@ -2,7 +2,7 @@ package storage_test
import (
"errors"
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"testing"
)

View File

@@ -1,7 +1,7 @@
package storage_test
import (
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"reflect"
"strings"
"testing"

View File

@@ -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"
)

View File

@@ -1,7 +1,7 @@
package storage_test
import (
"github.com/tomwright/dasel/internal/storage"
"github.com/tomwright/dasel/storage"
"reflect"
"strings"
"testing"