Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Skye Gill <[email protected]>
Signed-off-by: James Milligan <[email protected]>
  • Loading branch information
james-milligan and skyerus authored Mar 1, 2023
1 parent 8c2b391 commit c60db46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pkg/store/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ func (f *Flags) hasPriority(stored string, new string) bool {
return true
}
for i := len(f.FlagSources) - 1; i >= 0; i-- {
if f.FlagSources[i] == stored {
switch f.FlagSources[i] {
case stored:
return false
} else if f.FlagSources[i] == new {
case new:
return true
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/sync/grpc/grpc_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (g *Sync) connectClient(ctx context.Context) error {
func (g *Sync) ReSync(ctx context.Context, dataSync chan<- sync.DataSync) error {
res, err := g.client.FetchAllFlags(ctx, &v1.FetchAllFlagsRequest{})
if err != nil {
g.Logger.Error(fmt.Sprintf("error fetching all flags: %s", err.Error()))
g.Logger.Error(fmt.Sprintf("fetching all flags: %s", err.Error()))
return err
}
dataSync <- sync.DataSync{
Expand Down

0 comments on commit c60db46

Please sign in to comment.