util

package
v0.0.0-...-86b43dd Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error)

CheckError is not nil, and ends the program

func Hash

func Hash(link string) string

Hash a string using CRC32

func StringPtr

func StringPtr(str string) *string

StringPtr creates a pointer from a string

Types

type Link struct {
	ID   string `json:"id"`
	Link string `json:"link"`
}

Link holds information about any link stored in the database

type Result

type Result struct {
	Link  *Link   `json:"link,omitempty"`
	Error *string `json:"error,omitempty"`
}

Result holds information that could be returned from any request

Jump to

Keyboard shortcuts

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