Skip to content

Conversation

@pawels-optimizely
Copy link
Contributor

Summary

to be compatible with other sdk's, we are adding a check for a valid version of datafile. go-sdk supports only version 4 of datafile, same as the family of more recent sdk's.

Copy link
Contributor

@mikeproeng37 mikeproeng37 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly ok, just have a suggestion


if !inSlice(datafileVersions, datafile.Version) {
err = errors.New("unsupported datafile version")
logger.Error(fmt.Sprintf("Version %s of datafile not supported", datafile.Version), err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be useful to say unable to initialize/update or something along those lines.

Copy link
Contributor

@mikecdavis mikecdavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion to use a map as opposed to a slice based off a SO article. Also standardizing on assert.Error and assert.NoError when checking for errors.

@pawels-optimizely pawels-optimizely merged commit 952241f into master Jan 23, 2020
@pawels-optimizely pawels-optimizely deleted the pawel/OASIS-5903 branch January 23, 2020 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants