Repository: ovn-org/libovsdb
Pull request #157 (2021-06-11 14:34:10)

Moar linting
This PR adds `revive`, `goimports`, `gocyclo`, and `misspell` to the list of linters.
It fixes any found issues, and bumps golangci-lint to the latest version


Patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 51622e3..10f1928 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -30,7 +30,7 @@ jobs:
     - name: golangci-lint
       uses: golangci/golangci-lint-action@v2
       with:
-        version: v1.39
+        version: v1.40.1
 
     - name: Check Formatting
       run: make fmt
diff --git a/.golangci.yml b/.golangci.yml
index 216269c..c046a6e 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -3,9 +3,13 @@ linters:
   enable:
     - deadcode
     - errcheck
+    - gocyclo
+    - goimports
     - gosimple
     - govet
     - ineffassign
+    - misspell
+    - revive
     - staticcheck
     - structcheck
     - typecheck
diff --git a/README.md b/README.md
index 1472d2e..fd31b0a 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 libovsdb
 ========
 
-[![libovsb-ci](https://github.com/ovn-org/libovsdb/actions/workflows/ci.yml/badge.svg)](https://github.com/ovn-org/libovsdb/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/github/ovn-org/libovsdb/badge.svg?branch=main)](https://coveralls.io/github/ovn-org/libovsdb?branch=main)
+[![libovsb-ci](https://github.com/ovn-org/libovsdb/actions/workflows/ci.yml/badge.svg)](https://github.com/ovn-org/libovsdb/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/github/ovn-org/libovsdb/badge.svg?branch=main)](https://coveralls.io/github/ovn-org/libovsdb?branch=main) [![Go Report Card](https://goreportcard.com/badge/github.com/ovn-org/libovsdb)](https://goreportcard.com/report/github.com/ovn-org/libovsdb)
 
 An OVSDB Library written in Go
 
@@ -69,11 +69,11 @@ create an equality condition (using `ovsdb.ConditionEqual`) on the `_uuid` field
             return strings.HasPrefix(ls.Name, "ext_")
     }).List(&lsList)
 
-The table is infered from the type that the function accepts as only argument.
+The table is inferred from the type that the function accepts as only argument.
 
 ## Documentation
 
-This package is divided into several subpackages. Documentation for each subpackage is available at [pkg.go.dev][doc]:
+This package is divided into several sub-packages. Documentation for each sub-package is available at [pkg.go.dev][doc]:
 
 * **client**: ovsdb client and API [![godoc for libovsdb/client][clientbadge]][clientdoc]
 * **mapper**: mapping from tagged structs to ovsdb types [![godoc for libovsdb/mapper][mapperbadge]][mapperdoc]
@@ -209,7 +209,7 @@ It can be used as follows:
             Package name (default "ovsmodel")
 
 The result will be the definition of a Model per table defined in the ovsdb schema file.
-Additionally, a function called `FullDatabaseModel()` that retuns the `DBModel` is created for convenience.
+Additionally, a function called `FullDatabaseModel()` that returns the `DBModel` is created for convenience.
 
 Example:
 
@@ -217,7 +217,7 @@ Download the schema:
 
     ovsdb-client get-schema "tcp:localhost:6641" > mypackage/ovs-nb.ovsschema
 
-Run `go gennerate`
+Run `go generate`
 
     cat <<EOF > mypackage/gen.go
     package mypackage
@@ -263,7 +263,7 @@ Mac users can use [boot2docker](http://boot2docker.io)
     # exit
     docker-compose down
 
-By invoking the command **make**, you will automatically get the same behaviour as what
+By invoking the command **make**, you will automatically get the same behavior as what
 is shown above. In other words, it will start the two containers and execute
 **make test-local** from the test container.
 
diff --git a/cache/cache.go b/cache/cache.go
index d8add17..fc32362 100644
--- a/cache/cache.go
+++ b/cache/cache.go
@@ -93,7 +93,7 @@ func (r *RowCache) create(uuid string, m model.Model) error {
 	if reflect.TypeOf(m) != r.dataType {
 		return fmt.Errorf("expected data of type %s, but got %s", r.dataType.String(), reflect.TypeOf(m).String())
 	}
-	info, err := mapper.NewMapperInfo(&r.schema, m)
+	info, err := mapper.NewInfo(&r.schema, m)
 	if err != nil {
 		return err
 	}
@@ -146,11 +146,11 @@ func (r *RowCache) update(uuid string, m model.Model) error {
 		return fmt.Errorf("row %s does not exist", uuid)
 	}
 	oldRow := r.cache[uuid]
-	oldInfo, err := mapper.NewMapperInfo(&r.schema, oldRow)
+	oldInfo, err := mapper.NewInfo(&r.schema, oldRow)
 	if err != nil {
 		return err
 	}
-	newInfo, err := mapper.NewMapperInfo(&r.schema, m)
+	newInfo, err := mapper.NewInfo(&r.schema, m)
 	if err != nil {
 		return err
 	}
@@ -232,7 +232,7 @@ func (r *RowCache) delete(uuid string) error {
 		return fmt.Errorf("row %s does not exist", uuid)
 	}
 	oldRow := r.cache[uuid]
-	oldInfo, err := mapper.NewMapperInfo(&r.schema, oldRow)
+	oldInfo, err := mapper.NewInfo(&r.schema, oldRow)
 	if err != nil {
 		return err
 	}
@@ -320,11 +320,11 @@ type TableCache struct {
 	dbModel        *model.DBModel
 }
 
-// CacheData is the type for data that can be prepoulated in the cache
-type CacheData map[string]map[string]model.Model
+// Data is the type for data that can be prepoulated in the cache
+type Data map[string]map[string]model.Model
 
 // NewTableCache creates a new TableCache
-func NewTableCache(schema *ovsdb.DatabaseSchema, dbModel *model.DBModel, data CacheData) (*TableCache, error) {
+func NewTableCache(schema *ovsdb.DatabaseSchema, dbModel *model.DBModel, data Data) (*TableCache, error) {
 	if schema == nil || dbModel == nil {
 		return nil, fmt.Errorf("tablecache without databasemodel cannot be populated")
 	}
@@ -468,7 +468,7 @@ func (t *TableCache) Populate(tableUpdates ovsdb.TableUpdates) {
 	}
 }
 
-// AddEventHandler registers the supplied EventHandler to recieve cache events
+// AddEventHandler registers the supplied EventHandler to receive cache events
 func (t *TableCache) AddEventHandler(handler EventHandler) {
 	t.eventProcessor.AddEventHandler(handler)
 }
@@ -565,7 +565,7 @@ func (e *eventProcessor) AddEvent(eventType string, table string, old model.Mode
 // Run runs the eventProcessor loop.
 // It will block until the stopCh has been closed
 // Otherwise it will wait for events to arrive on the event channel
-// Once recieved, it will dispatch the event to each registered handler
+// Once received, it will dispatch the event to each registered handler
 func (e *eventProcessor) Run(stopCh <-chan struct{}) {
 	for {
 		select {
@@ -588,7 +588,7 @@ func (e *eventProcessor) Run(stopCh <-chan struct{}) {
 	}
 }
 
-// createModel creates a new Model instance based on the Row information
+// CreateModel creates a new Model instance based on the Row information
 func (t *TableCache) CreateModel(tableName string, row *ovsdb.Row, uuid string) (model.Model, error) {
 	table := t.mapper.Schema.Table(tableName)
 	if table == nil {
@@ -605,7 +605,7 @@ func (t *TableCache) CreateModel(tableName string, row *ovsdb.Row, uuid string)
 	}
 
 	if uuid != "" {
-		mapperInfo, err := mapper.NewMapperInfo(table, model)
+		mapperInfo, err := mapper.NewInfo(table, model)
 		if err != nil {
 			return nil, err
 		}
@@ -617,7 +617,7 @@ func (t *TableCache) CreateModel(tableName string, row *ovsdb.Row, uuid string)
 	return model, nil
 }
 
-func hashColumnValues(info *mapper.MapperInfo, columns []string) (string, error) {
+func hashColumnValues(info *mapper.Info, columns []string) (string, error) {
 	var buf bytes.Buffer
 	enc := gob.NewEncoder(&buf)
 	for _, column := range columns {
diff --git a/client/api.go b/client/api.go
index 18fd1d4..7a95760 100644
--- a/client/api.go
+++ b/client/api.go
@@ -73,7 +73,7 @@ type ConditionalAPI interface {
 	// the fields to be updated
 	Update(model.Model, ...interface{}) ([]ovsdb.Operation, error)
 
-	// Delete returns the Operations needed to delete the models seleted via the condition
+	// Delete returns the Operations needed to delete the models selected via the condition
 	Delete() ([]ovsdb.Operation, error)
 }
 
@@ -224,17 +224,17 @@ func (a api) Get(m model.Model) error {
 	}
 
 	// If model contains _uuid value, we can access it via cache index
-	mapperInfo, err := mapper.NewMapperInfo(a.cache.Mapper().Schema.Table(table), m)
+	mapperInfo, err := mapper.NewInfo(a.cache.Mapper().Schema.Table(table), m)
 	if err != nil {
 		return err
 	}
 	if uuid, err := mapperInfo.FieldByColumn("_uuid"); err != nil && uuid != nil {
-		if found := tableCache.Row(uuid.(string)); found == nil {
+		found := tableCache.Row(uuid.(string))
+		if found == nil {
 			return ErrNotFound
-		} else {
-			reflect.ValueOf(m).Elem().Set(reflect.Indirect(reflect.ValueOf(found)))
-			return nil
 		}
+		reflect.ValueOf(m).Elem().Set(reflect.Indirect(reflect.ValueOf(found)))
+		return nil
 	}
 
 	// Look across the entire cache for table index equality
@@ -253,7 +253,7 @@ func (a api) Get(m model.Model) error {
 }
 
 // Create is a generic function capable of creating any row in the DB
-// A valud Model (pointer to object) must be provided.
+// A valid Model (pointer to object) must be provided.
 func (a api) Create(models ...model.Model) ([]ovsdb.Operation, error) {
 	var operations []ovsdb.Operation
 
@@ -269,7 +269,7 @@ func (a api) Create(models ...model.Model) ([]ovsdb.Operation, error) {
 		table := a.cache.Mapper().Schema.Table(tableName)
 
 		// Read _uuid field, and use it as named-uuid
-		info, err := mapper.NewMapperInfo(table, model)
+		info, err := mapper.NewInfo(table, model)
 		if err != nil {
 			return nil, err
 		}
@@ -300,7 +300,7 @@ func (a api) Mutate(model model.Model, mutationObjs ...model.Mutation) ([]ovsdb.
 	var operations []ovsdb.Operation
 
 	if len(mutationObjs) < 1 {
-		return nil, fmt.Errorf("At least one Mutation must be provided")
+		return nil, fmt.Errorf("at least one Mutation must be provided")
 	}
 
 	tableName := a.cache.DBModel().FindTable(reflect.ValueOf(model).Type())
@@ -314,7 +314,7 @@ func (a api) Mutate(model model.Model, mutationObjs ...model.Mutation) ([]ovsdb.
 		return nil, err
 	}
 
-	info, err := mapper.NewMapperInfo(table, model)
+	info, err := mapper.NewInfo(table, model)
 	if err != nil {
 		return nil, err
 	}
diff --git a/client/client.go b/client/client.go
index 12d7f2c..5ceba61 100644
--- a/client/client.go
+++ b/client/client.go
@@ -146,7 +146,7 @@ func newRPC2Client(conn net.Conn, database *model.DBModel) (*OvsdbClient, error)
 	return ovs, nil
 }
 
-// Register registers the supplied NotificationHandler to recieve OVSDB Notifications
+// Register registers the supplied NotificationHandler to receive OVSDB Notifications
 func (ovs *OvsdbClient) Register(handler ovsdb.NotificationHandler) {
 	ovs.handlersMutex.Lock()
 	defer ovs.handlersMutex.Unlock()
@@ -163,7 +163,7 @@ func getHandlerIndex(handler ovsdb.NotificationHandler, handlers []ovsdb.Notific
 	return -1, fmt.Errorf("handler not found")
 }
 
-// Unregister the supplied NotificationHandler to not recieve OVSDB Notifications anymore
+// Unregister the supplied NotificationHandler to not receive OVSDB Notifications anymore
 func (ovs *OvsdbClient) Unregister(handler ovsdb.NotificationHandler) error {
 	ovs.handlersMutex.Lock()
 	defer ovs.handlersMutex.Unlock()
@@ -339,7 +339,7 @@ func (ovs OvsdbClient) Disconnect() {
 // We add this wrapper to allow users to access the API directly on the
 // client object
 
-// Ensure client implementes API
+// Ensure client implements API
 var _ API = OvsdbClient{}
 
 //Get implements the API interface's Get function
@@ -347,7 +347,7 @@ func (ovs OvsdbClient) Get(model model.Model) error {
 	return ovs.api.Get(model)
 }
 
-//Create implementes the API interface's Create function
+//Create implements the API interface's Create function
 func (ovs OvsdbClient) Create(models ...model.Model) ([]ovsdb.Operation, error) {
 	return ovs.api.Create(models...)
 }
diff --git a/client/options.go b/client/options.go
index d28c06d..27cc81c 100644
--- a/client/options.go
+++ b/client/options.go
@@ -42,7 +42,7 @@ func WithTLSConfig(cfg *tls.Config) Option {
 
 // WithEndpoint sets the endpoint to be used by the client
 // It can be used multiple times, and the first endpoint that
-// sucessfully connects will be used:
+// successfully connects will be used:
 func WithEndpoint(endpoint string) Option {
 	return func(o *options) error {
 		ep, err := url.Parse(endpoint)
diff --git a/mapper/info.go b/mapper/info.go
index a6fe57b..934963d 100644
--- a/mapper/info.go
+++ b/mapper/info.go
@@ -7,9 +7,9 @@ import (
 	"github.com/ovn-org/libovsdb/ovsdb"
 )
 
-// MapperInfo is a struct that handles the type map of an object
+// Info is a struct that handles the type map of an object
 // The object must have exported tagged fields with the 'ovs'
-type MapperInfo struct {
+type Info struct {
 	// FieldName indexed by column
 	fields map[string]string
 	obj    interface{}
@@ -17,27 +17,27 @@ type MapperInfo struct {
 }
 
 // FieldByColumn returns the field value that corresponds to a column
-func (mi *MapperInfo) FieldByColumn(column string) (interface{}, error) {
-	fieldName, ok := mi.fields[column]
+func (i *Info) FieldByColumn(column string) (interface{}, error) {
+	fieldName, ok := i.fields[column]
 	if !ok {
 		return nil, fmt.Errorf("column %s not found in orm info", column)
 	}
-	return reflect.ValueOf(mi.obj).Elem().FieldByName(fieldName).Interface(), nil
+	return reflect.ValueOf(i.obj).Elem().FieldByName(fieldName).Interface(), nil
 }
 
 // FieldByColumn returns the field value that corresponds to a column
-func (mi *MapperInfo) hasColumn(column string) bool {
-	_, ok := mi.fields[column]
+func (i *Info) hasColumn(column string) bool {
+	_, ok := i.fields[column]
 	return ok
 }
 
 // SetField sets the field in the column to the specified value
-func (mi *MapperInfo) SetField(column string, value interface{}) error {
-	fieldName, ok := mi.fields[column]
+func (i *Info) SetField(column string, value interface{}) error {
+	fieldName, ok := i.fields[column]
 	if !ok {
 		return fmt.Errorf("column %s not found in orm info", column)
 	}
-	fieldValue := reflect.ValueOf(mi.obj).Elem().FieldByName(fieldName)
+	fieldValue := reflect.ValueOf(i.obj).Elem().FieldByName(fieldName)
 
 	if !fieldValue.Type().AssignableTo(reflect.TypeOf(value)) {
 		return fmt.Errorf("column %s: native value %v (%s) is not assignable to field %s (%s)",
@@ -48,17 +48,17 @@ func (mi *MapperInfo) SetField(column string, value interface{}) error {
 }
 
 // ColumnByPtr returns the column name that corresponds to the field by the field's pminter
-func (mi *MapperInfo) ColumnByPtr(fieldPtr interface{}) (string, error) {
+func (i *Info) ColumnByPtr(fieldPtr interface{}) (string, error) {
 	fieldPtrVal := reflect.ValueOf(fieldPtr)
 	if fieldPtrVal.Kind() != reflect.Ptr {
 		return "", ovsdb.NewErrWrongType("ColumnByPminter", "pminter to a field in the struct", fieldPtr)
 	}
-	offset := fieldPtrVal.Pointer() - reflect.ValueOf(mi.obj).Pointer()
-	objType := reflect.TypeOf(mi.obj).Elem()
-	for i := 0; i < objType.NumField(); i++ {
-		if objType.Field(i).Offset == offset {
-			column := objType.Field(i).Tag.Get("ovsdb")
-			if _, ok := mi.fields[column]; !ok {
+	offset := fieldPtrVal.Pointer() - reflect.ValueOf(i.obj).Pointer()
+	objType := reflect.TypeOf(i.obj).Elem()
+	for j := 0; j < objType.NumField(); j++ {
+		if objType.Field(j).Offset == offset {
+			column := objType.Field(j).Tag.Get("ovsdb")
+			if _, ok := i.fields[column]; !ok {
 				return "", fmt.Errorf("field does not have orm column information")
 			}
 			return column, nil
@@ -69,25 +69,25 @@ func (mi *MapperInfo) ColumnByPtr(fieldPtr interface{}) (string, error) {
 
 // getValidIndexes inspects the object and returns the a list of indexes (set of columns) for witch
 // the object has non-default values
-func (mi *MapperInfo) getValidIndexes() ([][]string, error) {
+func (i *Info) getValidIndexes() ([][]string, error) {
 	var validIndexes [][]string
 	var possibleIndexes [][]string
 
 	possibleIndexes = append(possibleIndexes, []string{"_uuid"})
-	possibleIndexes = append(possibleIndexes, mi.table.Indexes...)
+	possibleIndexes = append(possibleIndexes, i.table.Indexes...)
 
 	// Iterate through indexes and validate them
 OUTER:
 	for _, idx := range possibleIndexes {
 		for _, col := range idx {
-			if !mi.hasColumn(col) {
+			if !i.hasColumn(col) {
 				continue OUTER
 			}
-			columnSchema := mi.table.Column(col)
+			columnSchema := i.table.Column(col)
 			if columnSchema == nil {
 				continue OUTER
 			}
-			field, err := mi.FieldByColumn(col)
+			field, err := i.FieldByColumn(col)
 			if err != nil {
 				return nil, err
 			}
@@ -100,8 +100,8 @@ OUTER:
 	return validIndexes, nil
 }
 
-// NewMapperInfo creates a MapperInfo structure around an object based on a given table schema
-func NewMapperInfo(table *ovsdb.TableSchema, obj interface{}) (*MapperInfo, error) {
+// NewInfo creates a MapperInfo structure around an object based on a given table schema
+func NewInfo(table *ovsdb.TableSchema, obj interface{}) (*Info, error) {
 	objPtrVal := reflect.ValueOf(obj)
 	if objPtrVal.Type().Kind() != reflect.Ptr {
 		return nil, ovsdb.NewErrWrongType("NewMapperInfo", "pminter to a struct", obj)
@@ -145,7 +145,7 @@ func NewMapperInfo(table *ovsdb.TableSchema, obj interface{}) (*MapperInfo, erro
 		fields[colName] = field.Name
 	}
 
-	return &MapperInfo{
+	return &Info{
 		fields: fields,
 		obj:    obj,
 		table:  table,
diff --git a/mapper/mapper.go b/mapper/mapper.go
index b49fe55..5578d0f 100644
--- a/mapper/mapper.go
+++ b/mapper/mapper.go
@@ -76,7 +76,7 @@ func (m Mapper) getData(tableName string, ovsData ovsdb.Row, result interface{})
 		return newErrNoTable(tableName)
 	}
 
-	mapperInfo, err := NewMapperInfo(table, result)
+	mapperInfo, err := NewInfo(table, result)
 	if err != nil {
 		return err
 	}
@@ -107,14 +107,14 @@ func (m Mapper) getData(tableName string, ovsData ovsdb.Row, result interface{})
 }
 
 // NewRow transforms an orm struct to a map[string] interface{} that can be used as libovsdb.Row
-// By default, default or null values are skipped. This behaviour can be modified by specifying
+// By default, default or null values are skipped. This behavior can be modified by specifying
 // a list of fields (pointers to fields in the struct) to be added to the row
 func (m Mapper) NewRow(tableName string, data interface{}, fields ...interface{}) (ovsdb.Row, error) {
 	table := m.Schema.Table(tableName)
 	if table == nil {
 		return nil, newErrNoTable(tableName)
 	}
-	mapperInfo, err := NewMapperInfo(table, data)
+	mapperInfo, err := NewInfo(table, data)
 	if err != nil {
 		return nil, err
 	}
@@ -165,7 +165,7 @@ func (m Mapper) NewRow(tableName string, data interface{}, fields ...interface{}
 // A list of valid columns that shall be used as a index can be provided.
 // If none are provided, we will try to use object's field that matches the '_uuid' ovsdb tag
 // If it does not exist or is null (""), then we will traverse all of the table indexes and
-// use the first index (list of simultaneously unique columnns) for which the provided mapper
+// use the first index (list of simultaneously unique columns) for which the provided mapper
 // object has valid data. The order in which they are traversed matches the order defined
 // in the schema.
 // By `valid data` we mean non-default data.
@@ -178,7 +178,7 @@ func (m Mapper) NewEqualityCondition(tableName string, data interface{}, fields
 		return nil, newErrNoTable(tableName)
 	}
 
-	mapperInfo, err := NewMapperInfo(table, data)
+	mapperInfo, err := NewInfo(table, data)
 	if err != nil {
 		return nil, err
 	}
@@ -237,7 +237,7 @@ func (m Mapper) EqualFields(tableName string, one, other interface{}, fields ...
 		return false, newErrNoTable(tableName)
 	}
 
-	info, err := NewMapperInfo(table, one)
+	info, err := NewInfo(table, one)
 	if err != nil {
 		return false, err
 	}
@@ -258,7 +258,7 @@ func (m Mapper) NewCondition(tableName string, data interface{}, field interface
 		return nil, newErrNoTable(tableName)
 	}
 
-	info, err := NewMapperInfo(table, data)
+	info, err := NewInfo(table, data)
 	if err != nil {
 		return nil, err
 	}
@@ -288,7 +288,7 @@ func (m Mapper) NewCondition(tableName string, data interface{}, field interface
 
 }
 
-// newMutation creates a RFC7047 mutation object based on an ORM object and the mutation fields (in native format)
+// NewMutation creates a RFC7047 mutation object based on an ORM object and the mutation fields (in native format)
 // It takes care of field validation against the column type
 func (m Mapper) NewMutation(tableName string, data interface{}, column string, mutator ovsdb.Mutator, value interface{}) (*ovsdb.Mutation, error) {
 	table := m.Schema.Table(tableName)
@@ -296,7 +296,7 @@ func (m Mapper) NewMutation(tableName string, data interface{}, column string, m
 		return nil, newErrNoTable(tableName)
 	}
 
-	mapperInfo, err := NewMapperInfo(table, data)
+	mapperInfo, err := NewInfo(table, data)
 	if err != nil {
 		return nil, err
 	}
@@ -316,7 +316,7 @@ func (m Mapper) NewMutation(tableName string, data interface{}, column string, m
 
 	var ovsValue interface{}
 	if mutator == "delete" && columnSchema.Type == ovsdb.TypeMap {
-		// It's OK to cast the value to a list of elemets because validation has passed
+		// It's OK to cast the value to a list of elements because validation has passed
 		ovsSet, err := ovsdb.NewOvsSet(value)
 		if err != nil {
 			return nil, err
@@ -333,7 +333,7 @@ func (m Mapper) NewMutation(tableName string, data interface{}, column string, m
 }
 
 // equalIndexes returns whether both models are equal from the DB point of view
-// Two objectes are considered equal if any of the following conditions is true
+// Two objects are considered equal if any of the following conditions is true
 // They have a field tagged with column name '_uuid' and their values match
 // For any of the indexes defined in the Table Schema, the values all of its columns are simultaneously equal
 // (as per RFC7047)
@@ -341,11 +341,11 @@ func (m Mapper) NewMutation(tableName string, data interface{}, column string, m
 func (m Mapper) equalIndexes(table *ovsdb.TableSchema, one, other interface{}, indexes ...string) (bool, error) {
 	match := false
 
-	oneMapperInfo, err := NewMapperInfo(table, one)
+	oneMapperInfo, err := NewInfo(table, one)
 	if err != nil {
 		return false, err
 	}
-	otherMapperInfo, err := NewMapperInfo(table, other)
+	otherMapperInfo, err := NewInfo(table, other)
 	if err != nil {
 		return false, err
 	}
diff --git a/model/model.go b/model/model.go
index 693ac25..3c201e3 100644
--- a/model/model.go
+++ b/model/model.go
@@ -40,7 +40,7 @@ func (db DBModel) NewModel(table string) (Model, error) {
 	return model.Interface().(Model), nil
 }
 
-// GetTypes returns the DBModel Types
+// Types returns the DBModel Types
 // the DBModel types is a map of reflect.Types indexed by string
 // The reflect.Type is a pointer to a struct that contains 'ovs' tags
 // as described above. Such pointer to struct also implements the Model interface
@@ -83,7 +83,7 @@ func (db DBModel) Validate(schema *ovsdb.DatabaseSchema) []error {
 			errors = append(errors, err)
 			continue
 		}
-		if _, err := mapper.NewMapperInfo(tableSchema, model); err != nil {
+		if _, err := mapper.NewInfo(tableSchema, model); err != nil {
 			errors = append(errors, err)
 		}
 	}
diff --git a/modelgen/dbmodel.go b/modelgen/dbmodel.go
index 77a1ed8..005976f 100644
--- a/modelgen/dbmodel.go
+++ b/modelgen/dbmodel.go
@@ -7,8 +7,8 @@ import (
 	"github.com/ovn-org/libovsdb/ovsdb"
 )
 
-// BASE_DB_TEMPLATE is the base DBModel template
-// It includes the following other templates that can be overriden to customize the generated file
+// NewDBTemplate return a new DBModel template
+// It includes the following other templates that can be overridden to customize the generated file
 // "header"
 // "preDBDefinitions"
 // "postDBDefinitions"
diff --git a/modelgen/generator.go b/modelgen/generator.go
index 9247b96..6d8e0d2 100644
--- a/modelgen/generator.go
+++ b/modelgen/generator.go
@@ -46,14 +46,12 @@ func (g *generator) Generate(filename string, tmpl *template.Template, args inte
 		log.Print(string(src))
 		fmt.Print("\n")
 		return nil
-	} else {
-		content, err := ioutil.ReadFile(filename)
-		if err == nil && bytes.Equal(content, src) {
-			return nil
-		} else {
-			return ioutil.WriteFile(filename, src, 0644)
-		}
 	}
+	content, err := ioutil.ReadFile(filename)
+	if err == nil && bytes.Equal(content, src) {
+		return nil
+	}
+	return ioutil.WriteFile(filename, src, 0644)
 }
 
 // NewGenerator returns a new Generator
diff --git a/modelgen/table.go b/modelgen/table.go
index 74a8d9b..c31dd5f 100644
--- a/modelgen/table.go
+++ b/modelgen/table.go
@@ -10,7 +10,7 @@ import (
 )
 
 // NewTableTemplate returns a new table template
-// It includes the following other templates that can be overriden to customize the generated file
+// It includes the following other templates that can be overridden to customize the generated file
 // "header"
 // "preStructDefinitions"
 // "structComment"
@@ -161,9 +161,8 @@ func fieldType(tableName, columnName string, column *ovsdb.ColumnSchema, enumTyp
 	case ovsdb.TypeEnum:
 		if enumTypes {
 			return enumName(tableName, columnName)
-		} else {
-			return AtomicType(column.TypeObj.Key.Type)
 		}
+		return AtomicType(column.TypeObj.Key.Type)
 	case ovsdb.TypeMap:
 		return fmt.Sprintf("map[%s]%s", AtomicType(column.TypeObj.Key.Type),
 			AtomicType(column.TypeObj.Value.Type))
@@ -205,7 +204,7 @@ func FieldEnum(tableName, columnName string, column *ovsdb.ColumnSchema) *Enum {
 	}
 }
 
-// BasicType returns the string type of an AtomicType
+// AtomicType returns the string type of an AtomicType
 func AtomicType(atype string) string {
 	switch atype {
 	case ovsdb.TypeInteger:
@@ -227,7 +226,7 @@ func Tag(column string) string {
 	return fmt.Sprintf("ovsdb:\"%s\"", column)
 }
 
-// Filename returns the filename of a table
+// FileName returns the filename of a table
 func FileName(table string) string {
 	return fmt.Sprintf("%s.go", strings.ToLower(table))
 }
diff --git a/ovsdb/bindings.go b/ovsdb/bindings.go
index 1d1bbb6..32728a2 100644
--- a/ovsdb/bindings.go
+++ b/ovsdb/bindings.go
@@ -48,7 +48,7 @@ func NativeTypeFromAtomic(basicType string) reflect.Type {
 	case TypeUUID:
 		return strType
 	default:
-		panic("Unkown basic type %s basicType")
+		panic("Unknown basic type %s basicType")
 	}
 }
 
@@ -65,12 +65,12 @@ func NativeType(column *ColumnSchema) reflect.Type {
 	case TypeEnum:
 		return NativeTypeFromAtomic(column.TypeObj.Key.Type)
 	case TypeMap:
-		kType := NativeTypeFromAtomic(column.TypeObj.Key.Type)
-		vType := NativeTypeFromAtomic(column.TypeObj.Value.Type)
-		return reflect.MapOf(kType, vType)
+		keyType := NativeTypeFromAtomic(column.TypeObj.Key.Type)
+		valueType := NativeTypeFromAtomic(column.TypeObj.Value.Type)
+		return reflect.MapOf(keyType, valueType)
 	case TypeSet:
-		kType := NativeTypeFromAtomic(column.TypeObj.Key.Type)
-		return reflect.SliceOf(kType)
+		keyType := NativeTypeFromAtomic(column.TypeObj.Key.Type)
+		return reflect.SliceOf(keyType)
 	default:
 		panic(fmt.Errorf("unknown extended type %s", column.Type))
 	}
@@ -247,7 +247,7 @@ func validateMutationAtomic(atype string, mutator Mutator, value interface{}) er
 	}
 }
 
-// ValidateMutation checks if the mutation value and mutator string area apropriate
+// ValidateMutation checks if the mutation value and mutator string area appropriate
 // for a given column based on the rules specified RFC7047
 func ValidateMutation(column *ColumnSchema, mutator Mutator, value interface{}) error {
 	if !column.Mutable() {
diff --git a/ovsdb/condition.go b/ovsdb/condition.go
index 6f3a2fa..061347f 100644
--- a/ovsdb/condition.go
+++ b/ovsdb/condition.go
@@ -9,14 +9,22 @@ import (
 type ConditionFunction string
 
 const (
-	ConditionLessThan           ConditionFunction = "<"
-	ConditionLessThanOrEqual    ConditionFunction = "<="
-	ConditionEqual              ConditionFunction = "=="
-	ConditionNotEqual           ConditionFunction = "!="
-	ConditionGreaterThan        ConditionFunction = ">"
+	// ConditionLessThan is the less than condition
+	ConditionLessThan ConditionFunction = "<"
+	// ConditionLessThanOrEqual is the less than or equal condition
+	ConditionLessThanOrEqual ConditionFunction = "<="
+	// ConditionEqual is the equal condition
+	ConditionEqual ConditionFunction = "=="
+	// ConditionNotEqual is the not equal condition
+	ConditionNotEqual ConditionFunction = "!="
+	// ConditionGreaterThan is the greater than condition
+	ConditionGreaterThan ConditionFunction = ">"
+	// ConditionGreaterThanOrEqual is the greater than or equal condition
 	ConditionGreaterThanOrEqual ConditionFunction = ">="
-	ConditionIncludes           ConditionFunction = "includes"
-	ConditionExcludes           ConditionFunction = "excludes"
+	// ConditionIncludes is the includes condition
+	ConditionIncludes ConditionFunction = "includes"
+	// ConditionExcludes is the excludes condition
+	ConditionExcludes ConditionFunction = "excludes"
 )
 
 // Condition is described in RFC 7047: 5.1
diff --git a/ovsdb/error.go b/ovsdb/error.go
index 577fe0e..f5bb136 100644
--- a/ovsdb/error.go
+++ b/ovsdb/error.go
@@ -62,7 +62,7 @@ func errorFromResult(op *Operation, r OperationResult) OperationError {
 func CheckOperationResults(result []OperationResult, ops []Operation) ([]OperationError, error) {
 	// this shouldn't happen, but we'll cover the case to be certain
 	if len(result) < len(ops) {
-		return nil, fmt.Errorf("ovsdb transaction error. %d operations submitted but only %d results recieved", len(ops), len(result))
+		return nil, fmt.Errorf("ovsdb transaction error. %d operations submitted but only %d results received", len(ops), len(result))
 	}
 	var errs []OperationError
 	for i, op := range result {
@@ -86,7 +86,7 @@ func CheckOperationResults(result []OperationResult, ops []Operation) ([]Operati
 // OVSDB Operation
 type OperationError interface {
 	error
-	// Operation is a pointer to the operation which casued the error
+	// Operation is a pointer to the operation which caused the error
 	Operation() *Operation
 }
 
@@ -130,7 +130,7 @@ func (e *ConstraintViolation) Operation() *Operation {
 	return e.operation
 }
 
-// ResourcesExhasued is described in RFC 7047: 4.1.3
+// ResourcesExhausted is described in RFC 7047: 4.1.3
 type ResourcesExhausted struct {
 	details   string
 	operation *Operation
@@ -270,7 +270,7 @@ func (e *NotSupported) Operation() *Operation {
 	return e.operation
 }
 
-// ABorted is described in RFC 7047: 5.2.8
+// Aborted is described in RFC 7047: 5.2.8
 type Aborted struct {
 	details   string
 	operation *Operation
diff --git a/ovsdb/mutation.go b/ovsdb/mutation.go
index cb752f6..cee2df6 100644
--- a/ovsdb/mutation.go
+++ b/ovsdb/mutation.go
@@ -9,13 +9,20 @@ import (
 type Mutator string
 
 const (
-	MutateOperationDelete   Mutator = "delete"
-	MutateOperationInsert   Mutator = "insert"
-	MutateOperationAdd      Mutator = "+="
+	// MutateOperationDelete is the delete mutator
+	MutateOperationDelete Mutator = "delete"
+	// MutateOperationInsert is the insert mutator
+	MutateOperationInsert Mutator = "insert"
+	// MutateOperationAdd is the add mutator
+	MutateOperationAdd Mutator = "+="
+	// MutateOperationSubtract is the subtract mutator
 	MutateOperationSubtract Mutator = "-="
+	// MutateOperationMultiply is the multiply mutator
 	MutateOperationMultiply Mutator = "*="
-	MutateOperationDivide   Mutator = "/="
-	MutateOperationModulo   Mutator = "%="
+	// MutateOperationDivide is the divide mutator
+	MutateOperationDivide Mutator = "/="
+	// MutateOperationModulo is the modulo mutator
+	MutateOperationModulo Mutator = "%="
 )
 
 // Mutation is described in RFC 7047: 5.1
diff --git a/ovsdb/notation.go b/ovsdb/notation.go
index 40ab6a1..bf7d242 100644
--- a/ovsdb/notation.go
+++ b/ovsdb/notation.go
@@ -7,16 +7,26 @@ import (
 )
 
 const (
-	OperationInsert  = "insert"
-	OperationSelect  = "select"
-	OperationUpdate  = "update"
-	OperationMutate  = "mutate"
-	OperationDelete  = "delete"
-	OperationWait    = "wait"
-	OperationCommit  = "commit"
-	OperationAbort   = "abort"
+	// OperationInsert is an insert operation
+	OperationInsert = "insert"
+	// OperationSelect is a select operation
+	OperationSelect = "select"
+	// OperationUpdate is an update operation
+	OperationUpdate = "update"
+	// OperationMutate is a mutate operation
+	OperationMutate = "mutate"
+	// OperationDelete is a delete operation
+	OperationDelete = "delete"
+	// OperationWait is a wait operation
+	OperationWait = "wait"
+	// OperationCommit is a commit operation
+	OperationCommit = "commit"
+	// OperationAbort is an abort operation
+	OperationAbort = "abort"
+	// OperationComment is a comment operation
 	OperationComment = "comment"
-	OperationAssert  = "assert"
+	// OperationAssert is an assert operation
+	OperationAssert = "assert"
 )
 
 // Operation represents an operation according to RFC7047 section 5.2
@@ -37,7 +47,7 @@ type Operation struct {
 }
 
 // MarshalJSON marshalls 'Operation' to a byte array
-// For 'select' operations, we dont omit the 'Where' field
+// For 'select' operations, we don't omit the 'Where' field
 // to allow selecting all rows of a table
 func (o Operation) MarshalJSON() ([]byte, error) {
 	type OpAlias Operation
@@ -77,12 +87,6 @@ type MonitorRequest struct {
 	Select  *MonitorSelect `json:"select,omitempty"`
 }
 
-// OvsdbError is an OVS Error Condition
-type OvsdbError struct {
-	Error   string `json:"error"`
-	Details string `json:"details,omitempty"`
-}
-
 // TransactResponse represents the response to a Transact Operation
 type TransactResponse struct {
 	Result []OperationResult `json:"result"`
diff --git a/ovsdb/schema.go b/ovsdb/schema.go
index 8358939..115a31e 100644
--- a/ovsdb/schema.go
+++ b/ovsdb/schema.go
@@ -129,11 +129,11 @@ type RefType = string
 // unlimited is not constant as we can't take the address of int constants
 var (
 	// Unlimited is used to express unlimited "Max"
-	Unlimited int = -1
+	Unlimited = -1
 )
 
 const (
-	unlimtedString = "unlimited"
+	unlimitedString = "unlimited"
 	//Strong RefType
 	Strong RefType = "strong"
 	//Weak RefType
@@ -152,7 +152,7 @@ const (
 	//TypeUUID is equivalent to 'libovsdb.UUID'
 	TypeUUID ExtendedType = "uuid"
 
-	//Extended Types used to summarize the interal type of the field.
+	//Extended Types used to summarize the internal type of the field.
 
 	//TypeEnum is an enumerator of type defined by Key.Type
 	TypeEnum ExtendedType = "enum"
@@ -206,8 +206,8 @@ func (b *BaseType) MaxReal() (float64, error) {
 	return math.MaxFloat64, nil
 }
 
-// MinInteger returns the minimum real value
-// RFC7047 species the minimum to be -2^63
+// MinInteger returns the minimum integer value
+// RFC7047 specifies the minimum to be -2^63
 func (b *BaseType) MinInteger() (int, error) {
 	if b.Type != TypeInteger {
 		return 0, fmt.Errorf("%s is not an integer", b.Type)
@@ -218,8 +218,8 @@ func (b *BaseType) MinInteger() (int, error) {
 	return int(math.Pow(-2, 63)), nil
 }
 
-// MinInteger returns the minimum real value
-// RFC7047 species the minimum to be 2^63-1
+// MaxInteger returns the minimum integer value
+// RFC7047 specifies the minimum to be 2^63-1
 func (b *BaseType) MaxInteger() (int, error) {
 	if b.Type != TypeInteger {
 		return 0, fmt.Errorf("%s is not an integer", b.Type)
@@ -257,7 +257,7 @@ func (b *BaseType) MaxLength() (int, error) {
 }
 
 // RefTable returns the table to which a UUID type refers
-// It will return an empry string if not set
+// It will return an empty string if not set
 func (b *BaseType) RefTable() (string, error) {
 	if b.Type != TypeUUID {
 		return "", fmt.Errorf("%s is not a uuid", b.Type)
@@ -280,7 +280,7 @@ func (b *BaseType) RefType() (RefType, error) {
 	return Strong, nil
 }
 
-// UnmarshalJSON unmarshalls a json-formatted base type
+// UnmarshalJSON unmarshals a json-formatted base type
 func (b *BaseType) UnmarshalJSON(data []byte) error {
 	var s string
 	if err := json.Unmarshal(data, &s); err == nil {
@@ -398,7 +398,7 @@ func (c *ColumnType) Min() int {
 	return *c.min
 }
 
-// UnmarshalJSON unmarshalls a json-formatted column type
+// UnmarshalJSON unmarshals a json-formatted column type
 func (c *ColumnType) UnmarshalJSON(data []byte) error {
 	var s string
 	if err := json.Unmarshal(data, &s); err == nil {
@@ -424,7 +424,7 @@ func (c *ColumnType) UnmarshalJSON(data []byte) error {
 	c.min = colType.Min
 	switch v := colType.Max.(type) {
 	case string:
-		if v == unlimtedString {
+		if v == unlimitedString {
 			c.max = &Unlimited
 		} else {
 			return fmt.Errorf("unexpected string value in max field")
@@ -453,7 +453,7 @@ func (c ColumnType) MarshalJSON() ([]byte, error) {
 			Key:   c.Key,
 			Value: c.Value,
 			Min:   c.min,
-			Max:   unlimtedString,
+			Max:   unlimitedString,
 		}
 		return json.Marshal(&colType)
 	}
@@ -503,7 +503,7 @@ func (c *ColumnSchema) Ephemeral() bool {
 }
 
 // UnmarshalJSON unmarshalls a json-formatted column
-func (column *ColumnSchema) UnmarshalJSON(data []byte) error {
+func (c *ColumnSchema) UnmarshalJSON(data []byte) error {
 	// ColumnJSON represents the known json values for a Column
 	var colJSON struct {
 		Type      *ColumnType `json:"type"`
@@ -511,67 +511,67 @@ func (column *ColumnSchema) UnmarshalJSON(data []byte) error {
 		Mutable   *bool       `json:"mutable,omitempty"`
 	}
 
-	// Unmarshall known keys
+	// Unmarshal known keys
 	if err := json.Unmarshal(data, &colJSON); err != nil {
 		return fmt.Errorf("cannot parse column object %s", err)
 	}
 
-	column.ephemeral = colJSON.Ephemeral
-	column.mutable = colJSON.Mutable
-	column.TypeObj = colJSON.Type
+	c.ephemeral = colJSON.Ephemeral
+	c.mutable = colJSON.Mutable
+	c.TypeObj = colJSON.Type
 
 	// Infer the ExtendedType from the TypeObj
-	if column.TypeObj.Value != nil {
-		column.Type = TypeMap
-	} else if column.TypeObj.Min() != 1 || column.TypeObj.Max() != 1 {
-		column.Type = TypeSet
-	} else if len(column.TypeObj.Key.Enum) > 0 {
-		column.Type = TypeEnum
+	if c.TypeObj.Value != nil {
+		c.Type = TypeMap
+	} else if c.TypeObj.Min() != 1 || c.TypeObj.Max() != 1 {
+		c.Type = TypeSet
+	} else if len(c.TypeObj.Key.Enum) > 0 {
+		c.Type = TypeEnum
 	} else {
-		column.Type = column.TypeObj.Key.Type
+		c.Type = c.TypeObj.Key.Type
 	}
 	return nil
 }
 
 // MarshalJSON marshalls a column schema to JSON
-func (column ColumnSchema) MarshalJSON() ([]byte, error) {
+func (c ColumnSchema) MarshalJSON() ([]byte, error) {
 	type colJSON struct {
 		Type      *ColumnType `json:"type"`
 		Ephemeral *bool       `json:"ephemeral,omitempty"`
 		Mutable   *bool       `json:"mutable,omitempty"`
 	}
-	c := colJSON{
-		Type:      column.TypeObj,
-		Ephemeral: column.ephemeral,
-		Mutable:   column.mutable,
+	column := colJSON{
+		Type:      c.TypeObj,
+		Ephemeral: c.ephemeral,
+		Mutable:   c.mutable,
 	}
-	return json.Marshal(c)
+	return json.Marshal(column)
 }
 
 // String returns a string representation of the (native) column type
-func (column *ColumnSchema) String() string {
+func (c *ColumnSchema) String() string {
 	var flags []string
 	var flagStr string
 	var typeStr string
-	if column.Ephemeral() {
+	if c.Ephemeral() {
 		flags = append(flags, "E")
 	}
-	if column.Mutable() {
+	if c.Mutable() {
 		flags = append(flags, "M")
 	}
 	if len(flags) > 0 {
 		flagStr = fmt.Sprintf("[%s]", strings.Join(flags, ","))
 	}
 
-	switch column.Type {
+	switch c.Type {
 	case TypeInteger, TypeReal, TypeBoolean, TypeString:
-		typeStr = string(column.Type)
+		typeStr = string(c.Type)
 	case TypeUUID:
-		if column.TypeObj != nil && column.TypeObj.Key != nil {
+		if c.TypeObj != nil && c.TypeObj.Key != nil {
 			// ignore err as we've already asserted this is a uuid
-			reftable, _ := column.TypeObj.Key.RefTable()
+			reftable, _ := c.TypeObj.Key.RefTable()
 			reftype := ""
-			if s, err := column.TypeObj.Key.RefType(); err != nil {
+			if s, err := c.TypeObj.Key.RefType(); err != nil {
 				reftype = s
 			}
 			typeStr = fmt.Sprintf("uuid [%s (%s)]", reftable, reftype)
@@ -580,22 +580,22 @@ func (column *ColumnSchema) String() string {
 		}
 
 	case TypeEnum:
-		typeStr = fmt.Sprintf("enum (type: %s): %v", column.TypeObj.Key.Type, column.TypeObj.Key.Enum)
+		typeStr = fmt.Sprintf("enum (type: %s): %v", c.TypeObj.Key.Type, c.TypeObj.Key.Enum)
 	case TypeMap:
-		typeStr = fmt.Sprintf("[%s]%s", column.TypeObj.Key.Type, column.TypeObj.Value.Type)
+		typeStr = fmt.Sprintf("[%s]%s", c.TypeObj.Key.Type, c.TypeObj.Value.Type)
 	case TypeSet:
 		var keyStr string
-		if column.TypeObj.Key.Type == TypeUUID {
+		if c.TypeObj.Key.Type == TypeUUID {
 			// ignore err as we've already asserted this is a uuid
-			reftable, _ := column.TypeObj.Key.RefTable()
-			reftype, _ := column.TypeObj.Key.RefType()
+			reftable, _ := c.TypeObj.Key.RefTable()
+			reftype, _ := c.TypeObj.Key.RefType()
 			keyStr = fmt.Sprintf(" [%s (%s)]", reftable, reftype)
 		} else {
-			keyStr = string(column.TypeObj.Key.Type)
+			keyStr = string(c.TypeObj.Key.Type)
 		}
-		typeStr = fmt.Sprintf("[]%s (min: %d, max: %d)", keyStr, column.TypeObj.Min(), column.TypeObj.Max())
+		typeStr = fmt.Sprintf("[]%s (min: %d, max: %d)", keyStr, c.TypeObj.Min(), c.TypeObj.Max())
 	default:
-		panic(fmt.Sprintf("Unsupported type %s", column.Type))
+		panic(fmt.Sprintf("Unsupported type %s", c.Type))
 	}
 
 	return strings.Join([]string{typeStr, flagStr}, " ")
diff --git a/ovsdb/set.go b/ovsdb/set.go
index e7e1413..22d6980 100644
--- a/ovsdb/set.go
+++ b/ovsdb/set.go
@@ -7,7 +7,7 @@ import (
 )
 
 // OvsSet is an OVSDB style set
-// RFC 7047 has a wierd (but understandable) notation for set as described as :
+// RFC 7047 has a weird (but understandable) notation for set as described as :
 // Either an <atom>, representing a set with exactly one element, or
 // a 2-element JSON array that represents a database set value.  The
 // first element of the array must be the string "set", and the
diff --git a/ovsdb/updates.go b/ovsdb/updates.go
index f6af9de..0681503 100644
--- a/ovsdb/updates.go
+++ b/ovsdb/updates.go
@@ -60,12 +60,12 @@ func (r RowUpdate) Insert() bool {
 	return r.New != nil && r.Old == nil
 }
 
-// Insert returns true if this is an update for a modify operation
+// Modify returns true if this is an update for a modify operation
 func (r RowUpdate) Modify() bool {
 	return r.New != nil && r.Old != nil
 }
 
-// Insert returns true if this is an update for a delete operation
+// Delete returns true if this is an update for a delete operation
 func (r RowUpdate) Delete() bool {
 	return r.New == nil && r.Old != nil
 }
diff --git a/server/database.go b/server/database.go
index 9caa4e3..58a0ee3 100644
--- a/server/database.go
+++ b/server/database.go
@@ -149,9 +149,8 @@ func (db *inMemoryDatabase) Insert(database string, table string, rowUUID string
 				Error:   e.Error(),
 				Details: indexErr.Error(),
 			}, nil
-		} else {
-			panic(err)
 		}
+		panic(err)
 	}
 
 	resultRow, err := targetDb.Mapper().NewRow(table, model)
@@ -218,7 +217,7 @@ func (db *inMemoryDatabase) Update(database, table string, where []ovsdb.Conditi
 		}, nil
 	}
 	for _, old := range rows {
-		info, _ := mapper.NewMapperInfo(schema, old)
+		info, _ := mapper.NewInfo(schema, old)
 		uuid, _ := info.FieldByColumn("_uuid")
 		oldRow, err := targetDb.Mapper().NewRow(table, old)
 		if err != nil {
@@ -236,9 +235,8 @@ func (db *inMemoryDatabase) Update(database, table string, where []ovsdb.Conditi
 
 					Details: indexErr.Error(),
 				}, nil
-			} else {
-				panic(err)
 			}
+			panic(err)
 		}
 		tableUpdate.AddRowUpdate(uuid.(string), &ovsdb.RowUpdate{
 			Old: &oldRow,
@@ -271,7 +269,7 @@ func (db *inMemoryDatabase) Mutate(database, table string, where []ovsdb.Conditi
 	}
 
 	for _, old := range rows {
-		info, err := mapper.NewMapperInfo(schema, old)
+		info, err := mapper.NewInfo(schema, old)
 		if err != nil {
 			panic(err)
 		}
@@ -289,7 +287,7 @@ func (db *inMemoryDatabase) Mutate(database, table string, where []ovsdb.Conditi
 			if err := ovsdb.ValidateMutation(column, m.Mutator, nativeValue); err != nil {
 				panic(err)
 			}
-			info, err := mapper.NewMapperInfo(schema, old)
+			info, err := mapper.NewInfo(schema, old)
 			if err != nil {
 				panic(err)
 			}
@@ -310,9 +308,8 @@ func (db *inMemoryDatabase) Mutate(database, table string, where []ovsdb.Conditi
 						Error:   e.Error(),
 						Details: indexErr.Error(),
 					}, nil
-				} else {
-					panic(err)
 				}
+				panic(err)
 			}
 			newRow, err := targetDb.Mapper().NewRow(table, old)
 			if err != nil {
@@ -347,7 +344,7 @@ func (db *inMemoryDatabase) Delete(database, table string, where []ovsdb.Conditi
 		panic(err)
 	}
 	for _, row := range rows {
-		info, _ := mapper.NewMapperInfo(schema, row)
+		info, _ := mapper.NewInfo(schema, row)
 		uuid, _ := info.FieldByColumn("_uuid")
 		oldRow, err := targetDb.Mapper().NewRow(table, row)
 		if err != nil {
@@ -392,154 +389,6 @@ func (db *inMemoryDatabase) Assert(database, table, lock string) ovsdb.Operation
 	e := ovsdb.NotSupported{}
 	return ovsdb.OperationResult{Error: e.Error()}
 }
-
-func mutate(current interface{}, mutator ovsdb.Mutator, value interface{}) interface{} {
-	switch current.(type) {
-	case bool, string:
-		return current
-	}
-	switch mutator {
-	case ovsdb.MutateOperationInsert:
-		switch current.(type) {
-		case int, float64:
-			return current
-		}
-		vc := reflect.ValueOf(current)
-		vv := reflect.ValueOf(value)
-		if vc.Kind() == reflect.Slice && vc.Type() == reflect.SliceOf(vv.Type()) {
-			v := reflect.Append(vc, vv)
-			return v.Interface()
-		}
-		if vc.Kind() == reflect.Slice && vv.Kind() == reflect.Slice {
-			v := reflect.AppendSlice(vc, vv)
-			return v.Interface()
-		}
-	case ovsdb.MutateOperationDelete:
-		switch current.(type) {
-		case int, float64:
-			return current
-		}
-		vc := reflect.ValueOf(current)
-		vv := reflect.ValueOf(value)
-		if vc.Kind() == reflect.Slice && vc.Type() == reflect.SliceOf(vv.Type()) {
-			v := removeFromSlice(vc, vv)
-			return v.Interface()
-		}
-		if vc.Kind() == reflect.Slice && vv.Kind() == reflect.Slice {
-			v := vc
-			for i := 0; i < vv.Len(); i++ {
-				v = removeFromSlice(v, vv.Index(i))
-			}
-			return v.Interface()
-		}
-	case ovsdb.MutateOperationAdd:
-		if i, ok := current.(int); ok {
-			v := value.(int)
-			return i + v
-		}
-		if i, ok := current.(float64); ok {
-			v := value.(float64)
-			return i + v
-		}
-		if is, ok := current.([]int); ok {
-			v := value.(int)
-			for i, j := range is {
-				is[i] = j + v
-			}
-			return is
-		}
-		if is, ok := current.([]float64); ok {
-			v := value.(float64)
-			for i, j := range is {
-				is[i] = j + v
-			}
-			return is
-		}
-	case ovsdb.MutateOperationSubtract:
-		if i, ok := current.(int); ok {
-			v := value.(int)
-			return i - v
-		}
-		if i, ok := current.(float64); ok {
-			v := value.(float64)
-			return i - v
-		}
-		if is, ok := current.([]int); ok {
-			v := value.(int)
-			for i, j := range is {
-				is[i] = j - v
-			}
-			return is
-		}
-		if is, ok := current.([]float64); ok {
-			v := value.(float64)
-			for i, j := range is {
-				is[i] = j - v
-			}
-			return is
-		}
-	case ovsdb.MutateOperationMultiply:
-		if i, ok := current.(int); ok {
-			v := value.(int)
-			return i * v
-		}
-		if i, ok := current.(float64); ok {
-			v := value.(float64)
-			return i * v
-		}
-		if is, ok := current.([]int); ok {
-			v := value.(int)
-			for i, j := range is {
-				is[i] = j * v
-			}
-			return is
-		}
-		if is, ok := current.([]float64); ok {
-			v := value.(float64)
-			for i, j := range is {
-				is[i] = j * v
-			}
-			return is
-		}
-	case ovsdb.MutateOperationDivide:
-		if i, ok := current.(int); ok {
-			v := value.(int)
-			return i / v
-		}
-		if i, ok := current.(float64); ok {
-			v := value.(float64)
-			return i / v
-		}
-		if is, ok := current.([]int); ok {
-			v := value.(int)
-			for i, j := range is {
-				is[i] = j / v
-			}
-			return is
-		}
-		if is, ok := current.([]float64); ok {
-			v := value.(float64)
-			for i, j := range is {
-				is[i] = j / v
-			}
-			return is
-		}
-	case ovsdb.MutateOperationModulo:
-		if i, ok := current.(int); ok {
-			v := value.(int)
-			return i % v
-		}
-		if is, ok := current.([]int); ok {
-			v := value.(int)
-			for i, j := range is {
-				is[i] = j % v
-			}
-			return is
-		}
-	}
-	return current
-}
-
 func removeFromSlice(a, b reflect.Value) reflect.Value {
 	for i := 0; i < a.Len(); i++ {
 		if a.Index(i).Interface() == b.Interface() {
diff --git a/server/mutate.go b/server/mutate.go
new file mode 100644
index 0000000..5949986
--- /dev/null
+++ b/server/mutate.go
@@ -0,0 +1,189 @@
+package server
+
+import (
+	"reflect"
+
+	"github.com/ovn-org/libovsdb/ovsdb"
+)
+
+func mutate(current interface{}, mutator ovsdb.Mutator, value interface{}) interface{} {
+	switch current.(type) {
+	case bool, string:
+		return current
+	}
+	switch mutator {
+	case ovsdb.MutateOperationInsert:
+		return mutateInsert(current, value)
+	case ovsdb.MutateOperationDelete:
+		return mutateDelete(current, value)
+	case ovsdb.MutateOperationAdd:
+		return mutateAdd(current, value)
+	case ovsdb.MutateOperationSubtract:
+		return mutateSubtract(current, value)
+	case ovsdb.MutateOperationMultiply:
+		return mutateMultiply(current, value)
+	case ovsdb.MutateOperationDivide:
+		return mutateDivide(current, value)
+	case ovsdb.MutateOperationModulo:
+		return mutateModulo(current, value)
+	}
+	return current
+}
+
+func mutateInsert(current, value interface{}) interface{} {
+	switch current.(type) {
+	case int, float64:
+		return current
+	}
+	vc := reflect.ValueOf(current)
+	vv := reflect.ValueOf(value)
+	if vc.Kind() == reflect.Slice && vc.Type() == reflect.SliceOf(vv.Type()) {
+		v := reflect.Append(vc, vv)
+		return v.Interface()
+	}
+	if vc.Kind() == reflect.Slice && vv.Kind() == reflect.Slice {
+		v := reflect.AppendSlice(vc, vv)
+		return v.Interface()
+	}
+	return current
+}
+
+func mutateDelete(current, value interface{}) interface{} {
+	switch current.(type) {
+	case int, float64:
+		return current
+	}
+	vc := reflect.ValueOf(current)
+	vv := reflect.ValueOf(value)
+	if vc.Kind() == reflect.Slice && vc.Type() == reflect.SliceOf(vv.Type()) {
+		v := removeFromSlice(vc, vv)
+		return v.Interface()
+	}
+	if vc.Kind() == reflect.Slice && vv.Kind() == reflect.Slice {
+		v := vc
+		for i := 0; i < vv.Len(); i++ {
+			v = removeFromSlice(v, vv.Index(i))
+		}
+		return v.Interface()
+	}
+	return current
+}
+
+func mutateAdd(current, value interface{}) interface{} {
+	if i, ok := current.(int); ok {
+		v := value.(int)
+		return i + v
+	}
+	if i, ok := current.(float64); ok {
+		v := value.(float64)
+		return i + v
+	}
+	if is, ok := current.([]int); ok {
+		v := value.(int)
+		for i, j := range is {
+			is[i] = j + v
+		}
+		return is
+	}
+	if is, ok := current.([]float64); ok {
+		v := value.(float64)
+		for i, j := range is {
+			is[i] = j + v
+		}
+		return is
+	}
+	return current
+}
+
+func mutateSubtract(current, value interface{}) interface{} {
+	if i, ok := current.(int); ok {
+		v := value.(int)
+		return i - v
+	}
+	if i, ok := current.(float64); ok {
+		v := value.(float64)
+		return i - v
+	}
+	if is, ok := current.([]int); ok {
+		v := value.(int)
+		for i, j := range is {
+			is[i] = j - v
+		}
+		return is
+	}
+	if is, ok := current.([]float64); ok {
+		v := value.(float64)
+		for i, j := range is {
+			is[i] = j - v
+		}
+		return is
+	}
+	return current
+}
+
+func mutateMultiply(current, value interface{}) interface{} {
+	if i, ok := current.(int); ok {
+		v := value.(int)
+		return i * v
+	}
+	if i, ok := current.(float64); ok {
+		v := value.(float64)
+		return i * v
+	}
+	if is, ok := current.([]int); ok {
+		v := value.(int)
+		for i, j := range is {
+			is[i] = j * v
+		}
+		return is
+	}
+	if is, ok := current.([]float64); ok {
+		v := value.(float64)
+		for i, j := range is {
+			is[i] = j * v
+		}
+		return is
+	}
+	return current
+}
+
+func mutateDivide(current, value interface{}) interface{} {
+	if i, ok := current.(int); ok {
+		v := value.(int)
+		return i / v
+	}
+	if i, ok := current.(float64); ok {
+		v := value.(float64)
+		return i / v
+	}
+	if is, ok := current.([]int); ok {
+		v := value.(int)
+		for i, j := range is {
+			is[i] = j / v
+		}
+		return is
+	}
+	if is, ok := current.([]float64); ok {
+		v := value.(float64)
+		for i, j := range is {
+			is[i] = j / v
+		}
+		return is
+	}
+	return current
+}
+
+func mutateModulo(current, value interface{}) interface{} {
+	if i, ok := current.(int); ok {
+		v := value.(int)
+		return i % v
+	}
+	if is, ok := current.([]int); ok {
+		v := value.(int)
+		for i, j := range is {
+			is[i] = j % v
+		}
+		return is
+	}
+	return current
+}
diff --git a/server/server.go b/server/server.go
index 2599767..da50165 100644
--- a/server/server.go
+++ b/server/server.go
@@ -176,7 +176,7 @@ func (o *OvsdbServer) Cancel(client *rpc2.Client, args []interface{}, reply *[]i
 	return fmt.Errorf("not implemented")
 }
 
-// Monitor montiors a given database table and provides updates to the client via an RPC callback
+// Monitor monitors a given database table and provides updates to the client via an RPC callback
 func (o *OvsdbServer) Monitor(client *rpc2.Client, args []json.RawMessage, reply *ovsdb.TableUpdates) error {
 	var db string
 	if err := json.Unmarshal(args[0], &db); err != nil {


Test patch:
diff --git a/cache/cache_test.go b/cache/cache_test.go
index 138c2ca..38088ea 100644
--- a/cache/cache_test.go
+++ b/cache/cache_test.go
@@ -104,7 +104,7 @@ func TestRowCacheCreate(t *testing.T) {
 	     }
 	`), &schema)
 	require.Nil(t, err)
-	testData := CacheData{
+	testData := Data{
 		"Open_vSwitch": map[string]model.Model{"bar": &testModel{Foo: "bar"}},
 	}
 	tc, err := NewTableCache(&schema, db, testData)
@@ -173,7 +173,7 @@ func TestRowCacheCreateMultiIndex(t *testing.T) {
 	`), &schema)
 	require.Nil(t, err)
 	tSchema := schema.Table("Open_vSwitch")
-	testData := CacheData{
+	testData := Data{
 		"Open_vSwitch": map[string]model.Model{"bar": &testModel{Foo: "bar", Bar: "bar"}},
 	}
 	tc, err := NewTableCache(&schema, db, testData)
@@ -224,7 +224,7 @@ func TestRowCacheCreateMultiIndex(t *testing.T) {
 				assert.Error(t, err)
 			} else {
 				assert.Nil(t, err)
-				mapperInfo, err := mapper.NewMapperInfo(tSchema, tt.model)
+				mapperInfo, err := mapper.NewInfo(tSchema, tt.model)
 				require.Nil(t, err)
 				h, err := hashColumnValues(mapperInfo, []string{"foo", "bar"})
 				require.Nil(t, err)
@@ -256,7 +256,7 @@ func TestRowCacheUpdate(t *testing.T) {
 	     }
 	`), &schema)
 	require.Nil(t, err)
-	testData := CacheData{
+	testData := Data{
 		"Open_vSwitch": map[string]model.Model{
 			"bar":    &testModel{Foo: "bar"},
 			"foobar": &testModel{Foo: "foobar"},
@@ -328,7 +328,7 @@ func TestRowCacheUpdateMultiIndex(t *testing.T) {
 	`), &schema)
 	tSchema := schema.Table("Open_vSwitch")
 	require.Nil(t, err)
-	testData := CacheData{
+	testData := Data{
 		"Open_vSwitch": map[string]model.Model{
 			"bar":    &testModel{Foo: "bar", Bar: "bar"},
 			"foobar": &testModel{Foo: "foobar", Bar: "foobar"},
@@ -377,7 +377,7 @@ func TestRowCacheUpdateMultiIndex(t *testing.T) {
 				assert.Error(t, err)
 			} else {
 				assert.Nil(t, err)
-				mapperInfo, err := mapper.NewMapperInfo(tSchema, tt.model)
+				mapperInfo, err := mapper.NewInfo(tSchema, tt.model)
 				require.Nil(t, err)
 				h, err := hashColumnValues(mapperInfo, []string{"foo", "bar"})
 				require.Nil(t, err)
@@ -409,7 +409,7 @@ func TestRowCacheDelete(t *testing.T) {
 	     }
 	`), &schema)
 	require.Nil(t, err)
-	testData := CacheData{
+	testData := Data{
 		"Open_vSwitch": map[string]model.Model{
 			"bar": &testModel{Foo: "bar"},
 		},
diff --git a/client/api_test.go b/client/api_test.go
index d74b252..b5323da 100644
--- a/client/api_test.go
+++ b/client/api_test.go
@@ -40,7 +40,7 @@ func TestAPIListSimple(t *testing.T) {
 	for i := range lscacheList {
 		lscache[lscacheList[i].(*testLogicalSwitch).UUID] = lscacheList[i]
 	}
-	testData := cache.CacheData{
+	testData := cache.Data{
 		"Logical_Switch": lscache,
 	}
 	tcache := apiTestCache(t, testData)
@@ -149,7 +149,7 @@ func TestAPIListPredicate(t *testing.T) {
 	for i := range lscacheList {
 		lscache[lscacheList[i].(*testLogicalSwitch).UUID] = lscacheList[i]
 	}
-	testData := cache.CacheData{
+	testData := cache.Data{
 		"Logical_Switch": lscache,
 	}
 	tcache := apiTestCache(t, testData)
@@ -247,7 +247,7 @@ func TestAPIListFields(t *testing.T) {
 	for i := range lspcacheList {
 		lspcache[lspcacheList[i].(*testLogicalSwitchPort).UUID] = lspcacheList[i]
 	}
-	testData := cache.CacheData{
+	testData := cache.Data{
 		"Logical_Switch_Port": lspcache,
 	}
 	tcache := apiTestCache(t, testData)
@@ -444,7 +444,7 @@ func TestAPIGet(t *testing.T) {
 	for i := range lspCacheList {
 		lspCache[lspCacheList[i].(*testLogicalSwitchPort).UUID] = lspCacheList[i]
 	}
-	testData := cache.CacheData{
+	testData := cache.Data{
 		"Logical_Switch":      lsCache,
 		"Logical_Switch_Port": lspCache,
 	}
@@ -526,7 +526,7 @@ func TestAPICreate(t *testing.T) {
 	for i := range lspCacheList {
 		lspCache[lspCacheList[i].(*testLogicalSwitchPort).UUID] = lspCacheList[i]
 	}
-	testData := cache.CacheData{
+	testData := cache.Data{
 		"Logical_Switch":      lsCache,
 		"Logical_Switch_Port": lspCache,
 	}
@@ -642,7 +642,7 @@ func TestAPIMutate(t *testing.T) {
 			Tag:         []int{1},
 		},
 	}
-	testData := cache.CacheData{
+	testData := cache.Data{
 		"Logical_Switch_Port": lspCache,
 	}
 	tcache := apiTestCache(t, testData)
@@ -812,7 +812,7 @@ func TestAPIUpdate(t *testing.T) {
 			Tag:         []int{1},
 		},
 	}
-	testData := cache.CacheData{
+	testData := cache.Data{
 		"Logical_Switch_Port": lspCache,
 	}
 	tcache := apiTestCache(t, testData)
@@ -1060,7 +1060,7 @@ func TestAPIDelete(t *testing.T) {
 			Tag:         []int{1},
 		},
 	}
-	testData := cache.CacheData{
+	testData := cache.Data{
 		"Logical_Switch_Port": lspCache,
 	}
 	tcache := apiTestCache(t, testData)
diff --git a/client/api_test_model.go b/client/api_test_model.go
index 42b1566..a28a603 100644
--- a/client/api_test_model.go
+++ b/client/api_test_model.go
@@ -117,7 +117,7 @@ type testLogicalSwitch struct {
 	Name             string            `ovsdb:"name"`
 	QosRules         []string          `ovsdb:"qos_rules"`
 	LoadBalancer     []string          `ovsdb:"load_balancer"`
-	DnsRecords       []string          `ovsdb:"dns_records"`
+	DNSRecords       []string          `ovsdb:"dns_records"`
 	OtherConfig      map[string]string `ovsdb:"other_config"`
 	ForwardingGroups []string          `ovsdb:"forwarding_groups"`
 	Acls             []string          `ovsdb:"acls"`
diff --git a/client/condition_test.go b/client/condition_test.go
index 5ca45b7..7c44efb 100644
--- a/client/condition_test.go
+++ b/client/condition_test.go
@@ -41,7 +41,7 @@ func TestEqualityConditional(t *testing.T) {
 	for i := range lspcacheList {
 		lspcache[lspcacheList[i].(*testLogicalSwitchPort).UUID] = lspcacheList[i]
 	}
-	testData := cache.CacheData{
+	testData := cache.Data{
 		"Logical_Switch_Port": lspcache,
 	}
 	tcache := apiTestCache(t, testData)
@@ -181,7 +181,7 @@ func TestPredicateConditional(t *testing.T) {
 	for i := range lspcacheList {
 		lspcache[lspcacheList[i].(*testLogicalSwitchPort).UUID] = lspcacheList[i]
 	}
-	testData := cache.CacheData{
+	testData := cache.Data{
 		"Logical_Switch_Port": lspcache,
 	}
 	tcache := apiTestCache(t, testData)
@@ -290,7 +290,7 @@ func TestExplicitConditional(t *testing.T) {
 	for i := range lspcacheList {
 		lspcache[lspcacheList[i].(*testLogicalSwitchPort).UUID] = lspcacheList[i]
 	}
-	testData := cache.CacheData{
+	testData := cache.Data{
 		"Logical_Switch_Port": lspcache,
 	}
 	tcache := apiTestCache(t, testData)
diff --git a/mapper/info_test.go b/mapper/info_test.go
index 370855a..b50633f 100644
--- a/mapper/info_test.go
+++ b/mapper/info_test.go
@@ -58,7 +58,7 @@ func TestNewMapperInfo(t *testing.T) {
 			err := json.Unmarshal(tt.table, &table)
 			assert.Nil(t, err)
 
-			info, err := NewMapperInfo(&table, tt.obj)
+			info, err := NewInfo(&table, tt.obj)
 			if tt.err {
 				assert.NotNil(t, err)
 			} else {
@@ -127,7 +127,7 @@ func TestMapperInfoSet(t *testing.T) {
 			err:    false,
 		},
 		{
-			name:   "unassignalbe",
+			name:   "un-assignable",
 			table:  sampleTable,
 			obj:    &obj{},
 			field:  []string{"foo"},
@@ -141,7 +141,7 @@ func TestMapperInfoSet(t *testing.T) {
 			err := json.Unmarshal(tt.table, &table)
 			assert.Nil(t, err)
 
-			info, err := NewMapperInfo(&table, tt.obj)
+			info, err := NewInfo(&table, tt.obj)
 			assert.Nil(t, err)
 
 			err = info.SetField(tt.column, tt.field)
@@ -222,7 +222,7 @@ func TestMapperInfoColByPtr(t *testing.T) {
 			err := json.Unmarshal(tt.table, &table)
 			assert.Nil(t, err)
 
-			info, err := NewMapperInfo(&table, tt.obj)
+			info, err := NewInfo(&table, tt.obj)
 			assert.Nil(t, err)
 
 			col, err := info.ColumnByPtr(tt.field)
@@ -354,7 +354,7 @@ func TestOrmGetIndex(t *testing.T) {
 	}
 	for _, tt := range tests {
 		t.Run(fmt.Sprintf("GetValidIndexes_%s", tt.name), func(t *testing.T) {
-			info, err := NewMapperInfo(&table, tt.obj)
+			info, err := NewInfo(&table, tt.obj)
 			assert.Nil(t, err)
 
 			indexes, err := info.getValidIndexes()
diff --git a/mapper/mapper_test.go b/mapper/mapper_test.go
index bb563b4..c883992 100644
--- a/mapper/mapper_test.go
+++ b/mapper/mapper_test.go
@@ -859,7 +859,7 @@ func TestMapperEqualIndexes(t *testing.T) {
 	eq, err := mapper.EqualFields("TestTable", &obj1, &obj2, &obj1.Int1, &obj1.Int2)
 	assert.Nil(t, err)
 	assert.True(t, eq)
-	// Useing pointers to second value is not supported
+	// Using pointers to second value is not supported
 	_, err = mapper.EqualFields("TestTable", &obj1, &obj2, &obj2.Int1, &obj2.Int2)
 	assert.NotNil(t, err)
 
diff --git a/model/model_test.go b/model/model_test.go
index 3f97bf8..1579fad 100644
--- a/model/model_test.go
+++ b/model/model_test.go
@@ -69,7 +69,7 @@ func TestNewModel(t *testing.T) {
 	assert.NotNilf(t, err, "Creating model from unknown table should fail")
 	model, err := db.NewModel("Test_A")
 	assert.Nilf(t, err, "Creating model from valid table should succeed")
-	assert.IsTypef(t, model, &modelA{}, "model creation should return the apropriate type")
+	assert.IsTypef(t, model, &modelA{}, "model creation should return the appropriate type")
 }
 
 func TestSetUUID(t *testing.T) {
diff --git a/ovsdb/bindings_test.go b/ovsdb/bindings_test.go
index af901ab..cc30014 100644
--- a/ovsdb/bindings_test.go
+++ b/ovsdb/bindings_test.go
@@ -507,7 +507,7 @@ func TestOvsToNativeErr(t *testing.T) {
 
 			res, err := OvsToNative(&column, trans["ovs"])
 			if err == nil {
-				t.Errorf("convertion %s should have failed, instead it has returned %v (%s)", trans, res, reflect.TypeOf(res))
+				t.Errorf("conversion %s should have failed, instead it has returned %v (%s)", trans, res, reflect.TypeOf(res))
 				t.Logf("Conversion schema %v", string(trans["schema"].([]byte)))
 			}
 		})
@@ -528,7 +528,7 @@ func TestNativeToOvsErr(t *testing.T) {
 
 			res, err := NativeToOvs(&column, trans["native"])
 			if err == nil {
-				t.Errorf("convertion %s should have failed, instead it has returned %v (%s)", trans, res, reflect.TypeOf(res))
+				t.Errorf("conversion %s should have failed, instead it has returned %v (%s)", trans, res, reflect.TypeOf(res))
 				t.Logf("Conversion schema %v", string(trans["schema"].([]byte)))
 			}
 		})
diff --git a/server/database_test.go b/server/database_test.go
index 08dd36d..614af55 100644
--- a/server/database_test.go
+++ b/server/database_test.go
@@ -1,7 +1,6 @@
 package server
 
 import (
-	"reflect"
 	"testing"
 
 	"github.com/google/uuid"
@@ -12,179 +11,6 @@ import (
 	"github.com/stretchr/testify/require"
 )
 
-func TestMutate(t *testing.T) {
-	tests := []struct {
-		name    string
-		current interface{}
-		mutator ovsdb.Mutator
-		value   interface{}
-		want    interface{}
-	}{
-		{
-			"add int",
-			1,
-			ovsdb.MutateOperationAdd,
-			1,
-			2,
-		},
-		{
-			"add float",
-			1.0,
-			ovsdb.MutateOperationAdd,
-			1.0,
-			2.0,
-		},
-		{
-			"add float set",
-			[]float64{1.0, 2.0, 3.0},
-			ovsdb.MutateOperationAdd,
-			1.0,
-			[]float64{2.0, 3.0, 4.0},
-		},
-		{
-			"add int set float",
-			[]int{1, 2, 3},
-			ovsdb.MutateOperationAdd,
-			1,
-			[]int{2, 3, 4},
-		},
-		{
-			"subtract int",
-			1,
-			ovsdb.MutateOperationSubtract,
-			1,
-			0,
-		},
-		{
-			"subtract float",
-			1.0,
-			ovsdb.MutateOperationSubtract,
-			1.0,
-			0.0,
-		},
-		{
-			"subtract float set",
-			[]float64{1.0, 2.0, 3.0},
-			ovsdb.MutateOperationSubtract,
-			1.0,
-			[]float64{0.0, 1.0, 2.0},
-		},
-		{
-			"subtract int set",
-			[]int{1, 2, 3},
-			ovsdb.MutateOperationSubtract,
-			1,
-			[]int{0, 1, 2},
-		},
-		{
-			"multiply int",
-			1,
-			ovsdb.MutateOperationMultiply,
-			2,
-			2,
-		},
-		{
-			"multiply float",
-			1.0,
-			ovsdb.MutateOperationMultiply,
-			2.0,
-			2.0,
-		},
-		{
-			"multiply float set",
-			[]float64{1.0, 2.0, 3.0},
-			ovsdb.MutateOperationMultiply,
-			2.0,
-			[]float64{2.0, 4.0, 6.0},
-		},
-		{
-			"multiply int set",
-			[]int{1, 2, 3},
-			ovsdb.MutateOperationMultiply,
-			2,
-			[]int{2, 4, 6},
-		},
-		{
-			"divide int",
-			10,
-			ovsdb.MutateOperationDivide,
-			2,
-			5,
-		},
-		{
-			"divide float",
-			1.0,
-			ovsdb.MutateOperationDivide,
-			2.0,
-			0.5,
-		},
-		{
-			"divide float set",
-			[]float64{1.0, 2.0, 4.0},
-			ovsdb.MutateOperationDivide,
-			2.0,
-			[]float64{0.5, 1.0, 2.0},
-		},
-		{
-			"divide int set",
-			[]int{10, 20, 30},
-			ovsdb.MutateOperationDivide,
-			5,
-			[]int{2, 4, 6},
-		},
-		{
-			"modulo int",
-			3,
-			ovsdb.MutateOperationModulo,
-			2,
-			1,
-		},
-		{
-			"modulo int set",
-			[]int{3, 5, 7},
-			ovsdb.MutateOperationModulo,
-			2,
-			[]int{1, 1, 1},
-		},
-		{
-			"insert single string",
-			[]string{"foo", "bar"},
-			ovsdb.MutateOperationInsert,
-			"baz",
-			[]string{"foo", "bar", "baz"},
-		},
-		{
-			"insert multiple string",
-			[]string{"foo", "bar"},
-			ovsdb.MutateOperationInsert,
-			[]string{"baz", "quux"},
-			[]string{"foo", "bar", "baz", "quux"},
-		},
-		{
-			"delete single string",
-			[]string{"foo", "bar"},
-			ovsdb.MutateOperationDelete,
-			"bar",
-			[]string{"foo"},
-		},
-		{
-			"delete multiple string",
-			[]string{"foo", "bar", "baz"},
-			ovsdb.MutateOperationDelete,
-			[]string{"bar", "baz"},
-			[]string{"foo"},
-		},
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			got := mutate(tt.current, tt.mutator, tt.value)
-			if !reflect.DeepEqual(got, tt.want) {
-				t.Errorf("mutate() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
-
 func TestMutateOp(t *testing.T) {
 	defDB, err := model.NewDBModel("Open_vSwitch", map[string]model.Model{
 		"Open_vSwitch": &ovsType{},
diff --git a/server/mutate_test.go b/server/mutate_test.go
new file mode 100644
index 0000000..433e265
--- /dev/null
+++ b/server/mutate_test.go
@@ -0,0 +1,297 @@
+package server
+
+import (
+	"reflect"
+	"testing"
+
+	"github.com/ovn-org/libovsdb/ovsdb"
+)
+
+func TestMutateAdd(t *testing.T) {
+	tests := []struct {
+		name    string
+		current interface{}
+		mutator ovsdb.Mutator
+		value   interface{}
+		want    interface{}
+	}{
+		{
+			"add int",
+			1,
+			ovsdb.MutateOperationAdd,
+			1,
+			2,
+		},
+		{
+			"add float",
+			1.0,
+			ovsdb.MutateOperationAdd,
+			1.0,
+			2.0,
+		},
+		{
+			"add float set",
+			[]float64{1.0, 2.0, 3.0},
+			ovsdb.MutateOperationAdd,
+			1.0,
+			[]float64{2.0, 3.0, 4.0},
+		},
+		{
+			"add int set float",
+			[]int{1, 2, 3},
+			ovsdb.MutateOperationAdd,
+			1,
+			[]int{2, 3, 4},
+		},
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			got := mutate(tt.current, tt.mutator, tt.value)
+			if !reflect.DeepEqual(got, tt.want) {
+				t.Errorf("mutate() = %v, want %v", got, tt.want)
+			}
+		})
+	}
+}
+
+func TestMutateSubtract(t *testing.T) {
+	tests := []struct {
+		name    string
+		current interface{}
+		mutator ovsdb.Mutator
+		value   interface{}
+		want    interface{}
+	}{
+
+		{
+			"subtract int",
+			1,
+			ovsdb.MutateOperationSubtract,
+			1,
+			0,
+		},
+		{
+			"subtract float",
+			1.0,
+			ovsdb.MutateOperationSubtract,
+			1.0,
+			0.0,
+		},
+		{
+			"subtract float set",
+			[]float64{1.0, 2.0, 3.0},
+			ovsdb.MutateOperationSubtract,
+			1.0,
+			[]float64{0.0, 1.0, 2.0},
+		},
+		{
+			"subtract int set",
+			[]int{1, 2, 3},
+			ovsdb.MutateOperationSubtract,
+			1,
+			[]int{0, 1, 2},
+		},
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			got := mutate(tt.current, tt.mutator, tt.value)
+			if !reflect.DeepEqual(got, tt.want) {
+				t.Errorf("mutate() = %v, want %v", got, tt.want)
+			}
+		})
+	}
+}
+
+func TestMutateMultiply(t *testing.T) {
+	tests := []struct {
+		name    string
+		current interface{}
+		mutator ovsdb.Mutator
+		value   interface{}
+		want    interface{}
+	}{
+
+		{
+			"multiply int",
+			1,
+			ovsdb.MutateOperationMultiply,
+			2,
+			2,
+		},
+		{
+			"multiply float",
+			1.0,
+			ovsdb.MutateOperationMultiply,
+			2.0,
+			2.0,
+		},
+		{
+			"multiply float set",
+			[]float64{1.0, 2.0, 3.0},
+			ovsdb.MutateOperationMultiply,
+			2.0,
+			[]float64{2.0, 4.0, 6.0},
+		},
+		{
+			"multiply int set",
+			[]int{1, 2, 3},
+			ovsdb.MutateOperationMultiply,
+			2,
+			[]int{2, 4, 6},
+		},
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			got := mutate(tt.current, tt.mutator, tt.value)
+			if !reflect.DeepEqual(got, tt.want) {
+				t.Errorf("mutate() = %v, want %v", got, tt.want)
+			}
+		})
+	}
+}
+
+func TestMutateDivide(t *testing.T) {
+	tests := []struct {
+		name    string
+		current interface{}
+		mutator ovsdb.Mutator
+		value   interface{}
+		want    interface{}
+	}{
+		{
+			"divide int",
+			10,
+			ovsdb.MutateOperationDivide,
+			2,
+			5,
+		},
+		{
+			"divide float",
+			1.0,
+			ovsdb.MutateOperationDivide,
+			2.0,
+			0.5,
+		},
+		{
+			"divide float set",
+			[]float64{1.0, 2.0, 4.0},
+			ovsdb.MutateOperationDivide,
+			2.0,
+			[]float64{0.5, 1.0, 2.0},
+		},
+		{
+			"divide int set",
+			[]int{10, 20, 30},
+			ovsdb.MutateOperationDivide,
+			5,
+			[]int{2, 4, 6},
+		},
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			got := mutate(tt.current, tt.mutator, tt.value)
+			if !reflect.DeepEqual(got, tt.want) {
+				t.Errorf("mutate() = %v, want %v", got, tt.want)
+			}
+		})
+	}
+}
+
+func TestMutateModulo(t *testing.T) {
+	tests := []struct {
+		name    string
+		current interface{}
+		mutator ovsdb.Mutator
+		value   interface{}
+		want    interface{}
+	}{
+		{
+			"modulo int",
+			3,
+			ovsdb.MutateOperationModulo,
+			2,
+			1,
+		},
+		{
+			"modulo int set",
+			[]int{3, 5, 7},
+			ovsdb.MutateOperationModulo,
+			2,
+			[]int{1, 1, 1},
+		},
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			got := mutate(tt.current, tt.mutator, tt.value)
+			if !reflect.DeepEqual(got, tt.want) {
+				t.Errorf("mutate() = %v, want %v", got, tt.want)
+			}
+		})
+	}
+}
+
+func TestMutateInsert(t *testing.T) {
+	tests := []struct {
+		name    string
+		current interface{}
+		mutator ovsdb.Mutator
+		value   interface{}
+		want    interface{}
+	}{
+		{
+			"insert single string",
+			[]string{"foo", "bar"},
+			ovsdb.MutateOperationInsert,
+			"baz",
+			[]string{"foo", "bar", "baz"},
+		},
+		{
+			"insert multiple string",
+			[]string{"foo", "bar"},
+			ovsdb.MutateOperationInsert,
+			[]string{"baz", "quux"},
+			[]string{"foo", "bar", "baz", "quux"},
+		},
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			got := mutate(tt.current, tt.mutator, tt.value)
+			if !reflect.DeepEqual(got, tt.want) {
+				t.Errorf("mutate() = %v, want %v", got, tt.want)
+			}
+		})
+	}
+}
+
+func TestMutateDelete(t *testing.T) {
+	tests := []struct {
+		name    string
+		current interface{}
+		mutator ovsdb.Mutator
+		value   interface{}
+		want    interface{}
+	}{
+		{
+			"delete single string",
+			[]string{"foo", "bar"},
+			ovsdb.MutateOperationDelete,
+			"bar",
+			[]string{"foo"},
+		},
+		{
+			"delete multiple string",
+			[]string{"foo", "bar", "baz"},
+			ovsdb.MutateOperationDelete,
+			[]string{"bar", "baz"},
+			[]string{"foo"},
+		},
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			got := mutate(tt.current, tt.mutator, tt.value)
+			if !reflect.DeepEqual(got, tt.want) {
+				t.Errorf("mutate() = %v, want %v", got, tt.want)
+			}
+		})
+	}
+}