util

package
v0.0.0-...-da644f5 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const APIURL = "https://mynsb.nsbvisions.com"

Variables

View Source
var TIMEZONE *time.Location

Functions

func ExistsString

func ExistsString(array []string, entry string) bool

ExistsString takes an array and an entry string and determines if that entry string resides in that array

func GetGOPATH

func GetGOPATH() string

GetGOPATH returns the system's first GOPATH variable

func HTTPResponse

func HTTPResponse(status int, statusMessage string, body string, title string, w http.ResponseWriter)

HTTPResponse function for returning array based responses

func HTTPResponseArr

func HTTPResponseArr(status int, statusMessage string, body string, title string, w http.ResponseWriter)

HTTPResponse function for returning object based responses

func HashString

func HashString(toHash string) string

HashString takes an input string and hashes it with the sha256 algorithm, unfortunately not the one you would see in your hashtables ;) too big :p

func IsSet

func IsSet(vars ...string) bool

IsSet behaves much like php's isset and takes a list of variables and determins if they are null

func IsSubset

func IsSubset(first, second []string) bool

IsSubset takes two arrays of strings and determines if the second array is a subset of the first

func NonNull

func NonNull(thing string) bool

NonNull determines if a string is empty, honestly just a code styling thing

func NumResults

func NumResults(db *sql.DB, query string, args ...interface{}) (int, error)

NumResults takes a db and a query and determines how many results were returned from that query

func ParseDate

func ParseDate(date string) (time.Time, error)

ParseDate takes a date string, parses it and returns a time object

func ParseDateTime

func ParseDateTime(datetime string) (time.Time, error)

ParseDateTime takes a datetime string, parses it and returns a time object

Types

This section is empty.

Jump to

Keyboard shortcuts

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