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:
		
							
								
								
									
										13
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								CHANGELOG.md
									
									
									
									
									
								
							| @@ -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 | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package command | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"github.com/spf13/cobra" | ||||
| 	"github.com/tomwright/dasel/internal/storage" | ||||
| 	"github.com/tomwright/dasel/storage" | ||||
| 	"io" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -2,7 +2,7 @@ package command | ||||
|  | ||||
| import ( | ||||
| 	"errors" | ||||
| 	"github.com/tomwright/dasel/internal/storage" | ||||
| 	"github.com/tomwright/dasel/storage" | ||||
| 	"strings" | ||||
| 	"testing" | ||||
| ) | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package command | ||||
| import ( | ||||
| 	"bytes" | ||||
| 	"fmt" | ||||
| 	"github.com/tomwright/dasel/internal/storage" | ||||
| 	"github.com/tomwright/dasel/storage" | ||||
| 	"io" | ||||
| 	"reflect" | ||||
| 	"strings" | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|   | ||||
							
								
								
									
										3
									
								
								node.go
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								node.go
									
									
									
									
									
								
							| @@ -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. | ||||
|   | ||||
| @@ -2,7 +2,7 @@ package dasel | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"github.com/tomwright/dasel/internal/storage" | ||||
| 	"github.com/tomwright/dasel/storage" | ||||
| 	"reflect" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -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. | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| package storage_test | ||||
| 
 | ||||
| import ( | ||||
| 	"github.com/tomwright/dasel/internal/storage" | ||||
| 	"github.com/tomwright/dasel/storage" | ||||
| 	"reflect" | ||||
| 	"testing" | ||||
| ) | ||||
| @@ -1,7 +1,7 @@ | ||||
| package storage_test | ||||
| 
 | ||||
| import ( | ||||
| 	"github.com/tomwright/dasel/internal/storage" | ||||
| 	"github.com/tomwright/dasel/storage" | ||||
| 	"reflect" | ||||
| 	"testing" | ||||
| ) | ||||
| @@ -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 | ||||
| @@ -2,7 +2,7 @@ package storage_test | ||||
| 
 | ||||
| import ( | ||||
| 	"errors" | ||||
| 	"github.com/tomwright/dasel/internal/storage" | ||||
| 	"github.com/tomwright/dasel/storage" | ||||
| 	"testing" | ||||
| ) | ||||
| 
 | ||||
| @@ -1,7 +1,7 @@ | ||||
| package storage_test | ||||
| 
 | ||||
| import ( | ||||
| 	"github.com/tomwright/dasel/internal/storage" | ||||
| 	"github.com/tomwright/dasel/storage" | ||||
| 	"reflect" | ||||
| 	"strings" | ||||
| 	"testing" | ||||
| @@ -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" | ||||
| ) | ||||
| @@ -1,7 +1,7 @@ | ||||
| package storage_test | ||||
| 
 | ||||
| import ( | ||||
| 	"github.com/tomwright/dasel/internal/storage" | ||||
| 	"github.com/tomwright/dasel/storage" | ||||
| 	"reflect" | ||||
| 	"strings" | ||||
| 	"testing" | ||||
		Reference in New Issue
	
	Block a user
	 Tom Wright
					Tom Wright