Skip to content
New issue

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

ReverseCodeMap, map unicode character to lists of short codes #35

Merged
merged 2 commits into from
Apr 2, 2020

Conversation

joshblum
Copy link
Contributor

@joshblum joshblum commented Apr 2, 2020

Thought this might be useful upstream for shortcode alias support.

Copy link
Owner

@kyokomi kyokomi left a comment

Choose a reason for hiding this comment

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

@joshblum PR Thanks!

@@ -99,7 +137,7 @@ func Println(a ...interface{}) (int, error) {

// Printf is fmt.Printf which supports emoji
func Printf(format string, a ...interface{}) (int, error) {
return fmt.Printf(compile(fmt.Sprintf(format, a...)))
return fmt.Print(compile(fmt.Sprintf(format, a...)))
Copy link
Owner

Choose a reason for hiding this comment

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

Is there a reason for this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed from the output of https://github.com/golangci/golangci-lint

$ golangci-lint run .
emoji_test.go:189:22: S1019: should use make([]byte, buff.Len()) instead (gosimple)
                bc := make([]byte, buff.Len(), buff.Len())
                                   ^
emoji.go:140:20: SA1006: printf-style function with dynamic format string and no further arguments should use print-style function instead (staticcheck)
        return fmt.Printf(compile(fmt.Sprintf(format, a...)))
                          ^

Happy to move to a separate PR or remove if you want!

Copy link
Owner

Choose a reason for hiding this comment

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

I see . Thank you, I understand 👍

@joshblum joshblum requested a review from kyokomi April 2, 2020 12:52
Copy link
Owner

@kyokomi kyokomi left a comment

Choose a reason for hiding this comment

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

LGTM

@kyokomi kyokomi merged commit 8803a15 into kyokomi:master Apr 2, 2020
@joshblum joshblum deleted the joshblum/revmap branch April 2, 2020 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants