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

Add emoji icons for printing given a parameter #72

Closed

Conversation

andersfischernielsen
Copy link

@andersfischernielsen andersfischernielsen commented Aug 15, 2019

This pull requests adds support for printing emoji icons instead of the ASCII/SVG icons.
The parameter --use-emoji-icon has been added along with a switch statement for the different emojis (based on the existing code).

I'm new to Go so I'm unsure if the error handling in

weather/forecast/print.go

Lines 264 to 274 in 818d1ad

var err error
var icon string
if emojiIcons {
icon, err = getEmojiIcon(forecast.Currently.Icon)
} else {
icon, err = getIcon(forecast.Currently.Icon)
}
if err != nil {
return err
}
is correct. Let me know!

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Found some fixes!

P.S. share your ideas, feedbacks or issues with us at https://github.com/fixmie/feedback (this message will be removed after the beta stage).

forecast/print.go Outdated Show resolved Hide resolved
Removes some unneeded type annotations.

Co-Authored-By: fixmie[bot] <44270338+fixmie[bot]@users.noreply.github.com>
@andersfischernielsen
Copy link
Author

This might resolve #52, by the way.

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.

1 participant