From 3e979b6aae5603bf08021a49a95fe6a576496dae Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Tue, 11 Feb 2025 19:57:27 +0800 Subject: [PATCH] *.go: Reformat --- git_misc.go | 2 +- handle_repo_raw.go | 2 +- handle_repo_tree.go | 2 +- diff --git a/git_misc.go b/git_misc.go index 3aded4fc55499483343235df0b147603ced62e97..01e1191298d2d9cff4255bb60d8b389ae649ee67 100644 --- a/git_misc.go +++ b/git_misc.go @@ -2,9 +2,9 @@ package main import ( "errors" + "io" "path/filepath" "strings" - "io" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing" diff --git a/handle_repo_raw.go b/handle_repo_raw.go index 811fea8e0aa6b67aa772e3efaa48260d13c362d1..5693660a67346c02b5143c432bfb4852ba49c559 100644 --- a/handle_repo_raw.go +++ b/handle_repo_raw.go @@ -49,7 +49,7 @@ _, _ = w.Write([]byte("Error retrieving path: " + err.Error())) return } if len(raw_path_spec) != 0 && raw_path_spec[len(raw_path_spec)-1] == '/' { - http.Redirect(w, r, "../" + path_spec, http.StatusSeeOther) + http.Redirect(w, r, "../"+path_spec, http.StatusSeeOther) return } file_contents, err := file.Contents() diff --git a/handle_repo_tree.go b/handle_repo_tree.go index 1ef71791a812aa38f2a74044aff17acad6e6dd0c..2c1c31e6827fb1530a36d8e8634a9058dbe73f2e 100644 --- a/handle_repo_tree.go +++ b/handle_repo_tree.go @@ -54,7 +54,7 @@ _, _ = w.Write([]byte("Error retrieving path: " + err.Error())) return } if len(raw_path_spec) != 0 && raw_path_spec[len(raw_path_spec)-1] == '/' { - http.Redirect(w, r, "../" + path_spec, http.StatusSeeOther) + http.Redirect(w, r, "../"+path_spec, http.StatusSeeOther) return } file_contents, err := file.Contents() -- 2.48.1