Documentation
¶
Overview ¶
Copyright 2023 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Index ¶
- func AskConfirmation(s string) (bool, error)
- func BoolVal(val string) bool
- func GetEnv(key, fallback string) string
- func IsCustomBuild(build string) bool
- func MakeTempFile(content string) (string, error)
- func MapTestArgsToStr(m map[string]string) string
- func RemovePrefixFromTestArgs(m map[string]string, prefix string) map[string]string
- func StableVersionFromFile(board string, model string) (*models.RecoveryVersion, error)
- func StageAndWriteLocalStableVersion(ctx context.Context, service build_service.IBuildService, ...) error
- func StrTestArgsToMap(str string) map[string]string
- func TrimOutput(output []byte) string
- func WriteLocalStableVersion(recoveryVersion *models.RecoveryVersion, path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskConfirmation ¶
AskConfirmation asks users a question for Y/N answer.
func IsCustomBuild ¶
func MakeTempFile ¶
MakeTempFile makes a temporary file.
func MapTestArgsToStr ¶
MapTestArgsToStr converts a TestArgs map into string.
func RemovePrefixFromTestArgs ¶
RemovePrefixFromTestArgs removes requested prefix from testArgs key. It also removes args without requested prefix.
func StableVersionFromFile ¶
func StableVersionFromFile(board string, model string) (*models.RecoveryVersion, error)
StableVersionFromFile reads stable version from file.
func StageAndWriteLocalStableVersion ¶
func StageAndWriteLocalStableVersion( ctx context.Context, service build_service.IBuildService, rv *models.RecoveryVersion, path string, ) error
StageAndWriteLocalStableVersion stages a recovery image to partner bucket and writes the associated rv metadata locally.
func StrTestArgsToMap ¶
StrTestArgsToMap converts a TestArgs string into map[string]string.
func TrimOutput ¶
TrimOutput trims trailing whitespace from command output.
func WriteLocalStableVersion ¶
func WriteLocalStableVersion(recoveryVersion *models.RecoveryVersion, path string) error
WriteLocalStableVersion saves a recovery version to the specified directory and creates the directory if necessary.
Types ¶
This section is empty.