pass golint

This commit is contained in:
Wenkai Yin 2016-06-06 17:46:19 +08:00
parent e8cad0f9f3
commit 4fbe18cb03
2 changed files with 3 additions and 3 deletions

View File

@ -70,7 +70,7 @@ func (pa *RepPolicyAPI) Get() {
// Post creates a policy, and if it is enbled, the replication will be triggered right now.
func (pa *RepPolicyAPI) Post() {
policy := &models.RepPolicy{}
pa.DecodeJsonReqAndValidate(policy)
pa.DecodeJSONReqAndValidate(policy)
po, err := dao.GetRepPolicyByName(policy.Name)
if err != nil {

View File

@ -164,7 +164,7 @@ func (t *TargetAPI) Get() {
// Post ...
func (t *TargetAPI) Post() {
target := &models.RepTarget{}
t.DecodeJsonReqAndValidate(target)
t.DecodeJSONReqAndValidate(target)
ta, err := dao.GetRepTargetByName(target.Name)
if err != nil {
@ -197,7 +197,7 @@ func (t *TargetAPI) Put() {
}
target := &models.RepTarget{}
t.DecodeJsonReqAndValidate(target)
t.DecodeJSONReqAndValidate(target)
originTarget, err := dao.GetRepTarget(id)
if err != nil {