util

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 19 Imported by: 3 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForDecimalMode

func CheckForDecimalMode(mode int, directory bool) error

CheckForDecimalMode fails if the specified mode appears to have been incorrectly specified in decimal instead of octal.

func CompressDataURL added in v0.29.0

func CompressDataURL(t *testing.T, contents []byte) (string, string)

func EnsurePathWithinFilesDir

func EnsurePathWithinFilesDir(path, filesDir string) error

func MakeDataURL

func MakeDataURL(contents []byte, currentCompression *string, allowCompression bool) (uri string, compression *string, err error)

func MergeTranslatedConfigs

func MergeTranslatedConfigs(parent interface{}, parentTranslations translate.TranslationSet, child interface{}, childTranslations translate.TranslationSet) (interface{}, translate.TranslationSet)

MergeTranslatedConfigs merges a parent and child config and returns the result. It also generates and returns the merged TranslationSet by mapping the parent/child TranslationSets through the merge transcript.

func ReadLocalFile added in v0.18.0

func ReadLocalFile(configPath, filesDir string) ([]byte, error)

func VerifyReport added in v0.19.0

func VerifyReport(t *testing.T, obj interface{}, r report.Report)

VerifyReport verifies that every path in a report corresponds to a valid field in the object.

func VerifyTranslations

func VerifyTranslations(t *testing.T, set translate.TranslationSet, exceptions []translate.Translation)

VerifyTranslations validates a TranslationSet from 'yaml' to 'json'. It expects all translations to be identity, unless they match a listed one, and all the listed ones to exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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