-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdoc.go
More file actions
42 lines (32 loc) · 844 Bytes
/
doc.go
File metadata and controls
42 lines (32 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
A high productivity web framework for quickly writing resource based services fully implementing the REST architectural style.
This framework allows you to really focus on the Resources and how it behaves, and let the tool for routing the requests and inject the required dependencies.
For a full guide visit https://github.com/resoursea/api
Example of usage:
package main
import (
"log"
"net/http"
"github.com/resoursea/api"
)
type Gopher struct {
Message string
}
func (r *Gopher) GET() *Gopher {
return r
}
func main() {
router, err := api.NewRouter(Gopher{
Message: "Hello Gophers!",
})
if err != nil {
log.Fatalln(err)
}
// Starting de HTTP server
log.Println("Starting the service on http://localhost:8080/")
if err := http.ListenAndServe(":8080", router); err != nil {
log.Fatalln(err)
}
}
*/
package api