util

package
v0.0.0-...-2a0a9dd Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSecret

func GetSecret() (apiKey string)

Loads the VirusTotal API key from an ENV var

func StripURL

func StripURL(in string) string

if a submitted url has https:// strip that in favor of the expected http://

func ValidateQuery

func ValidateQuery(message string) (string, error)

ValidateQuery checks an incoming query value to try and determine if it's a url or otherwise.

If input url value is missing http:// it will build the url and then hash that returned value

Returns string(url -> SHA256), error

Types

This section is empty.

Jump to

Keyboard shortcuts

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