Skip to content

Commit 10f6942

Browse files
authored
Merge branch 'main' into shutdown-fix
2 parents 7a783dd + bf2d408 commit 10f6942

File tree

4 files changed

+4
-14
lines changed

4 files changed

+4
-14
lines changed

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -397,12 +397,6 @@ func (i MyFeatureProvider) Init(evaluationContext openfeature.EvaluationContext)
397397
// code to initialize your provider
398398
}
399399

400-
// Status expose the status of the provider
401-
func (i MyFeatureProvider) Status() openfeature.State {
402-
// The state is typically set during initialization.
403-
return openfeature.ReadyState
404-
}
405-
406400
// Shutdown define the shutdown operation of the provider
407401
func (i MyFeatureProvider) Shutdown() {
408402
// code to shutdown your provider

openfeature/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ func TestRequirement_1_7_1(t *testing.T) {
11911191

11921192
var clientI any = client
11931193
if _, ok := clientI.(requirements); !ok {
1194-
t.Fatal("client des not define a status accessor which indicates the readiness of the associated provider")
1194+
t.Fatal("client does not define a status accessor which indicates the readiness of the associated provider")
11951195
}
11961196

11971197
TestRequirement_5_3_5(t)

openfeature/provider.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ type Tracker interface {
7373
}
7474

7575
// NoopStateHandler is a noop StateHandler implementation
76-
// Status always set to ReadyState to comply with specification
7776
type NoopStateHandler struct{}
7877

7978
func (s *NoopStateHandler) Init(e EvaluationContext) error {
@@ -85,10 +84,6 @@ func (s *NoopStateHandler) Shutdown() {
8584
// NOOP
8685
}
8786

88-
func (s *NoopStateHandler) Status() State {
89-
return ReadyState
90-
}
91-
9287
// Eventing
9388

9489
// EventHandler is the eventing contract enforced for FeatureProvider

openfeature/resolution_error.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ func (e *ProviderInitError) Error() string {
119119
return fmt.Sprintf("ProviderInitError: %s (code: %s)", e.Message, e.ErrorCode)
120120
}
121121

122+
//nolint:staticcheck // Renaming these would be a breaking change
122123
var (
123124
// ProviderNotReadyError signifies that an operation failed because the provider is in a NOT_READY state.
124-
ProviderNotReadyError = errors.New("provider not yet initialized") //nolint:staticcheck // Renaming this would be a breaking change
125+
ProviderNotReadyError = errors.New("provider not yet initialized")
125126
// ProviderFatalError signifies that an operation failed because the provider is in a FATAL state.
126-
ProviderFatalError = errors.New("provider is in an irrecoverable error state") //nolint:staticcheck // Renaming this would be a breaking change
127+
ProviderFatalError = errors.New("provider is in an irrecoverable error state")
127128
)

0 commit comments

Comments
 (0)