File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,10 @@ import (
13
13
)
14
14
15
15
type snapshotFlags struct {
16
- from string
17
- output string
18
- strict bool
16
+ from string
17
+ output string
18
+ strict bool
19
+ commentSyntax string
19
20
}
20
21
21
22
func snapshotCommand () cli.Command {
@@ -41,6 +42,12 @@ and symbol information.`,
41
42
Destination : & snapshotFlags .strict ,
42
43
Value : true ,
43
44
},
45
+ & cli.StringFlag {
46
+ Name : "comment-syntax" ,
47
+ Usage : "Comment syntax to use for snapshot files" ,
48
+ Destination : & snapshotFlags .commentSyntax ,
49
+ Value : "//" ,
50
+ },
44
51
},
45
52
Action : func (c * cli.Context ) error {
46
53
return snapshotMain (snapshotFlags )
@@ -67,7 +74,7 @@ func snapshotMain(flags snapshotFlags) error {
67
74
return errors .Wrap (err , "use --strict=false to ignore this error" )
68
75
}
69
76
}
70
- snapshots , err := testutil .FormatSnapshots (index , "//" , symbolFormatter )
77
+ snapshots , err := testutil .FormatSnapshots (index , flags . commentSyntax , symbolFormatter )
71
78
if err != nil {
72
79
return err
73
80
}
You can’t perform that action at this time.
0 commit comments