Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
5e7a6a8b
Commit
5e7a6a8b
authored
Jul 27, 2015
by
Ilya Dmitrichenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore home directory paths
parent
03070297
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
kubectl_dash_f.go
cmd/mungedocs/kubectl_dash_f.go
+4
-0
kubectl_dash_f_test.go
cmd/mungedocs/kubectl_dash_f_test.go
+4
-0
No files found.
cmd/mungedocs/kubectl_dash_f.go
View file @
5e7a6a8b
...
@@ -102,6 +102,10 @@ func gotDashF(line int, fields []string, fieldNum int) error {
...
@@ -102,6 +102,10 @@ func gotDashF(line int, fields []string, fieldNum int) error {
// Same-dir files are usually created in the same example
// Same-dir files are usually created in the same example
return
nil
return
nil
}
}
if
strings
.
HasPrefix
(
target
,
"~/"
)
{
// Home directory may also be created by the same example
return
nil
}
if
strings
.
HasPrefix
(
target
,
"/"
)
{
if
strings
.
HasPrefix
(
target
,
"/"
)
{
// Absolute paths tend to be /tmp/* and created in the same example.
// Absolute paths tend to be /tmp/* and created in the same example.
return
nil
return
nil
...
...
cmd/mungedocs/kubectl_dash_f_test.go
View file @
5e7a6a8b
...
@@ -82,6 +82,10 @@ func TestKubectlDashF(t *testing.T) {
...
@@ -82,6 +82,10 @@ func TestKubectlDashF(t *testing.T) {
"Foo
\n
```
\n
kubectl -blah create -f/foobar
\n
```
\n
Bar"
,
"Foo
\n
```
\n
kubectl -blah create -f/foobar
\n
```
\n
Bar"
,
true
,
true
,
},
},
{
"Foo
\n
```
\n
kubectl -blah create -f~/foobar
\n
```
\n
Bar"
,
true
,
},
// Real checks
// Real checks
{
{
"Foo
\n
```
\n
kubectl -blah create -f mungedocs.go
\n
```
\n
Bar"
,
"Foo
\n
```
\n
kubectl -blah create -f mungedocs.go
\n
```
\n
Bar"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment