diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-11 23:18:29 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-11 23:18:29 +0800 |
commit | c8d682174aaceab749302dd543122f60193dafbb (patch) | |
tree | 880e84741c72b30a41b6f2f052e260fe5da447d9 | |
parent | *.go: Remove extra TODOs (diff) | |
download | forge-c8d682174aaceab749302dd543122f60193dafbb.tar.gz forge-c8d682174aaceab749302dd543122f60193dafbb.tar.zst forge-c8d682174aaceab749302dd543122f60193dafbb.zip |
*.go: Reformat
-rw-r--r-- | git_format_patch.go | 1 | ||||
-rw-r--r-- | handle_repo_commit.go | 2 | ||||
-rw-r--r-- | ref.go | 4 | ||||
-rw-r--r-- | url_misc.go | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/git_format_patch.go b/git_format_patch.go index c899ed5..1f282fa 100644 --- a/git_format_patch.go +++ b/git_format_patch.go @@ -56,4 +56,3 @@ func format_patch_from_commit(commit *object.Commit) (string, error) { return buf.String(), nil } - diff --git a/handle_repo_commit.go b/handle_repo_commit.go index 4bec9dd..56103e7 100644 --- a/handle_repo_commit.go +++ b/handle_repo_commit.go @@ -42,7 +42,7 @@ func handle_repo_commit(w http.ResponseWriter, r *http.Request) { commit_id_string := commit_object.Hash.String() if commit_id_string != commit_id_specified_string { - http.Redirect(w, r, commit_id_string, http.StatusSeeOther) + http.Redirect(w, r, commit_id_string, http.StatusSeeOther) return } @@ -9,9 +9,9 @@ import ( ) var ( - err_getting_tag_reference = errors.New("Error getting tag reference") + err_getting_tag_reference = errors.New("Error getting tag reference") err_getting_branch_reference = errors.New("Error getting branch reference") - err_getting_head = errors.New("Error getting HEAD") + err_getting_head = errors.New("Error getting HEAD") ) func get_ref_hash_from_type_and_name(repo *git.Repository, ref_type, ref_name string) (ref_hash plumbing.Hash, ret_err error) { diff --git a/url_misc.go b/url_misc.go index 906e06e..cbb30d6 100644 --- a/url_misc.go +++ b/url_misc.go @@ -8,7 +8,7 @@ import ( var ( err_duplicate_ref_spec = errors.New("Duplicate ref spec") - err_no_ref_spec = errors.New("No ref spec") + err_no_ref_spec = errors.New("No ref spec") ) func get_param_ref_and_type(r *http.Request) (ref_type, ref string, err error) { |