mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-21 23:21:26 +01:00
pass golint
This commit is contained in:
parent
e8cad0f9f3
commit
4fbe18cb03
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user