utils

package
v0.0.0-...-a7d487d Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateDistance

func CalculateDistance(lat1 float64, lng1 float64, lat2 float64, lng2 float64, unit string) float64

this problem was solved by using this https://gist.github.com/hotdang-ca/6c1ee75c48e515aec5bc6db6e3265e49

func Converter

func Converter(v float64) string

func GenerateNumbers

func GenerateNumbers(length int) string

Types

type Template

type Template struct {
	Message string `json:"message"`
	Mime    string `json:"mime"`
	Path    string `json:"path"`
}

type Templates

type Templates map[string]Template

func CurrentTemplates

func CurrentTemplates() Templates

func NewTemplates

func NewTemplates() Templates

func (Templates) LoadTemplates

func (templates Templates) LoadTemplates(path string, base string)

func (Templates) Lookup

func (templates Templates) Lookup(title string) string

func (Templates) TempelateInjector

func (templates Templates) TempelateInjector(key string, definition map[string]string) (string, error)

Jump to

Keyboard shortcuts

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