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. - 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 ## [v1.24.0] - 2022-03-18
### Added ### Added
@@ -428,7 +438,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Everything! - 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.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.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 [v1.22.1]: https://github.com/TomWright/dasel/compare/v1.22.0...v1.22.1

View File

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

View File

@@ -6,7 +6,7 @@ import (
"fmt" "fmt"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/tomwright/dasel" "github.com/tomwright/dasel"
"github.com/tomwright/dasel/internal/storage" "github.com/tomwright/dasel/storage"
"io" "io"
"os" "os"
"strconv" "strconv"

View File

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

View File

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

View File

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

View File

@@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/tomwright/dasel/internal/oflag" "github.com/tomwright/dasel/internal/oflag"
"github.com/tomwright/dasel/internal/storage" "github.com/tomwright/dasel/storage"
"io" "io"
"strings" "strings"
) )

View File

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

View File

@@ -2,12 +2,11 @@ package dasel
import ( import (
"fmt" "fmt"
"github.com/tomwright/dasel/storage"
"io" "io"
"os" "os"
"reflect" "reflect"
"regexp" "regexp"
"github.com/tomwright/dasel/internal/storage"
) )
// Selector represents the selector for a node. // Selector represents the selector for a node.

View File

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

View File

@@ -5,12 +5,12 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"github.com/tomwright/dasel/storage"
"reflect" "reflect"
"strings" "strings"
"testing" "testing"
"github.com/tomwright/dasel" "github.com/tomwright/dasel"
"github.com/tomwright/dasel/internal/storage"
) )
// ExampleNode_ReadmeExample tests the code from the readme explanation. // ExampleNode_ReadmeExample tests the code from the readme explanation.

View File

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

View File

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

View File

@@ -3,7 +3,7 @@ package storage_test
import ( import (
"bytes" "bytes"
"errors" "errors"
"github.com/tomwright/dasel/internal/storage" "github.com/tomwright/dasel/storage"
"reflect" "reflect"
"strings" "strings"
"testing" "testing"
@@ -194,7 +194,7 @@ var jsonData = map[string]interface{}{
func TestLoadFromFile(t *testing.T) { func TestLoadFromFile(t *testing.T) {
t.Run("ValidJSON", func(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 { if err != nil {
t.Errorf("unexpected error: %s", err) t.Errorf("unexpected error: %s", err)
return return

View File

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

View File

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

View File

@@ -3,11 +3,11 @@ package storage_test
import ( import (
"bytes" "bytes"
"fmt" "fmt"
"github.com/tomwright/dasel/storage"
"io" "io"
"reflect" "reflect"
"testing" "testing"
"github.com/tomwright/dasel/internal/storage"
"golang.org/x/text/encoding/charmap" "golang.org/x/text/encoding/charmap"
"golang.org/x/text/encoding/unicode" "golang.org/x/text/encoding/unicode"
) )

View File

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