0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-17 07:21:15 +01:00

Fix source typos (#18227)

Follow-up to #18219
This commit is contained in:
luzpaz 2022-01-10 10:46:26 -05:00 committed by GitHub
parent 8c647bf0f6
commit af92473920
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -87,8 +87,8 @@ func AddChanges(repoPath string, all bool, files ...string) error {
} }
// AddChangesWithArgs marks local changes to be ready for commit. // AddChangesWithArgs marks local changes to be ready for commit.
func AddChangesWithArgs(repoPath string, gloablArgs []string, all bool, files ...string) error { func AddChangesWithArgs(repoPath string, globalArgs []string, all bool, files ...string) error {
cmd := NewCommandNoGlobals(append(gloablArgs, "add")...) cmd := NewCommandNoGlobals(append(globalArgs, "add")...)
if all { if all {
cmd.AddArguments("--all") cmd.AddArguments("--all")
} }

View file

@ -117,7 +117,7 @@ func (a *BasicTransferAdapter) performRequest(ctx context.Context, method string
func handleErrorResponse(resp *http.Response) error { func handleErrorResponse(resp *http.Response) error {
defer resp.Body.Close() defer resp.Body.Close()
er, err := decodeReponseError(resp.Body) er, err := decodeResponseError(resp.Body)
if err != nil { if err != nil {
return fmt.Errorf("Request failed with status %s", resp.Status) return fmt.Errorf("Request failed with status %s", resp.Status)
} }
@ -125,7 +125,7 @@ func handleErrorResponse(resp *http.Response) error {
return errors.New(er.Message) return errors.New(er.Message)
} }
func decodeReponseError(r io.Reader) (ErrorResponse, error) { func decodeResponseError(r io.Reader) (ErrorResponse, error) {
var er ErrorResponse var er ErrorResponse
err := json.NewDecoder(r).Decode(&er) err := json.NewDecoder(r).Decode(&er)
if err != nil { if err != nil {