testhelp

package
v1.67.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

View Source
var ErrChannelTimeout = errors.New("channel not closed after timeout")

Functions

func AssertChanIsClosed

func AssertChanIsClosed(t *testing.T, ch <-chan []byte)

func ChannelErrClosed

func ChannelErrClosed(ch <-chan error) error

if the channel has been closed without an error, it returns nil. An error otherwise

func ChannelErrClosedTimeout

func ChannelErrClosedTimeout(ch <-chan error, timeout time.Duration) error

func ChannelRead

func ChannelRead(ch <-chan []byte) string

func Command

func Command(script Script, args ...string) config.ShlexOpt

func CommandSlice

func CommandSlice(script Script, args ...string) []string

func GetGoEnv

func GetGoEnv(env string) (string, error)

func GoBuild

func GoBuild(gofile Script, dstPath string) error

GoBuild will compile a simple Go source file and place the executable in the destination path

func GoCommand

func GoCommand() string

GoCommand returns the complete path to the Go command

func GoRun

func GoRun(gofile Script, args ...string) config.ShlexOpt

GoRun returns the command path to run a Go file as if it were a command. It expects to find the "go" executable in the path

Types

type Script

type Script string

func WrapScript

func WrapScript(scriptPath string) Script

func WrapScriptPath

func WrapScriptPath(elem ...string) Script

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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