Skip to content

Commit b312234

Browse files
committed
Fix conversion of int to ascii
1 parent 364badc commit b312234

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

GoBlog

0 Bytes
Binary file not shown.

main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"math/rand"
88
"net/http"
99
"os/exec"
10+
"strconv"
1011
"time"
1112

1213
"github.com/boltdb/bolt"
@@ -156,7 +157,7 @@ func AdminPage(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
156157
func AdminHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
157158
blogname := r.FormValue("blogname")
158159
website := r.FormValue("website")
159-
port := 1000
160+
port := 1001
160161
blogcheck := []byte("")
161162

162163
if getUser(w, r) != "" {
@@ -171,7 +172,7 @@ func AdminHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
171172
return nil
172173
})
173174
if blogcheck == nil {
174-
create, err := exec.Command("./create.sh", blogname, website, string(port)).Output()
175+
create, err := exec.Command("./create.sh", blogname, website, strconv.Itoa(port)).Output()
175176
if err != nil {
176177
fmt.Println(err)
177178
} else {

0 commit comments

Comments
 (0)