Skip to content

Commit

Permalink
feat: add json tags for request
Browse files Browse the repository at this point in the history
  • Loading branch information
1995parham committed Apr 23, 2024
1 parent cab4b3c commit dc80fcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions httpserver/handler/hello.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package handler
import (
"encoding/json"
"fmt"
"io"
"log"
"net/http"

Expand Down
4 changes: 2 additions & 2 deletions httpserver/request/hello.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package request

type Name struct {
Name string
Count *int
Name string `json:"name,omitempty"`
Count *int `json:"count,omitempty"`
}

0 comments on commit dc80fcb

Please sign in to comment.