mirror of
https://github.com/SourceFellows/gobuch.git
synced 2025-09-19 02:24:54 +02:00
initial import
This commit is contained in:
11
microservices/hanlder-impl/cmd/main.go
Normal file
11
microservices/hanlder-impl/cmd/main.go
Normal file
@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"golang.source-fellows.com/samples/httphandler"
|
||||
)
|
||||
|
||||
func main() {
|
||||
http.ListenAndServe(":8080", &httphandler.MyHandler{})
|
||||
}
|
3
microservices/hanlder-impl/go.mod
Normal file
3
microservices/hanlder-impl/go.mod
Normal file
@ -0,0 +1,3 @@
|
||||
module golang.source-fellows.com/samples/httphandler
|
||||
|
||||
go 1.13
|
1
microservices/hanlder-impl/go.sum
Normal file
1
microservices/hanlder-impl/go.sum
Normal file
@ -0,0 +1 @@
|
||||
golang.source-fellows.com v0.0.0-20200619133407-79aa8981720c h1:c0BKYhs4PULAm3Hb5f+t9AcmPRScdSAkeuajndyOMLQ=
|
9
microservices/hanlder-impl/handler.go
Normal file
9
microservices/hanlder-impl/handler.go
Normal file
@ -0,0 +1,9 @@
|
||||
package httphandler
|
||||
|
||||
import "net/http"
|
||||
|
||||
type MyHandler struct{}
|
||||
|
||||
func (mh *MyHandler) ServeHTTP(writer http.ResponseWriter, req *http.Request) {
|
||||
writer.Write([]byte("Hello World!"))
|
||||
}
|
Reference in New Issue
Block a user