Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: decode from string #3

Open
1 task
kamilsk opened this issue May 14, 2022 · 0 comments
Open
1 task

feature: decode from string #3

kamilsk opened this issue May 14, 2022 · 0 comments
Assignees
Labels
difficulty: easy Issue is easy to implement. kind: improvement New improvement proposal. scope: code Issue related to source code. scope: test Issue related to tests.

Comments

@kamilsk
Copy link
Member

kamilsk commented May 14, 2022

Motivation: there is no way to operate features (enable/disable them externally).

Draft

header := "X-Features: feature-a=true, feature-b=false"

features.Unmarshal(header)

PoC

vals := req.Header.Get(header.Features)

features.Apply(header)
if features.FindByName().Enabled {
  // do something
}

Related to octolab/protocol/issues/10.

To do:

  • Find way to decode "multi-value" header. Is ; the separator?
@kamilsk kamilsk added kind: improvement New improvement proposal. scope: code Issue related to source code. scope: test Issue related to tests. labels May 14, 2022
@kamilsk kamilsk self-assigned this May 14, 2022
@kamilsk kamilsk moved this to Backlog in 🏗 Platform May 14, 2022
@kamilsk kamilsk added the difficulty: easy Issue is easy to implement. label May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: easy Issue is easy to implement. kind: improvement New improvement proposal. scope: code Issue related to source code. scope: test Issue related to tests.
Projects
Status: Backlog
Development

No branches or pull requests

1 participant