File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ func main() {
120
120
defer close (ch )
121
121
data , err := os .ReadFile (args [1 ])
122
122
if err != nil {
123
- log . Fatal (err )
123
+ panic (err )
124
124
}
125
125
for len (data ) > 0 {
126
126
line , rest , _ := bytes .Cut (data , []byte {'\n' })
@@ -132,7 +132,7 @@ func main() {
132
132
}()
133
133
dlxSudoku .DoWork = func (line []byte ) [][]byte {
134
134
xc := dlx .NewDancer ()
135
- ans := [] byte ( string ( line ) )
135
+ ans := bytes . Clone ( line )
136
136
res := xc .Dance (sudokuDLX (bytes .NewReader (line )))
137
137
for _ , opt := range <- res .Solutions {
138
138
x := int (opt [0 ][1 ] - '0' )
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ func solve(matrix string) {
19
19
}
20
20
}
21
21
22
- func ExampleDancer_xc () {
22
+ func ExampleNewDancer () {
23
23
xcInput := `
24
24
25
25
| A simple example
42
42
// [C E F]
43
43
}
44
44
45
- func ExampleDancer_xcc () {
45
+ func ExampleNewDancer_xcc () {
46
46
xccInput := `
47
47
|A simple example of color controls
48
48
A B C | X Y
60
60
// [B X:1]
61
61
}
62
62
63
- func ExampleDancer_mcc () {
63
+ func ExampleNewDancer_mcc () {
64
64
mccInput := `
65
65
| A simple example of color controls
66
66
You can’t perform that action at this time.
0 commit comments