utils

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package utils provides util functions for health tast.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCrosConfig

func GetCrosConfig(ctx context.Context, cpath string) (string, error)

GetCrosConfig returns the cros config from path. The dir and base name are extracted from the argument as the cros config path and name.

func GetOptionalCrosConfig

func GetOptionalCrosConfig(ctx context.Context, cpath string) (*string, error)

GetOptionalCrosConfig returns nil if the config cannot be found.

func IsCrosConfigTrue

func IsCrosConfigTrue(ctx context.Context, cpath string) (bool, error)

IsCrosConfigTrue returns if the value of cros config is true.

func ReadOptionalStringFile

func ReadOptionalStringFile(fpath string) (*string, error)

ReadOptionalStringFile returns nil if file not found.

func ReadStringFile

func ReadStringFile(fpath string) (string, error)

ReadStringFile reads a file and returns its content as string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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