diff options
| author | Shulhan <ms@kilabit.info> | 2023-12-10 02:44:35 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-12-10 02:44:35 +0700 |
| commit | cb215a6d8138c04ec0e3a91228a9ef23f26148b3 (patch) | |
| tree | acdd97aa2c4c0f2f646c34a2e90b0e00e69a5ec8 | |
| parent | 03504cc1789ba694f54a4c3e516a92de08500557 (diff) | |
| download | asciidoctor-go-cb215a6d8138c04ec0e3a91228a9ef23f26148b3.tar.xz | |
all: remove dependency to "github.com/shuLhan/share/lib/debug"
| -rw-r--r-- | document_parser.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/document_parser.go b/document_parser.go index 27f92be..5739ce1 100644 --- a/document_parser.go +++ b/document_parser.go @@ -9,9 +9,10 @@ import ( "io" "github.com/shuLhan/share/lib/ascii" - "github.com/shuLhan/share/lib/debug" ) +const debugLevel = 0 + type documentParser struct { doc *Document lines [][]byte @@ -179,7 +180,7 @@ func (docp *documentParser) include(el *elementInclude) { newLines = append(newLines, docp.lines[docp.lineNum+1:]...) docp.lines = newLines - if debug.Value == 2 { + if debugLevel >= 2 { for _, line = range includedLines { fmt.Printf("%s\n", line) } @@ -196,7 +197,7 @@ func (docp *documentParser) line(logp string) (spaces, line []byte, ok bool) { } line = docp.lines[docp.lineNum] - if debug.Value == 2 { + if debugLevel >= 2 { fmt.Printf("line %3d: %s: %s\n", docp.lineNum, logp, line) } docp.lineNum++ |
