utils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(s []string, str string) bool

* Copyright © 2022 Allan Nava <> * Created 05/02/2022 * Updated 05/02/2022 *

func ContainsInt added in v0.2.0

func ContainsInt(s []int, n int) bool

func PrettyPrint added in v0.2.0

func PrettyPrint(i interface{}) string

print struct json format to console

func SetupEnv

func SetupEnv()

Types

type ApiError

type ApiError struct {
	Message  string `json:"message"`
	Response string `json:"response"`
}

type ApiMessage

type ApiMessage struct {
	Message  string      `json:"message"`
	Response string      `json:"response"`
	Data     interface{} `json:"data"`
}

func ApiDefaultMsgOnly

func ApiDefaultMsgOnly(message string) *ApiMessage

func ApiDefaultMsgResponse

func ApiDefaultMsgResponse(data interface{}, message string) *ApiMessage

func ApiDefaultResponse

func ApiDefaultResponse(data interface{}) *ApiMessage

type ErrorMessage

type ErrorMessage struct {
	Severity string `json:"severity"`
	Message  string `json:"message"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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