metautil

package
v0.0.0-...-703489d Latest Latest
Warning

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

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

Documentation

Overview

Package metautil supports various needs for running tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Path string
	// contains filtered or unexported fields
}

Client holds metadata as a string:string map, as well as path for storing metadata

func NewClient

func NewClient(dir string) (*Client, error)

NewClient creates a client, takes custom directory for storing `metadata.json`. It reads existing `metadata.json` file if it exists, otherwise creates it. Errors out if there is any file i/o problem other than file not exist error.

func (*Client) Get

func (c *Client) Get(key string) (string, error)

Get gets val for key

func (*Client) Set

func (c *Client) Set(key, val string) error

Set sets key:val pair, and overrides if it exists

Jump to

Keyboard shortcuts

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