open-feature / open-feature/go-sdk

Rename identifiers more idiomatically

Open
#413 0 comments 0 reactions 0 assignees View on GitHub
v2
Dominant language
Go
Stars
249
Forks
61
Avg merge
2d 10h
Merged PRs (30d)
20

Description

> Rename various identifiers to align with language best practices and conventions. For example, ErrProviderFatal instead of ProviderFatalError and ErrProviderNotReady instead of ProviderNotReadyError. There is also a WithTransactionContext function, but there is no TransactionContext type at all. I understand that transaction context is a term defined in the spec, but it is confusing to users. Instead we can document that as a go doc comment. It should be named ContextWithEvaluationContext instead. See the [OTel trace package](https://pkg.go.dev/go.opentelemetry.io/otel/trace#ContextWithRemoteSpanContext) for good names for these types of functions. Similarly, the TransactionContext function should be named EvaluationContextFromContext instead. The convention here is TypeNameFromContext and ContextWithTypeName, where TypeName is the name of the type of identifier being stored/retrieved from the context.

Rename all identifiers/functions to be more Go idiomatic.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.