initial commit

This commit is contained in:
Peter Tillemans 2023-08-18 12:36:29 +02:00
parent 77b079c995
commit b242bfcc8c
3 changed files with 33 additions and 0 deletions

17
cmd/main/main.go Normal file
View file

@ -0,0 +1,17 @@
package main
import "fmt"
import "log"
import "net/http"
import "rsc.io/quote"
func main() {
fmt.Println("Starting server on port 8080...\n")
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, quote.Go())
})
if err := http.ListenAndServe(":8080", nil); err != nil {
log.Fatal(err)
}
}

10
go.mod Normal file
View file

@ -0,0 +1,10 @@
module snamellit/htmxtut
go 1.20
require rsc.io/quote v1.5.2
require (
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c // indirect
rsc.io/sampler v1.3.0 // indirect
)

6
go.sum Normal file
View file

@ -0,0 +1,6 @@
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c h1:qgOY6WgZOaTkIIMiVjBQcw93ERBE4m30iBm00nkL0i8=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
rsc.io/quote v1.5.2 h1:w5fcysjrx7yqtD/aO+QwRjYZOKnaM9Uh2b40tElTs3Y=
rsc.io/quote v1.5.2/go.mod h1:LzX7hefJvL54yjefDEDHNONDjII0t9xZLPXsUe+TKr0=
rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=