Skip to content

Commit 226e947

Browse files
committed
all: replace "Debug" with "AssetDebug"
Josh Bleecher Snyder made the point that if this file is compiled in with other files in a package, "Debug" is a very generic word. "AssetDebug" is less likely to have conflicts with existing packages. This is a breaking change, which I'm not happy about, but it's a new one, so hopefully very few people are relying on the behavior that was recently added. Add a "CHANGELOG" to helpfully make this change more clear to people.
1 parent b8002fc commit 226e947

File tree

7 files changed

+20
-12
lines changed

7 files changed

+20
-12
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## 3.21.0
2+
3+
Replace "Debug" with "AssetDebug" to reduce the likelihood of conflicts.
4+
5+
## 3.20.0
6+
7+
Add the "Debug" constant if assets have been generated using the `--debug` flag
8+
at the command line.

convert.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ func Translate(c *Config) error {
9696
if err := writeTOC(buf, toc); err != nil {
9797
return err
9898
}
99-
_, err = fmt.Fprintf(buf, `// Debug is true if the assets were built with the debug flag enabled.
100-
const Debug = %t
99+
_, err = fmt.Fprintf(buf, `// AssetDebug is true if the assets were built with the debug flag enabled.
100+
const AssetDebug = %t
101101
102102
`, c.Debug)
103103
if err != nil {

testdata/out/compress-memcopy.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

testdata/out/compress-nomemcopy.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

testdata/out/debug.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

testdata/out/nocompress-memcopy.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

testdata/out/nocompress-nomemcopy.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)