Skip to content

Commit f8f8c2a

Browse files
committed
[housekeeping] naming
1 parent 8eadd6b commit f8f8c2a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

main.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2021 Rahul De
2+
* Copyright 2018- Rahul De
33
*
44
* Use of this source code is governed by an MIT-style
55
* license that can be found in the LICENSE file or at
@@ -25,7 +25,7 @@ import (
2525
githttp "github.com/go-git/go-git/v5/plumbing/transport/http"
2626
)
2727

28-
func Tar(src string, archiveName string) error {
28+
func makeTar(src string, archiveName string) error {
2929
if _, err := os.Stat(src); err != nil {
3030
return err
3131
}
@@ -75,11 +75,11 @@ func Tar(src string, archiveName string) error {
7575
return nil
7676
}
7777

78-
func Ping(w http.ResponseWriter, r *http.Request) {
78+
func ping(w http.ResponseWriter, r *http.Request) {
7979
fmt.Fprint(w, "Ack")
8080
}
8181

82-
func Clone(w http.ResponseWriter, r *http.Request) {
82+
func clone(w http.ResponseWriter, r *http.Request) {
8383
repo := r.URL.Query().Get("repo")
8484
branch := r.URL.Query().Get("branch")
8585

@@ -109,7 +109,7 @@ func Clone(w http.ResponseWriter, r *http.Request) {
109109
return
110110
}
111111

112-
if err := Tar(dir, archive); err != nil {
112+
if err := makeTar(dir, archive); err != nil {
113113
w.WriteHeader(http.StatusInternalServerError)
114114
fmt.Fprint(w, err.Error())
115115

@@ -133,8 +133,8 @@ func main() {
133133

134134
client.InstallProtocol("https", githttp.NewClient(customClient))
135135

136-
http.HandleFunc("/ping", Ping)
137-
http.HandleFunc("/bob_resource", Clone)
136+
http.HandleFunc("/ping", ping)
137+
http.HandleFunc("/bob_resource", clone)
138138

139139
http.ListenAndServe(":"+port, nil)
140140
}

0 commit comments

Comments
 (0)