utils

package
v0.0.0-...-a42e392 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Config = ".config/local-searchengine/config.toml"
View Source
const Datas = ".local/share/local-searchengine/"
View Source
const StatsFile = Datas + "stats.csv"

Variables

This section is empty.

Functions

func Fetch

func Fetch(url string) (*http.Response, error)

func GeneratePathForCss

func GeneratePathForCss(path *string) string

func GeneratePathForHTML

func GeneratePathForHTML(path *string) string

func InsertSlice

func InsertSlice[T any](original []T, inserted []T, n int) []T

func LogBoolToString

func LogBoolToString(b bool) string

func LogErrorResponse

func LogErrorResponse(w http.ResponseWriter, err error)

func LogResult

func LogResult(w http.ResponseWriter, r *http.Request)

func ReadFile

func ReadFile(path *string) ([]byte, error)

func StringOrEmpty

func StringOrEmpty(s string, err error) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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