1
0
mirror of https://github.com/bestnite/sub2clash.git synced 2026-04-26 21:01:53 +00:00

add tests

This commit is contained in:
2025-06-12 19:33:14 +10:00
parent 69deed91df
commit c1012750ff
24 changed files with 1830 additions and 440 deletions
+2 -11
View File
@@ -1,11 +1,5 @@
package parser
type ParseError struct {
Type ParseErrorType
Message string
Raw string
}
type ParseErrorType string
const (
@@ -16,9 +10,6 @@ const (
ErrInvalidBase64 ParseErrorType = "invalid base64"
)
func (e *ParseError) Error() string {
if e.Message != "" {
return string(e.Type) + ": " + e.Message + " \"" + e.Raw + "\""
}
return string(e.Type)
func (e ParseErrorType) Error() string {
return string(e)
}