Fix golint warnings (#189)
* Fix goling warnings Signed-off-by: Dejan Mijic <dejan@mainflux.com> * Bump version to 0.1.2 Signed-off-by: Dejan Mijic <dejan@mainflux.com>
This commit is contained in:
parent
bf5d1544b6
commit
e42d422410
|
@ -2,7 +2,7 @@ package postgres
|
|||
|
||||
import (
|
||||
"github.com/jinzhu/gorm"
|
||||
_ "github.com/jinzhu/gorm/dialects/postgres"
|
||||
_ "github.com/jinzhu/gorm/dialects/postgres" // required by GORM
|
||||
"github.com/mainflux/mainflux/manager"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
)
|
||||
|
@ -13,6 +13,8 @@ type channelRepository struct {
|
|||
db *gorm.DB
|
||||
}
|
||||
|
||||
// NewChannelRepository instantiates a PostgreSQL implementation of channel
|
||||
// repository.
|
||||
func NewChannelRepository(db *gorm.DB) manager.ChannelRepository {
|
||||
return &channelRepository{db}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package postgres
|
|||
|
||||
import (
|
||||
"github.com/jinzhu/gorm"
|
||||
_ "github.com/jinzhu/gorm/dialects/postgres"
|
||||
_ "github.com/jinzhu/gorm/dialects/postgres" // required by GORM
|
||||
"github.com/mainflux/mainflux/manager"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
)
|
||||
|
@ -24,11 +24,7 @@ func (cr *clientRepository) Id() string {
|
|||
}
|
||||
|
||||
func (cr *clientRepository) Save(client manager.Client) error {
|
||||
if err := cr.db.Create(&client).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return cr.db.Create(&client).Error
|
||||
}
|
||||
|
||||
func (cr *clientRepository) Update(client manager.Client) error {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/jinzhu/gorm"
|
||||
_ "github.com/jinzhu/gorm/dialects/postgres"
|
||||
_ "github.com/jinzhu/gorm/dialects/postgres" // required by GORM
|
||||
"github.com/mainflux/mainflux/manager"
|
||||
)
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package postgres
|
|||
|
||||
import (
|
||||
"github.com/jinzhu/gorm"
|
||||
_ "github.com/jinzhu/gorm/dialects/postgres"
|
||||
_ "github.com/jinzhu/gorm/dialects/postgres" // required by GORM
|
||||
"github.com/lib/pq"
|
||||
"github.com/mainflux/mainflux/manager"
|
||||
)
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
const version string = "0.1.1"
|
||||
const version string = "0.1.2"
|
||||
|
||||
type response struct {
|
||||
Version string
|
||||
|
|
Loading…
Reference in New Issue