misc

package
v0.5.22 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package misc provides some helper functions that are used in hit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetElem

func GetElem(r reflect.Value) reflect.Value

GetElem follows all pointers and interfaces until it reaches the base value.

func GetValue

func GetValue(v interface{}) reflect.Value

GetValue returns a reflect.Value and follows all pointers and interfaces until it reaches the base value.

func MakeTypeCopy

func MakeTypeCopy(src interface{}) interface{}

MakeTypeCopy creates a copy of src, with the default value(s) for this type.

func MakeURL

func MakeURL(base, url string, a ...interface{}) string

MakeURL joins two urls safely. example: MakeURL("http://example.com", "%s.html", "index") will return "http://example.com/index.html"

Types

This section is empty.

Jump to

Keyboard shortcuts

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