utils

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTempFile

func CreateTempFile(content []byte) (string, error)

CreateTempFile creates random tmeporary file and stores the content to the file and return path to it or error

func MustResolveRandomPort

func MustResolveRandomPort() uint16

MustResolveRandomPort asks the kernel for a free open port or fail fatal in case of error

Types

type DevNull

type DevNull int

DevNull implements io.Writer what just drops all the bytes, ie. /dev/null

func (DevNull) Write

func (DevNull) Write(p []byte) (int, error)

Write io.Writer implementation

func (DevNull) WriteString

func (DevNull) WriteString(s string) (int, error)

WriteString io.Writer implementation

Jump to

Keyboard shortcuts

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