X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7c7dc19ffa0a20fff6d97e51c874bfaca9596b24..e9eb0975e100e76d1da2a6997656ff2524a2ba31:/tools/keep-block-check/keep-block-check.go diff --git a/tools/keep-block-check/keep-block-check.go b/tools/keep-block-check/keep-block-check.go index e57a9abed4..7dca3293d2 100644 --- a/tools/keep-block-check/keep-block-check.go +++ b/tools/keep-block-check/keep-block-check.go @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + package main import ( @@ -9,7 +13,6 @@ import ( "log" "net/http" "os" - "regexp" "strings" "time" @@ -100,8 +103,6 @@ func loadConfig(configFile string) (config apiConfig, blobSigningKey string, err return } -var matchTrue = regexp.MustCompile("^(?i:1|yes|true)$") - // Read config from file func readConfigFromFile(filename string) (config apiConfig, blobSigningKey string, err error) { if !strings.Contains(filename, "/") { @@ -131,9 +132,9 @@ func readConfigFromFile(filename string) (config apiConfig, blobSigningKey strin case "ARVADOS_API_HOST": config.APIHost = value case "ARVADOS_API_HOST_INSECURE": - config.APIHostInsecure = matchTrue.MatchString(value) + config.APIHostInsecure = arvadosclient.StringBool(value) case "ARVADOS_EXTERNAL_CLIENT": - config.ExternalClient = matchTrue.MatchString(value) + config.ExternalClient = arvadosclient.StringBool(value) case "ARVADOS_BLOB_SIGNING_KEY": blobSigningKey = value }