more simplify structure

This commit is contained in:
uta-mori
2020-07-28 13:21:40 +09:00
parent 216335b01c
commit d68bbbd16b
2 changed files with 3 additions and 4 deletions

View File

@@ -1,7 +1,5 @@
package hello
import ()
// User user type
type User struct {
ID int64

View File

@@ -7,9 +7,10 @@ package main
import (
"fmt"
"hello"
"io"
"net/http"
"github.com/microsoft/vscode-remote-try-go/hello"
)
func handle(w http.ResponseWriter, r *http.Request) {
@@ -17,7 +18,7 @@ func handle(w http.ResponseWriter, r *http.Request) {
}
func main() {
portNumber := "9000"
portNumber := "5000"
http.HandleFunc("/", handle)
fmt.Println("Server listening on port ", portNumber)
http.ListenAndServe(":"+portNumber, nil)