Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

folder baru #24

Open
khoirulhp opened this issue Oct 20, 2022 · 1 comment
Open

folder baru #24

khoirulhp opened this issue Oct 20, 2022 · 1 comment

Comments

@khoirulhp
Copy link
Collaborator

package main
import (
"fmt"
"net/http"
)
func handlerFunc(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html")
if r.URL.Path == "/" {
fmt.Fprint(w, "

hactoberfast

")
} else if r.URL.Path == "/aboutus" {
fmt.Fprint(w, "

Informasi Teknologi

")
} else {
w.WriteHeader(http.StatusNotFound)
fmt.Fprint(w, "

Halaman yang dicari tidak ditemukan

")
}
}
func main() {
http.HandleFunc("/", handlerFunc)
http.ListenAndServe(":3000", nil)
}

@khoirulhp
Copy link
Collaborator Author

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant