more simplify structure
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
package hello
|
package hello
|
||||||
|
|
||||||
import ()
|
|
||||||
|
|
||||||
// User user type
|
// User user type
|
||||||
type User struct {
|
type User struct {
|
||||||
ID int64
|
ID int64
|
||||||
@@ -7,9 +7,10 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"hello"
|
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/microsoft/vscode-remote-try-go/hello"
|
||||||
)
|
)
|
||||||
|
|
||||||
func handle(w http.ResponseWriter, r *http.Request) {
|
func handle(w http.ResponseWriter, r *http.Request) {
|
||||||
@@ -17,7 +18,7 @@ func handle(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
portNumber := "9000"
|
portNumber := "5000"
|
||||||
http.HandleFunc("/", handle)
|
http.HandleFunc("/", handle)
|
||||||
fmt.Println("Server listening on port ", portNumber)
|
fmt.Println("Server listening on port ", portNumber)
|
||||||
http.ListenAndServe(":"+portNumber, nil)
|
http.ListenAndServe(":"+portNumber, nil)
|
||||||
Reference in New Issue
Block a user