Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Add suport for parsing unicode characters #86

Merged
merged 4 commits into from
Oct 7, 2018

Conversation

1uka
Copy link
Contributor

@1uka 1uka commented Oct 6, 2018

Resolves part 2 of #84 .

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.826% when pulling 739d534 on 1uka:84-unicode-parsing into 97d0d74 on go-chat-bot:master.

@@ -9,5 +9,5 @@ jobs:
steps:
- checkout
- run: go test -v -cover -race -coverprofile=coverage.out
- run: go get github.com/mattn/goveralls
- run: go get github.com/mattn/goveralls github.com/mozillazg/go-unidecode
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1uka this is unnecessary, this project uses go modules. Could you please update the dependencies? Basically you need to use Go 1.11, set GO111MODULE=on and run go get github.com/mozillazg/go-unidecode inside this project directory. It will download the dependency and update the go.mod file.

@@ -35,7 +36,7 @@ func parse(s string, channel *ChannelData, user *User) (*Cmd, error) {

// get the command
pieces := strings.SplitN(c.Message, " ", 2)
c.Command = strings.ToLower(pieces[0])
c.Command = strings.ToLower(unidecode.Unidecode(pieces[0]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, but can you update the tests please?

@1uka
Copy link
Contributor Author

1uka commented Oct 6, 2018

Hey, will do it as soon as I get home. Sorry for the inconvenience 😊

@fabioxgn
Copy link
Member

fabioxgn commented Oct 6, 2018

Hey, will do it as soon as I get home. Sorry for the inconvenience 😊

@1uka no problem, thanks for contributing 🍻

@fabioxgn fabioxgn merged commit cf98806 into go-chat-bot:master Oct 7, 2018
@1uka 1uka deleted the 84-unicode-parsing branch October 8, 2018 09:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants