Skip to content

Commit

Permalink
Merge pull request #412 from dseevr/goreportcardlol
Browse files Browse the repository at this point in the history
volmigrate: fix golint and misspell errors flagged by Go Report Card
  • Loading branch information
Erik Hollensbe committed Aug 16, 2016
2 parents 031f172 + 9f0c1a4 commit 0df3e03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion volmigrate/backend/backend.go
@@ -1,11 +1,12 @@
package backend

// SchemaVersionKey is the path to the key which holds the current schema version of our namespace.
const SchemaVersionKey = "schema-version"

// Backend defines the interface for a type which implements the functionality to talk
// to a given datastore (etcd2, etcd3, consul, etc.)
type Backend interface {
// CurrentSchemaVersion returns the version of the last migration which was successfuly run.
// CurrentSchemaVersion returns the version of the last migration which was successfully run.
// This is used to ensure that the migration we're about to run hasn't been run already.
// If the version key does not exist, it will return 0.
CurrentSchemaVersion() int64
Expand Down
3 changes: 2 additions & 1 deletion volmigrate/backend/etcd2/etcd2.go
Expand Up @@ -13,6 +13,7 @@ import (
"golang.org/x/net/context"
)

// New creates a new etcd2 migration engine.
func New(prefix string, etcdHosts []string) *Engine {
etcdCfg := client.Config{
Endpoints: etcdHosts,
Expand All @@ -35,7 +36,7 @@ type Engine struct {
prefix string
}

// CurrentSchemaVersion returns the version of the last migration which was successfuly run.
// CurrentSchemaVersion returns the version of the last migration which was successfully run.
// If no previous migrations have been run, the schema version is 0.
// If there's any error besides "key doesn't exist", execution is aborted.
func (e *Engine) CurrentSchemaVersion() int64 {
Expand Down

0 comments on commit 0df3e03

Please sign in to comment.