Refacto FileStore to JSONStore
Generate check / check-changes (pull_request) Successful in 3s
Quality / check-changes (pull_request) Successful in 2s
Generate check / verify-generate (pull_request) Successful in 32s
Quality / static-checks (pull_request) Successful in 55s
Quality / run-tests (pull_request) Successful in 52s
Generate check / check-changes (pull_request) Successful in 3s
Quality / check-changes (pull_request) Successful in 2s
Generate check / verify-generate (pull_request) Successful in 32s
Quality / static-checks (pull_request) Successful in 55s
Quality / run-tests (pull_request) Successful in 52s
This commit is contained in:
@@ -113,7 +113,7 @@ func runWithIO(ctx context.Context, stdin io.Reader, stdout io.Writer) error {
|
||||
|
||||
// buildStore returns the Store implementation that BuildReport should use.
|
||||
// When --state-file is empty an EphemeralStore is used so behaviour is
|
||||
// identical to pre-persistence runs. Otherwise a JSON-backed FileStore is
|
||||
// identical to pre-persistence runs. Otherwise a JSON-backed JSONStore is
|
||||
// returned, wired to a platform-specific RecordSerializer.
|
||||
func buildStore(stateFile, platform string, figi *ofigi.Client) (internal.Store, error) {
|
||||
if stateFile == "" {
|
||||
@@ -128,7 +128,7 @@ func buildStore(stateFile, platform string, figi *ofigi.Client) (internal.Store,
|
||||
return nil, fmt.Errorf("unsupported platform for state persistence: %s", platform)
|
||||
}
|
||||
|
||||
store, err := internal.NewFileStore(stateFile, platform, serializer)
|
||||
store, err := internal.NewJSONStore(stateFile, platform, serializer)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("creating file store: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user