utils

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package utils provides common helper functions that used in code base.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetReaderFromFile

func GetReaderFromFile(tb testing.TB, fPath string) io.ReadCloser

GetReaderFromFile is a test helper that opens passed filepath and returns reader. Caller of this function is responsible for closing io.ReadCloser.

func PrettyPrint

func PrettyPrint(v interface{}, prefix, indent string) (string, error)

PrettyPrint appends to passed struct indents and returns a human-readable form of struct. Each element of JSON object will start from indent with prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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