/
githubmirror
/
terraform
Обзор
Документация
Войти
/
githubmirror
/
terraform
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
internal/command/jsonchecks/status.go
30 строк
674 B
Radek Simko
make copyrightfix
17 фев 2026, 16:56
17 фев 2026, 16:56
0fe906f
Код
Авторство
О чём код?
// Copyright IBM Corp. 2014, 2026 // SPDX-License-Identifier: BUSL-1.1 package jsonchecks import ( "fmt" "github.com/hashicorp/terraform/internal/checks" ) type checkStatus []byte func checkStatusForJSON(s checks.Status) checkStatus { if ret, ok := checkStatuses[s]; ok { return ret } panic(fmt.Sprintf("unsupported check status %#v", s)) } func (s checkStatus) MarshalJSON() ([]byte, error) { return []byte(s), nil } var checkStatuses = map[checks.Status]checkStatus{ checks.StatusPass: checkStatus(`"pass"`), checks.StatusFail: checkStatus(`"fail"`), checks.StatusError: checkStatus(`"error"`), checks.StatusUnknown: checkStatus(`"unknown"`), }