Skip to content

Commit

Permalink
Fix conversion of int to ascii
Browse files Browse the repository at this point in the history
  • Loading branch information
farazfazli committed Jan 24, 2016
1 parent 364badc commit b312234
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Binary file modified GoBlog
Binary file not shown.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"math/rand"
"net/http"
"os/exec"
"strconv"
"time"

"github.com/boltdb/bolt"
Expand Down Expand Up @@ -156,7 +157,7 @@ func AdminPage(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
func AdminHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
blogname := r.FormValue("blogname")
website := r.FormValue("website")
port := 1000
port := 1001
blogcheck := []byte("")

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

0 comments on commit b312234

Please sign in to comment.