artifacts

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package artifacts provides functionality for writing artifact files in configured artifacts directory. This package operators with a singleton directory variable that can be changed and reset. It provides simple functionality that can be accessible from any calling library.

Index

Constants

View Source
const DefaultArtifactsDir = "artifacts"

DefaultArtifactsDir is the default value for the directory.

Variables

This section is empty.

Functions

func Path

func Path() string

Path will return the artifacts directory.

func Reset

func Reset()

Reset restores the default value for the Artifacts Directory.

func SetDir

func SetDir(s string)

SetDir sets the package level artifacts directory. This can be a relative path or a full path.

func WriteFile

func WriteFile(filename string, contents io.Reader) (string, error)

WriteFile will write contents of the string to a file in the artifacts directory. It will create the artifacts dir if necessary. Returns the full path (including the artifacts dir)

Types

This section is empty.

Jump to

Keyboard shortcuts

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