utils

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package utils provides utilities for frizbee

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsYAMLFile added in v0.0.5

func IsYAMLFile(info fs.FileInfo) bool

IsYAMLFile returns true if the given file is a YAML file.

func Traverse added in v0.0.5

func Traverse(bfs billy.Filesystem, base string, fun TraverseFunc) error

Traverse traverses the given directory and calls the given function with each file.

func YAMLToBuffer

func YAMLToBuffer(wflow *yaml.Node) (fmt.Stringer, error)

YAMLToBuffer converts a YAML node to a string buffer

Types

type RefCacher added in v0.0.7

type RefCacher interface {
	Store(key, value string)
	Load(key string) (string, bool)
}

RefCacher is an interface for caching references.

func NewRefCacher added in v0.0.7

func NewRefCacher() RefCacher

NewRefCacher returns a new RefCacher. The default implementation is thread-safe.

func NewUnsafeCacher added in v0.0.7

func NewUnsafeCacher() RefCacher

NewUnsafeCacher returns a new RefCacher that's not thread-safe.

type TraverseFunc added in v0.0.5

type TraverseFunc func(path string, info fs.FileInfo) error

TraverseFunc is a function that gets called with each file in a directory.

Directories

Path Synopsis
Package cli provides utilities for frizbee's CLI.
Package cli provides utilities for frizbee's CLI.

Jump to

Keyboard shortcuts

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