utils

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CastToPrimitiveTypes

func CastToPrimitiveTypes(args map[string]interface{}) map[string]interface{}

CastToPrimitiveTypes casts the values of a map to its primitive type (e.g. time.Duration to float64) to prevent structpb invalid type(s) errors.

func NewCommand

func NewCommand(cmd string, args []string, env []string) *exec.Cmd

NewCommand returns a command with the given arguments and environment variables.

func SHA256SUM

func SHA256SUM(filename string) (string, *gerr.GatewayDError)

SHA256SUM returns the sha256 checksum of a file. Ref: https://github.com/codingsince1985/checksum A little copying is better than a little dependency.

func Verify

func Verify(params, returnVal *structpb.Struct) bool

Verify compares two structs and returns true if they are equal.

Types

This section is empty.

Jump to

Keyboard shortcuts

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