We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I tried to run the below code, panic is occured
package main import "github.com/go-xmlfmt/xmlfmt" func main() { msg := `<!-- 무조건 착신전환 조회 --> <?xml version="1.0" encoding="utf-8"?> <message name="DIS_USER_SSVC" tid="1591918441"> <!-- 결과 코드 : 0(성공) / 그 외(실패) --> <Result>0</Result> <parameter> <SsvcList> <!-- 가입/사용 여부 : 3(가입+사용 중) / 2(가입+미사용) --> <CFU>2</CFU> <!-- 착신 번호(CFU 가 3인 경우 사용) --> <!-- <DATA>0261216281</DATA> --> </SsvcList> </parameter> </message>` xmlfmt.FormatXML(string(msg), "", "\t") }
the error trace is
panic: strings: negative Repeat count goroutine 1 [running]: strings.Repeat({0x102cb4c14, 0x1}, 0xffffffffffffffff) /usr/local/go/src/strings/strings.go:529 +0x41c github.com/go-xmlfmt/xmlfmt.replaceTag.func1({0x1400011e195, 0xa}) /Users/hanyoungtak/Documents/go/pkg/mod/github.com/go-xmlfmt/xmlfmt@v0.0.0-20191208150333-d5b6f63a941b/xmlfmt.go:48 +0x24c regexp.(*Regexp).ReplaceAllStringFunc.func1({0x1400011c300, 0x1cd, 0x300}, {0x14000016240, 0x2, 0x2}) /usr/local/go/src/regexp/regexp.go:596 +0x78 regexp.(*Regexp).replaceAll(0x1400007c0a0, {0x0, 0x0, 0x0}, {0x1400011e000, 0x19f}, 0x2, 0x14000105e98) /usr/local/go/src/regexp/regexp.go:634 +0x314 regexp.(*Regexp).ReplaceAllStringFunc(0x1400007c0a0, {0x1400011e000, 0x19f}, 0x14000068210) /usr/local/go/src/regexp/regexp.go:595 +0x74 github.com/go-xmlfmt/xmlfmt.FormatXML({0x102cbacae, 0x1cf}, {0x0, 0x0}, {0x102cb4c14, 0x1}) /Users/hanyoungtak/Documents/go/pkg/mod/github.com/go-xmlfmt/xmlfmt@v0.0.0-20191208150333-d5b6f63a941b/xmlfmt.go:25 +0xc4 main.main() /Users/hanyoungtak/Documents/go/src/xml-test/main.go:20 +0x4c
The text was updated successfully, but these errors were encountered:
- [+] nested tag now supported. Closes: #2,#3
7fd73a9
fixed. see #2
Sorry, something went wrong.
No branches or pull requests
When I tried to run the below code, panic is occured
the error trace is
The text was updated successfully, but these errors were encountered: