Skip to content

Commit 47b0945

Browse files
authored
Make debug mode more explicit (#105)
Switch the build tag for debugging from "debug" to "cmp_debug". The former tag accidentally matches usages of that tag for unrelated projects. Fixes #104
1 parent 2248b49 commit 47b0945

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

cmp/internal/diff/debug_disable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE.md file.
44

5-
// +build !debug
5+
// +build !cmp_debug
66

77
package diff
88

cmp/internal/diff/debug_enable.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE.md file.
44

5-
// +build debug
5+
// +build cmp_debug
66

77
package diff
88

@@ -14,7 +14,7 @@ import (
1414
)
1515

1616
// The algorithm can be seen running in real-time by enabling debugging:
17-
// go test -tags=debug -v
17+
// go test -tags=cmp_debug -v
1818
//
1919
// Example output:
2020
// === RUN TestDifference/#34

cmp/internal/diff/diff.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ func Difference(nx, ny int, f EqualFunc) (es EditScript) {
191191
// that two lists commonly differ because elements were added to the front
192192
// or end of the other list.
193193
//
194-
// Running the tests with the "debug" build tag prints a visualization of
195-
// the algorithm running in real-time. This is educational for understanding
196-
// how the algorithm works. See debug_enable.go.
194+
// Running the tests with the "cmp_debug" build tag prints a visualization
195+
// of the algorithm running in real-time. This is educational for
196+
// understanding how the algorithm works. See debug_enable.go.
197197
f = debug.Begin(nx, ny, f, &fwdPath.es, &revPath.es)
198198
for {
199199
// Forward search from the beginning.

0 commit comments

Comments
 (0)