utils

package
v1.2.2-rc.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Copyright (C) 2023, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindErrorLogs added in v1.1.3

func FindErrorLogs(rootDirs ...string)

FindErrorLogs is a utility function, we will NOT do error handling, as this is supposed to be called during error handling itself we don't want to make it even more complex

func GetCLIVersion added in v1.2.2

func GetCLIVersion() string

func GetSHA256FromDisk added in v1.0.3

func GetSHA256FromDisk(binPath string) (string, error)

func HandleTracking added in v1.2.2

func HandleTracking(cmd *cobra.Command, app *application.Avalanche, flags map[string]string)

func HandleUserMetricsPreference added in v1.2.2

func HandleUserMetricsPreference(app *application.Avalanche) error

func PrintMetricsOptOutPrompt added in v1.2.2

func PrintMetricsOptOutPrompt()

func SearchSHA256File added in v1.0.3

func SearchSHA256File(file []byte, toSearch string) (string, error)

func TrackMetrics added in v1.2.2

func TrackMetrics(command *cobra.Command, flags map[string]string)

func ValidateJSON

func ValidateJSON(path string) ([]byte, error)

ValidateJSON takes a json string and returns it's byte representation if it contains valid JSON

Types

This section is empty.

Jump to

Keyboard shortcuts

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