Skip to content

Commit 7513f50

Browse files
committed
add ImportAs method
1 parent 5757289 commit 7513f50

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dsl/dsl.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ type Matcher map[string]Var
1616
// `a/b/foo.Bar` type during the pattern execution.
1717
func (m Matcher) Import(pkgPath string) {}
1818

19+
// ImportAs is like Import, but can handle "/v2" packages
20+
// and package name conflicts (e.g. "x/path" vs "y/path").
21+
func (m Matcher) ImportAs(pkgPath, localName string) {}
22+
1923
// Match specifies a set of patterns that match a rule being defined.
2024
// Pattern matching succeeds if at least 1 pattern matches.
2125
//

0 commit comments

Comments
 (0)