util

package
v0.2.54 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContentFromUrl

func GetContentFromUrl(url string) ([]byte, error)

GetContentFromUrl retrieves the content from the specified URL. It sends an HTTP GET request to the URL and returns the response body as a byte slice. The function handles the HTTP response status code and error conditions appropriately. If the request is successful (status code 200), the response body is returned without errors. Otherwise, an error is returned with relevant information.

func ParseDate

func ParseDate(sampleFormat string, dateTime string) (string, error)

ParseDate parses a date string into the specified sample format.

func ParseNode

func ParseNode(jqOp string, result json.RawMessage) ([]byte, error)

ParseNode applies a JQ operation on the JSON payload.

func YamlToJson

func YamlToJson(yamlData []byte) ([]byte, error)

YamlToJson converts YAML data to JSON.

Types

This section is empty.

Jump to

Keyboard shortcuts

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