utils

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(arr []string, v string) bool

func ReturnJSON

func ReturnJSON(w http.ResponseWriter, data interface{})

ReturnJSON writes JSON to the response body

func SubsliceExists

func SubsliceExists(slice, subslice []string) (bool, int)

func ValidateStruct

func ValidateStruct(v interface{}) error

ValidateStruct validates the struct and returns error if there is any invalid values

Types

type AnyTime

type AnyTime struct{}

AnyTime is used to expect arbitrary time value

func (AnyTime) Match

func (a AnyTime) Match(v driver.Value) bool

Match satisfies sqlmock.Argument interface

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL