this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

pkg/path: add missing param declaration

The standard library function path.Match requires 3 parameters, but only
2 are currently declared. This causes valid usage of the function to
fail with the following error:

too many arguments in call to path.Match (have 3, want 2):

To fix this, the missing parameter declaration is added.

Fixes #3203.

Signed-off-by: Noam Dolovich <noam.tzvi.dolovich@gmail.com>
Change-Id: I6e645293f8e589ad1834e3c33ff7bffc2abb5aed
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1195888
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>

authored by

Noam Dolovich and committed by
Daniel Martí
e09cb310 889da91c

+56
+1
pkg/path/pkg.go
··· 123 123 Name: "Match", 124 124 Params: []pkg.Param{ 125 125 {Kind: adt.StringKind}, 126 + {Kind: adt.StringKind}, 126 127 {Kind: adt.StringKind, Value: unixDefault}, 127 128 }, 128 129 Result: adt.BoolKind,
+55
pkg/path/testdata/os.txtar
··· 56 56 #"c:\abc\def\..\.."#: _ 57 57 } 58 58 59 + Match: [OS=#AnyOS]: [Pattern=string]: [Name=string]: path.Match(Pattern, Name, OS) 60 + Match: default: [Pattern=string]: [Name=string]: path.Match(Pattern, Name) 61 + Match: default: Match.unix 62 + Match: [_]: { 63 + "*c": "abc": _ 64 + "*.txt": "a/b.txt": _ 65 + "*.zip": #"c:\a\b\file.zip"#: _ 66 + } 67 + 59 68 Slash: [OS=string]: [ARG=string]: { 60 69 to: path.ToSlash(ARG, OS) 61 70 from: path.FromSlash(ARG, OS) ··· 212 221 windows: { 213 222 "abc//def//ghi": "abc\\def\\ghi" 214 223 "c:\\abc\\def\\..\\..": "c:\\" 224 + } 225 + } 226 + Match: { 227 + default: { 228 + "*c": { 229 + abc: true 230 + } 231 + "*.txt": { 232 + "a/b.txt": false 233 + } 234 + "*.zip": { 235 + "c:\\a\\b\\file.zip": true 236 + } 237 + } 238 + unix: { 239 + "*c": { 240 + abc: true 241 + } 242 + "*.txt": { 243 + "a/b.txt": false 244 + } 245 + "*.zip": { 246 + "c:\\a\\b\\file.zip": true 247 + } 248 + } 249 + plan9: { 250 + "*c": { 251 + abc: true 252 + } 253 + "*.txt": { 254 + "a/b.txt": false 255 + } 256 + "*.zip": { 257 + "c:\\a\\b\\file.zip": true 258 + } 259 + } 260 + windows: { 261 + "*c": { 262 + abc: true 263 + } 264 + "*.txt": { 265 + "a/b.txt": true 266 + } 267 + "*.zip": { 268 + "c:\\a\\b\\file.zip": false 269 + } 215 270 } 216 271 } 217 272 Slash: {