Skip to content

Commit

Permalink
chore(kit/feature): tidy comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gavincabbage committed Apr 29, 2020
1 parent 1ac0307 commit af90346
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion kit/feature/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// A concrete example to illustrate the above:
//
// I have a feature called "My Feature" that will involve turning on new code
//// in both the UI and the server.
// in both the UI and the server.
//
// First, I add an entry to `flags.yml`.
//
Expand All @@ -51,6 +51,7 @@
// } else {
// // new code...
// }
// ```
//
// and the `/api/v2/flags` response provides the same information to the frontend.
//
Expand Down
4 changes: 2 additions & 2 deletions kit/feature/feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func Annotate(ctx context.Context, f Flagger, flags ...Flag) (context.Context, e
}

// FlagsFromContext returns the map of flags attached to the context
//by Annotate, or nil if none is found.
// by Annotate, or nil if none is found.
func FlagsFromContext(ctx context.Context) map[string]interface{} {
v, ok := ctx.Value(featureContextKey).(map[string]interface{})
if !ok {
Expand All @@ -52,7 +52,7 @@ func FlagsFromContext(ctx context.Context) map[string]interface{} {
}

// ExposedFlagsFromContext returns the filtered map of exposed flags attached
//to the context by Annotate, or nil if none is found.
// to the context by Annotate, or nil if none is found.
func ExposedFlagsFromContext(ctx context.Context) map[string]interface{} {
m := FlagsFromContext(ctx)

Expand Down

0 comments on commit af90346

Please sign in to comment.