Added gocli output (untested)
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ func Init() API {
|
||||
Perms: make(map[string]string),
|
||||
}
|
||||
|
||||
mux.HandleFunc("", func(w http.ResponseWriter, r *http.Request) {
|
||||
mux.HandleFunc("/someapi", func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.Method {
|
||||
case "POST":
|
||||
h_SomeAPI(w, r)
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
/*@API*/
|
||||
type ARequestStruct struct {
|
||||
A *string
|
||||
A *string `json:"a"`
|
||||
B int64
|
||||
C time.Time
|
||||
D *string
|
||||
@@ -23,7 +23,7 @@ type AResponseStruct struct {
|
||||
|
||||
/*
|
||||
@API
|
||||
PATH: /someapi
|
||||
@PATH: /someapi
|
||||
*/
|
||||
func SomeAPI(ctx context.Context, a *ARequestStruct) (*AResponseStruct, error) {
|
||||
return nil, nil
|
||||
|
||||
Reference in New Issue
Block a user