Documentation ¶
Overview ¶
Package utils provides util functions for health tast.
Index ¶
- func GetCrosConfig(ctx context.Context, cpath string) (string, error)
- func GetOptionalCrosConfig(ctx context.Context, cpath string) (*string, error)
- func IsCrosConfigTrue(ctx context.Context, cpath string) (bool, error)
- func ReadOptionalStringFile(fpath string) (*string, error)
- func ReadStringFile(fpath string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCrosConfig ¶
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 ¶
GetOptionalCrosConfig returns nil if the config cannot be found.
func IsCrosConfigTrue ¶
IsCrosConfigTrue returns if the value of cros config is true.
func ReadOptionalStringFile ¶
ReadOptionalStringFile returns nil if file not found.
func ReadStringFile ¶
ReadStringFile reads a file and returns its content as string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.