Dodaj 'main.go'
This commit is contained in:
parent
263ceb8fd2
commit
3e12cce3d8
22
main.go
Normal file
22
main.go
Normal file
@ -0,0 +1,22 @@
|
||||
package main
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
|
||||
|
||||
func Strona1(w http.ResponseWriter, r *http.Request){
|
||||
fmt.Fprintf(w, "Strona 1")
|
||||
}
|
||||
func HandleRequests(){
|
||||
http.HandleFunc("/", Strona1)
|
||||
log.Fatal(http.ListenAndServe(":8000", nil))
|
||||
}
|
||||
|
||||
func main(){
|
||||
|
||||
HandleRequests()
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user