mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
fix(wakatime)!: rename Cummulative
to Cumulative
This commit is contained in:
parent
b0b34fc90e
commit
e438c8d61e
|
@ -21,13 +21,13 @@ type wtTotals struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type wtData struct {
|
type wtData struct {
|
||||||
CummulativeTotal wtTotals `json:"cummulative_total"`
|
CumulativeTotal wtTotals `json:"cumulative_total"`
|
||||||
Start string `json:"start"`
|
Start string `json:"start"`
|
||||||
End string `json:"end"`
|
End string `json:"end"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *Wakatime) Template() string {
|
func (w *Wakatime) Template() string {
|
||||||
return " {{ secondsRound .CummulativeTotal.Seconds }} "
|
return " {{ secondsRound .CumulativeTotal.Seconds }} "
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *Wakatime) Enabled() bool {
|
func (w *Wakatime) Enabled() bool {
|
||||||
|
|
|
@ -73,8 +73,7 @@ func TestWTTrackedTime(t *testing.T) {
|
||||||
|
|
||||||
for _, tc := range cases {
|
for _, tc := range cases {
|
||||||
env := &mock.MockedEnvironment{}
|
env := &mock.MockedEnvironment{}
|
||||||
|
response := fmt.Sprintf(`{"cumulative_total": {"seconds": %.2f, "text": "x"}}`, float64(tc.Seconds))
|
||||||
response := fmt.Sprintf(`{"cummulative_total": {"seconds": %.2f, "text": "x"}}`, float64(tc.Seconds))
|
|
||||||
|
|
||||||
env.On("HTTPRequest", FAKEAPIURL).Return([]byte(response), tc.Error)
|
env.On("HTTPRequest", FAKEAPIURL).Return([]byte(response), tc.Error)
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ If you don't want to include the API key into your configuration, the following
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
|
|
||||||
`WAKATIME_API_KEY` is an example, **any name is possible and acceptable** as long as the environment variable exists and contains the API key value.
|
`WAKATIME_API_KEY` is an example, **any name is possible and acceptable** as long as the environment variable exists and contains the API key value.
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ Please refer to the [Environment Variable][templates-environment-variables] page
|
||||||
:::note default template
|
:::note default template
|
||||||
|
|
||||||
```template
|
```template
|
||||||
{{ secondsRound .CummulativeTotal.Seconds }}
|
{{ secondsRound .CumulativeTotal.Seconds }}
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
@ -75,7 +75,7 @@ Please refer to the [Environment Variable][templates-environment-variables] page
|
||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
| ------------------- | ---------- | ---------------------------------------- |
|
| ------------------- | ---------- | ---------------------------------------- |
|
||||||
| `.CummulativeTotal` | `wtTotals` | object holding total tracked time values |
|
| `.CumulativeTotal` | `wtTotals` | object holding total tracked time values |
|
||||||
|
|
||||||
### wtTotals Properties
|
### wtTotals Properties
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue