util

package
v0.0.0-...-87de96b Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckArgs

func CheckArgs(args []string)

Check input arguments

func ExperimentStatusToString

func ExperimentStatusToString(in []model.ExperimentStatus) (out []string)

func GinContextFromContext

func GinContextFromContext(ctx context.Context) (*gin.Context, error)

GinContextFromContext can be used to read the Gin context in a request, use with:

gc, err := util.GinContextFromContext(ctx)
if err != nil {
  return nil, err
}

func IndexOf

func IndexOf(element string, data []string) int

func JobStatusToString

func JobStatusToString(in []model.JobStatus) (out []string)

func ModuleStateToString

func ModuleStateToString(in []model.ModuleState) (out []string)

func RandStringBytesMaskImprSrc

func RandStringBytesMaskImprSrc(n int) string

RandStringBytesMaskImprSrc creates a random string of n characters

func RootDir

func RootDir() string

RootDir returns the root path of the project. This only works at this level, if it's moved to a different depth it won't work.

Types

This section is empty.

Jump to

Keyboard shortcuts

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