0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-26 23:24:42 +01:00
gitea/models
Gusted d2163df6a0
Fix offBy1 errors (#17606)
* Fix offBy1 errors

- Partially resolves #17596
- Resolve errors from go-critic `offBy1: Index() can return -1; maybe
you wanted to do Index()+1`.

* Match golang spec

* Remove comments

* Update migrations.go

* Apply suggestions from code review

Co-authored-by: delvh <dev.lh@web.de>

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-11-14 10:11:49 +02:00
..
appstate Sync gitea app path for git hooks and authorized keys when starting (#17335) 2021-10-21 17:22:43 +08:00
avatars
db
fixtures
issues
login
migrations
unit
unittest
user
webhook Decouple unit test code from business code (#17623) 2021-11-12 22:36:47 +08:00
access.go Nicely handle missing user in collaborations (#17049) 2021-09-27 19:07:19 +01:00
access_test.go
action.go
action_list.go
action_test.go
admin.go Fix problem when database ID is not incremented as expected (#17229) 2021-10-06 15:36:24 -05:00
admin_test.go
attachment.go
attachment_test.go
branches.go Move unit into models/unit/ (#17576) 2021-11-09 20:57:58 +01:00
branches_test.go Decouple unit test code from business code (#17623) 2021-11-12 22:36:47 +08:00
commit.go Replace list.List with slices (#16311) 2021-08-09 14:08:51 -04:00
commit_status.go
commit_status_test.go Decouple unit test code from business code (#17623) 2021-11-12 22:36:47 +08:00
consistency.go
consistency_test.go
engine_test.go
error.go Move EmailAddress & UserRedirect into models/user/ (#17607) 2021-11-11 15:03:30 +08:00
external_login_user.go
fixture_generation.go
fixture_test.go
gpg_key.go
gpg_key_add.go
gpg_key_commit_verification.go
gpg_key_common.go
gpg_key_import.go
gpg_key_test.go
gpg_key_verify.go
helper.go Create doctor command to fix repo_units broken by dumps from 1.14.3-1.14.6 (#17136) 2021-09-27 16:55:12 +01:00
helper_directory.go
helper_environment.go
issue.go
issue_assignees.go
issue_assignees_test.go
issue_comment.go
issue_comment_list.go
issue_comment_test.go
issue_dependency.go Move unit into models/unit/ (#17576) 2021-11-09 20:57:58 +01:00
issue_dependency_test.go
issue_label.go
issue_label_test.go
issue_list.go
issue_list_test.go
issue_lock.go
issue_milestone.go
issue_milestone_test.go
issue_reaction.go
issue_reaction_test.go
issue_stopwatch.go
issue_stopwatch_test.go
issue_test.go
issue_tracked_time.go Move login related structs and functions to models/login (#17093) 2021-09-24 19:32:56 +08:00
issue_tracked_time_test.go
issue_user.go
issue_user_test.go Decouple unit test code from business code (#17623) 2021-11-12 22:36:47 +08:00
issue_watch.go Move login related structs and functions to models/login (#17093) 2021-09-24 19:32:56 +08:00
issue_watch_test.go
issue_xref.go
issue_xref_test.go
lfs.go
lfs_lock.go
main_test.go
migrate.go DBContext is just a Context (#17100) 2021-09-23 23:45:36 +08:00
notification.go Fix 500 when a comment was deleted which has a notification (#17550) 2021-11-10 13:48:45 +08:00
notification_test.go Decouple unit test code from business code (#17623) 2021-11-12 22:36:47 +08:00
org.go Move EmailAddress & UserRedirect into models/user/ (#17607) 2021-11-11 15:03:30 +08:00
org_team.go Move unit into models/unit/ (#17576) 2021-11-09 20:57:58 +01:00
org_team_test.go
org_test.go
project.go
project_board.go
project_issue.go
project_test.go
protected_tag.go
protected_tag_test.go
pull.go Move unit into models/unit/ (#17576) 2021-11-09 20:57:58 +01:00
pull_list.go
pull_sign.go Move twofactor to models/login (#17143) 2021-09-25 15:00:12 +02:00
pull_test.go
release.go Move login related structs and functions to models/login (#17093) 2021-09-24 19:32:56 +08:00
repo.go
repo_activity.go
repo_archiver.go
repo_avatar.go
repo_branch.go
repo_collaboration.go
repo_collaboration_test.go
repo_generate.go
repo_generate_test.go Fixed assert statements. (#16089) 2021-06-07 07:27:09 +02:00
repo_indexer.go
repo_issue.go
repo_language_stats.go
repo_list.go
repo_list_test.go
repo_mirror.go
repo_permission.go
repo_permission_test.go
repo_pushmirror.go DBContext is just a Context (#17100) 2021-09-23 23:45:36 +08:00
repo_pushmirror_test.go
repo_redirect.go
repo_redirect_test.go
repo_sign.go Move twofactor to models/login (#17143) 2021-09-25 15:00:12 +02:00
repo_test.go Decouple unit test code from business code (#17623) 2021-11-12 22:36:47 +08:00
repo_transfer.go
repo_transfer_test.go
repo_unit.go
repo_watch.go
repo_watch_test.go
review.go
review_test.go
ssh_key.go
ssh_key_authorized_keys.go
ssh_key_authorized_principals.go
ssh_key_deploy.go
ssh_key_fingerprint.go
ssh_key_parse.go
ssh_key_principals.go Move EmailAddress & UserRedirect into models/user/ (#17607) 2021-11-11 15:03:30 +08:00
ssh_key_test.go
star.go
star_test.go
statistic.go Move webhook into models/webhook/ (#17579) 2021-11-10 13:13:16 +08:00
task.go DBContext is just a Context (#17100) 2021-09-23 23:45:36 +08:00
token.go
token_test.go
topic.go Move login related structs and functions to models/login (#17093) 2021-09-24 19:32:56 +08:00
topic_test.go Decouple unit test code from business code (#17623) 2021-11-12 22:36:47 +08:00
update.go
upload.go
user.go
user_avatar.go
user_email.go Move EmailAddress & UserRedirect into models/user/ (#17607) 2021-11-11 15:03:30 +08:00
user_email_test.go
user_follow.go DBContext is just a Context (#17100) 2021-09-23 23:45:36 +08:00
user_follow_test.go
user_heatmap.go
user_heatmap_test.go Decouple unit test code from business code (#17623) 2021-11-12 22:36:47 +08:00
user_openid.go
user_openid_test.go Decouple unit test code from business code (#17623) 2021-11-12 22:36:47 +08:00
user_test.go
userlist.go
userlist_test.go Decouple unit test code from business code (#17623) 2021-11-12 22:36:47 +08:00
wiki.go
wiki_test.go