Usage of both value and pointer receivers GO-W1029
Anti-pattern
Major
3 months ago3 months old
Type "MigrateRepo" has both value and pointer receivers
 60// and returns composed URL with needed username and password.
 61// It also checks if given user has permission when remote address
 62// is actually a local path.
 63func (f MigrateRepo) ParseRemoteAddr(user *database.User) (string, error) { 64	remoteAddr := strings.TrimSpace(f.CloneAddr)
 65
 66	// Remote address can be HTTP/HTTPS/Git URL or local path.
Type "MigrateRepo" has both value and pointer receivers
 52	Description  string `json:"description" binding:"MaxSize(512)"`
 53}
 54
 55func (f *MigrateRepo) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { 56	return validate(errs, ctx.Data, f, ctx.Locale)
 57}
 58