Skip to content

Commit

Permalink
Merge pull request #2068 from alexandear/docs/ioutil-deprecated
Browse files Browse the repository at this point in the history
docs: update example usages by removing deprecated ioutil
  • Loading branch information
RicePatrick authored Nov 25, 2024
2 parents 42949f8 + 3838beb commit e884d22
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions event_parsing.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func HookEventType(r *http.Request) EventType {
// Example usage:
//
// func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// payload, err := ioutil.ReadAll(r.Body)
// payload, err := io.ReadAll(r.Body)
// if err != nil { ... }
// event, err := gitlab.ParseHook(gitlab.HookEventType(r), payload)
// if err != nil { ... }
Expand Down Expand Up @@ -119,7 +119,7 @@ func ParseHook(eventType EventType, payload []byte) (event interface{}, err erro
// Example usage:
//
// func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// payload, err := ioutil.ReadAll(r.Body)
// payload, err := io.ReadAll(r.Body)
// if err != nil { ... }
// event, err := gitlab.ParseSystemhook(payload)
// if err != nil { ... }
Expand Down Expand Up @@ -203,7 +203,7 @@ func WebhookEventType(r *http.Request) EventType {
// Example usage:
//
// func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// payload, err := ioutil.ReadAll(r.Body)
// payload, err := io.ReadAll(r.Body)
// if err != nil { ... }
// event, err := gitlab.ParseWebhook(gitlab.HookEventType(r), payload)
// if err != nil { ... }
Expand Down

0 comments on commit e884d22

Please sign in to comment.