mirror of
https://github.com/containers/skopeo.git
synced 2025-09-23 10:59:25 +00:00
Update module github.com/containers/common to v0.51.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
This commit is contained in:
committed by
Miloslav Trmač
parent
fe15a36ed9
commit
afbdaf8ecb
13
vendor/github.com/containers/common/pkg/report/template.go
generated
vendored
13
vendor/github.com/containers/common/pkg/report/template.go
generated
vendored
@@ -4,11 +4,11 @@ import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/containers/common/pkg/report/camelcase"
|
||||
"github.com/containers/storage/pkg/regexp"
|
||||
)
|
||||
|
||||
// Template embeds template.Template to add functionality to methods
|
||||
@@ -88,10 +88,11 @@ func truncateWithLength(source string, length int) string {
|
||||
// Array of map is returned to support range templates
|
||||
// Note: unexported fields can be supported by adding field to overrides
|
||||
// Note: It is left to the developer to write out said headers
|
||||
// Podman commands use the general rules of:
|
||||
// 1) unchanged --format includes headers
|
||||
// 2) --format '{{.ID}" # no headers
|
||||
// 3) --format 'table {{.ID}}' # includes headers
|
||||
//
|
||||
// Podman commands use the general rules of:
|
||||
// 1) unchanged --format includes headers
|
||||
// 2) --format '{{.ID}" # no headers
|
||||
// 3) --format 'table {{.ID}}' # includes headers
|
||||
func Headers(object interface{}, overrides map[string]string) []map[string]string {
|
||||
value := reflect.ValueOf(object)
|
||||
if value.Kind() == reflect.Ptr {
|
||||
@@ -159,7 +160,7 @@ func (t *Template) IsTable() bool {
|
||||
return t.isTable
|
||||
}
|
||||
|
||||
var rangeRegex = regexp.MustCompile(`(?s){{\s*range\s*\.\s*}}.*{{\s*end\s*-?\s*}}`)
|
||||
var rangeRegex = regexp.Delayed(`(?s){{\s*range\s*\.\s*}}.*{{\s*end\s*-?\s*}}`)
|
||||
|
||||
// EnforceRange ensures that the format string contains a range
|
||||
func EnforceRange(format string) string {
|
||||
|
Reference in New Issue
Block a user