mirror of https://github.com/gogs/gogs.git
chore: fix lint errors (#6951)
parent
a6c53eb068
commit
c4b770f305
|
@ -315,9 +315,7 @@ func (issue *Issue) clearLabels(e *xorm.Session) (err error) {
|
|||
|
||||
// NOTE: issue.removeLabel slices issue.Labels, so we need to create another slice to be unaffected.
|
||||
labels := make([]*Label, len(issue.Labels))
|
||||
for i := range issue.Labels {
|
||||
labels[i] = issue.Labels[i]
|
||||
}
|
||||
copy(labels, issue.Labels)
|
||||
for i := range labels {
|
||||
if err = issue.removeLabel(e, labels[i]); err != nil {
|
||||
return fmt.Errorf("removeLabel: %v", err)
|
||||
|
|
|
@ -99,11 +99,8 @@ func validate(errs binding.Errors, data map[string]interface{}, f Form, l macaro
|
|||
Assign(f, data)
|
||||
|
||||
typ := reflect.TypeOf(f)
|
||||
val := reflect.ValueOf(f)
|
||||
|
||||
if typ.Kind() == reflect.Ptr {
|
||||
typ = typ.Elem()
|
||||
val = val.Elem()
|
||||
}
|
||||
|
||||
for i := 0; i < typ.NumField(); i++ {
|
||||
|
|
Loading…
Reference in New Issue