Skip to content

Commit

Permalink
chore: textscan - update pkg readme
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Oct 16, 2022
1 parent 1ac1ddc commit f6ba94b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 30 deletions.
6 changes: 6 additions & 0 deletions cliutil/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,9 @@ PRINT AT github.com/gookit/goutil/cliutil_test.TestParseLine(line_parser_test.go
```text
Build line: ./myapp -a val0 -m "this is message" arg0
```

## Projects using `cliutil`

`cliutil` is used in these projects:

- https://github.com/gookit/gcli
36 changes: 6 additions & 30 deletions strutil/textscan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ line string
}
```

**Output:**:
**Output:**

```shell
====> Token kind: Comments
Expand Down Expand Up @@ -89,7 +89,6 @@ comments:
==== Collected data:
map[string]string { #len=3
"desc": string("
a multi
line string
"), #len=22
Expand All @@ -98,32 +97,9 @@ line string
},
```

## Functions
## Projects using `textscan`

```go
package textscan // import "github.com/gookit/goutil/strutil/textscan"

func AddKind(k Kind, name string)
func CommentsDetect(text string) (ok, more bool, err error)
func CommentsDetectEnd(line string) bool
func IsKindToken(k Kind, tok Token) bool
func KindString(k Kind) string
type BaseToken struct{ ... }
type CommentToken struct{ ... }
func NewCommentToken(val string) *CommentToken
type CommentsMatcher struct{ ... }
type EmptyToken struct{ ... }
func NewEmptyToken() *EmptyToken
type HandleFn func(t Token)
type KeyValueMatcher struct{ ... }
type Kind rune
const TokInvalid Kind = iota ...
type LiteToken interface{ ... }
type Matcher interface{ ... }
type Parser struct{ ... }
func NewParser(fn HandleFn) *Parser
type TextScanner struct{ ... }
func NewScanner(in interface{}) *TextScanner
type Token interface{ ... }
type ValueToken struct{ ... }
```
`textscan` is used in these projects:

- https://github.com/gookit/ini
- https://github.com/gookit/properties

0 comments on commit f6ba94b

Please sign in to comment.