mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
examples munger allows any file extension.
This commit is contained in:
@@ -33,6 +33,8 @@ spec:
|
||||
image: nginx
|
||||
ports:
|
||||
- containerPort: 80
|
||||
`
|
||||
var textExample = `some text
|
||||
`
|
||||
var cases = []struct {
|
||||
in string
|
||||
@@ -47,6 +49,10 @@ spec:
|
||||
"<!-- BEGIN MUNGE: EXAMPLE ../mungedocs/testdata/pod.yaml -->\n<!-- END MUNGE: EXAMPLE ../mungedocs/testdata/pod.yaml -->\n",
|
||||
"<!-- BEGIN MUNGE: EXAMPLE ../mungedocs/testdata/pod.yaml -->\n\n```yaml\n" + podExample + "```\n\n[Download example](../mungedocs/testdata/pod.yaml?raw=true)\n<!-- END MUNGE: EXAMPLE ../mungedocs/testdata/pod.yaml -->\n",
|
||||
},
|
||||
{
|
||||
"<!-- BEGIN MUNGE: EXAMPLE testdata/example.txt -->\n<!-- END MUNGE: EXAMPLE testdata/example.txt -->\n",
|
||||
"<!-- BEGIN MUNGE: EXAMPLE testdata/example.txt -->\n\n```\n" + textExample + "```\n\n[Download example](testdata/example.txt?raw=true)\n<!-- END MUNGE: EXAMPLE testdata/example.txt -->\n",
|
||||
},
|
||||
}
|
||||
repoRoot = ""
|
||||
for _, c := range cases {
|
||||
|
||||
Reference in New Issue
Block a user