@@ -23,7 +23,7 @@ package main
23
23
import (
24
24
// ...
25
25
26
- " github.com/ZihxS/golang-gorm-datatables" // [👉🏼 FOCUS HERE]
26
+ " github.com/ZihxS/golang-gorm-datatables" // [FOCUS HERE]
27
27
28
28
// ...
29
29
)
@@ -41,14 +41,14 @@ func main() {
41
41
42
42
// example using mux router
43
43
r.HandleFunc (" /users" , func (w http.ResponseWriter , r *http.Request ) {
44
- req , err := datatables.ParseRequest (r) // parse the request [👉🏼 FOCUS HERE]
44
+ req , err := datatables.ParseRequest (r) // parse the request [FOCUS HERE]
45
45
if err != nil {
46
46
http.Error (w, fmt.Sprintf (" Error processing request: %v " , err), http.StatusInternalServerError )
47
47
return
48
48
}
49
49
50
- tx := db.Model (&User{}) // gorm query [👉🏼 FOCUS HERE]
51
- response , err := datatables.New (tx).Req (*req).Make () // make datatables [👉🏼 FOCUS HERE]
50
+ tx := db.Model (&User{}) // gorm query [FOCUS HERE]
51
+ response , err := datatables.New (tx).Req (*req).Make () // make datatables [FOCUS HERE]
52
52
if err != nil {
53
53
http.Error (w, fmt.Sprintf (" Error processing request: %v " , err), http.StatusInternalServerError )
54
54
return
@@ -68,13 +68,13 @@ You can visit this link to see more example and documentation:
68
68
- Documentation:
69
69
- Golang Packages Website: https://pkg.go.dev/github.com/ZihxS/golang-gorm-datatables
70
70
- Our Documentation Website: ?
71
- - Example on Server Side: ?
72
- - Example on Client Side: ?
71
+ - Example on Server Side: https://github.com/ZihxS/golang-gorm-datatables-be-examples
72
+ - Example on Client Side: https://github.com/ZihxS/golang-gorm-datatables-fe-examples
73
73
74
74
## Roadmap to v1
75
75
76
- - [ ] Create example on server side.
77
- - [ ] Create example on client side.
76
+ - [x ] Create example on server side.
77
+ - [x ] Create example on client side.
78
78
- [ ] Create own documentation website.
79
79
- [ ] Add slice or array format for datatables response.
80
80
- [ ] Well proper for all possible complex queries.
0 commit comments