This commit updates the used Go version to 1.16. The biggest benefit from this is that with Go 1.16 (and the latest Goreleaser) support for Apple Silicon is available, therefore wtf would work on Apple Silicon.
Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
After commit 49109c77f719cedc5c7f15bcf255f952d2c3b90d the HackerNews widget did not work as expected. It failed with a error message "http: read on closed response body". This commit fixes the underlying reader issue by reading the whole request body within the apiRequest function and returning the []bytes of the response instead of *http.Response. If we want to continue to return *http.Response this would lead to the problem that the caller (GetStory() and GetStories()) always need to close the Request Body. The ways before this MR is a bit problematic because the defer gets executed when the function is "done", so it closes the Body already before the utils.ParseJSON can read it.
Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
This commit adds the ReadyReplicas and Total Replicas count, the information is useful if you want to look over a new release of your application and k8s and want to know how many pods are ready/started from k8s. Otherwise the deployment option of this module is not that useful.
Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
* Add draft of covid module
* Work on pointers
* Add country stats
* Remove recovered, stays at 0
* Handle response code
* One struct for both
* List of countries
* Add test
* Add test for countries
* Fix typos
* Format numbers based on language/locale
Adds a new top-level configuration key called "language":
```yaml
wtf:
langauge: "ja-JP"
```
Users can now define which BCP 47 language tag to use to format any
text or numbers that currently support localization. Defaults to
"en-CA".
Acceptible values: any BCP 47 language tag recognized by the Go
"language" package.
Good luck to you figuring out what that cannonical list is. After a
morning of trying to suss it out, I have no idea.
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-1031 Rename WtfApp.app to WtfApp.tviewApp
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-1031 Add scaffolding for main to support multiple WtfApp instances
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-1031 WIP
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Remove common functionality from KeyboardWidget and into Base
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Augment with some descriptive comments
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Add full support for multiple app instances via the AppManager.
Still to do:
* Config support for multiple apps/multiple config files
* The ability to switch between apps
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Move SetTerminal out of main and into its own file
Signed-off-by: Chris Cummer <chriscummer@me.com>
A module to parse the feed from: https://www.krisinformation.se/en
Krisinformation.se is a web site run by the Swedish Civil Contingencies Agency
that compiles and convey warnings, alerts, and emergency information from
Swedish authorities to the public.
Features:
- Filter on country (all messages)
- Filter on county (only show county specific messages)
- Distance (only show message within a certain distance)
- Set a max age for displaying messages
- Set a maximum number of messages displayed