From a7555da0e076bed410a8836a8179749b2b808fad Mon Sep 17 00:00:00 2001 From: tomoish Date: Fri, 2 Feb 2024 22:14:41 +0900 Subject: [PATCH] Change port --- src/graphs/commit_chart.go | 2 +- src/main.go | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/graphs/commit_chart.go b/src/graphs/commit_chart.go index e5c5506..531a716 100644 --- a/src/graphs/commit_chart.go +++ b/src/graphs/commit_chart.go @@ -58,7 +58,7 @@ func DrawCommitChart(commitsHistory []int, maxCommits int, width int, height int p.Y.Max = float64(maxCommits) + 5 // ラベルの外に余白を持つ - p.Title.Padding = 10 // タイトル周りの余白 + p.Title.Padding = 10 // タイトル周りの余白 p.X.Label.Padding = 2 // X軸ラベル周りの余白 p.Y.Label.Padding = 2 // Y軸ラベル周りの余白 diff --git a/src/main.go b/src/main.go index 646cd7c..bf2f87b 100644 --- a/src/main.go +++ b/src/main.go @@ -5,6 +5,7 @@ import ( "log" "net/http" "strconv" + "github.com/tomoish/readme/funcs" "github.com/tomoish/readme/graphs" ) @@ -114,7 +115,7 @@ import ( // } // 画像生成エンドポイント -func createhandler(w http.ResponseWriter, r *http.Request) { +func createHandler(w http.ResponseWriter, r *http.Request) { queryValues := r.URL.Query() username := queryValues.Get("username") if r.Method == http.MethodGet { @@ -174,9 +175,9 @@ func main() { // http.HandleFunc("/user", getuserHandler) // http.HandleFunc("/merge", mergeAllContents) // http.HandleFunc("/background", getBackgroundHandler) - http.HandleFunc("/create", createhandler) + http.HandleFunc("/create", createHandler) fmt.Println("Hello, World!") - err := http.ListenAndServe(":8000", nil) + err := http.ListenAndServe(":8080", nil) if err != nil { log.Fatalf("HTTP server failed: %v", err) }