Skip to content

Commit 90021f8

Browse files
committed
Drop version back to 1.15
1 parent 49ee5d2 commit 90021f8

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

duoapi.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"math/rand"
1515
"net/http"
1616
"net/url"
17-
"slices"
1817
"sort"
1918
"strings"
2019
"time"
@@ -344,7 +343,7 @@ func (duoapi *DuoApi) SignedCall(method string,
344343
return duoapi.makeRetryableHttpCall(method, url, headers, requestBody, options...)
345344
}
346345

347-
type JSONParams map[string]any
346+
type JSONParams map[string]interface{}
348347

349348
// Make a signed Duo Rest API call that takes JSON as an argument.
350349
// See Duo's online documentation for the available REST API's.
@@ -365,8 +364,11 @@ func (duoapi *DuoApi) JSONSignedCall(method string,
365364
params JSONParams,
366365
options ...DuoApiOption) (*http.Response, []byte, error) {
367366

368-
body_methods := []string{"POST", "PUT", "PATCH"}
369-
params_go_in_body := slices.Contains(body_methods, method)
367+
body_methods := make(map[string]struct{})
368+
body_methods["POST"] = struct{}{}
369+
body_methods["PUT"] = struct{}{}
370+
body_methods["PATCH"] = struct{}{}
371+
_, params_go_in_body := body_methods[method]
370372

371373
now := time.Now().UTC().Format(time.RFC1123Z)
372374
var body string

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/duosecurity/duo_api_golang
22

3-
go 1.18
3+
go 1.15

0 commit comments

Comments
 (0)