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
diff --git a/cmp/internal/diff/debug_disable.go b/cmp/internal/diff/debug_disable.go
index 42afa49..fe98dcc 100644
--- a/cmp/internal/diff/debug_disable.go
+++ b/cmp/internal/diff/debug_disable.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
-// +build !debug
+// +build !cmp_debug
package diff
diff --git a/cmp/internal/diff/debug_enable.go b/cmp/internal/diff/debug_enable.go
index fd9f7f1..597b6ae 100644
--- a/cmp/internal/diff/debug_enable.go
+++ b/cmp/internal/diff/debug_enable.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.md file.
-// +build debug
+// +build cmp_debug
package diff
@@ -14,7 +14,7 @@
)
// The algorithm can be seen running in real-time by enabling debugging:
-// go test -tags=debug -v
+// go test -tags=cmp_debug -v
//
// Example output:
// === RUN TestDifference/#34
diff --git a/cmp/internal/diff/diff.go b/cmp/internal/diff/diff.go
index 260befe..6326465 100644
--- a/cmp/internal/diff/diff.go
+++ b/cmp/internal/diff/diff.go
@@ -191,9 +191,9 @@
// that two lists commonly differ because elements were added to the front
// or end of the other list.
//
- // Running the tests with the "debug" build tag prints a visualization of
- // the algorithm running in real-time. This is educational for understanding
- // how the algorithm works. See debug_enable.go.
+ // Running the tests with the "cmp_debug" build tag prints a visualization
+ // of the algorithm running in real-time. This is educational for
+ // understanding how the algorithm works. See debug_enable.go.
f = debug.Begin(nx, ny, f, &fwdPath.es, &revPath.es)
for {
// Forward search from the beginning.