MCPcopy Index your code
hub / github.com/NdoleStudio/httpsms / Sanitize

Method Sanitize

api/pkg/requests/heartbeat_index_request.go:19–30  ·  view source on GitHub ↗

Sanitize sets defaults to MessageOutstanding

()

Source from the content-addressed store, hash-verified

17
18// Sanitize sets defaults to MessageOutstanding
19func (input *HeartbeatIndex) Sanitize() HeartbeatIndex {
20 if strings.TrimSpace(input.Limit) == "" {
21 input.Limit = "1"
22 }
23 input.Query = strings.TrimSpace(input.Query)
24 input.Owner = input.sanitizeAddress(input.Owner)
25 input.Skip = strings.TrimSpace(input.Skip)
26 if input.Skip == "" {
27 input.Skip = "0"
28 }
29 return *input
30}
31
32// ToIndexParams converts HeartbeatIndex to repositories.IndexParams
33func (input *HeartbeatIndex) ToIndexParams() repositories.IndexParams {

Callers 1

IndexMethod · 0.95

Calls 1

sanitizeAddressMethod · 0.45

Tested by

no test coverage detected