From c8d682174aaceab749302dd543122f60193dafbb Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Tue, 11 Feb 2025 23:18:29 +0800 Subject: [PATCH] *.go: Reformat --- git_format_patch.go | 1 - handle_repo_commit.go | 2 +- ref.go | 4 ++-- url_misc.go | 2 +- diff --git a/git_format_patch.go b/git_format_patch.go index c899ed591d0b2ab73ab76024f0c176fa72beebcb..1f282fa440054efd54f958008f39b0960562bfd6 100644 --- a/git_format_patch.go +++ b/git_format_patch.go @@ -56,4 +56,3 @@ fmt.Fprintf(&buf, "\n-- \n2.48.1\n") return buf.String(), nil } - diff --git a/handle_repo_commit.go b/handle_repo_commit.go index 4bec9ddc99d8c9959131e8eefa12ae023421d547..56103e7e3b8654720a5a8f35064e4b4909b204e8 100644 --- a/handle_repo_commit.go +++ b/handle_repo_commit.go @@ -42,7 +42,7 @@ } 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 } diff --git a/ref.go b/ref.go index 19856e74d73000f4df400c726a5b08eaa5aa229c..08d757bbd1e83acf75fe3b3f44cc8840698cec8d 100644 --- a/ref.go +++ b/ref.go @@ -9,9 +9,9 @@ "go.lindenii.runxiyu.org/lindenii-common/misc" ) 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 906e06e5c5eba355ddbe91c84878f299d34587c6..cbb30d6e2238abca58e3d08c527cd8a7a4cdffde 100644 --- a/url_misc.go +++ b/url_misc.go @@ -8,7 +8,7 @@ ) 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) { -- 2.48.1