2020-09-16 14:19:51 +00:00
|
|
|
// Copyright 2020 the Pinniped contributors. All Rights Reserved.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2020-09-12 00:56:05 +00:00
|
|
|
|
|
|
|
package here
|
|
|
|
|
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
"github.com/MakeNowJust/heredoc/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
tab = "\t"
|
|
|
|
fourSpaces = " "
|
|
|
|
)
|
|
|
|
|
|
|
|
func Doc(s string) string {
|
|
|
|
return strings.ReplaceAll(heredoc.Doc(s), tab, fourSpaces)
|
|
|
|
}
|
|
|
|
|
|
|
|
func Docf(raw string, args ...interface{}) string {
|
|
|
|
return strings.ReplaceAll(heredoc.Docf(raw, args...), tab, fourSpaces)
|
|
|
|
}
|