Skip to content

Commit eb631cf

Browse files
committed
Fix lint warnings
1 parent 4704470 commit eb631cf

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

apps.go

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ import (
1616
type AppTrainingStatus string
1717

1818
const (
19-
Done AppTrainingStatus = "done"
19+
// Done status
20+
Done AppTrainingStatus = "done"
21+
// Scheduled status
2022
Scheduled AppTrainingStatus = "scheduled"
21-
Ongoing AppTrainingStatus = "ongoing"
23+
// Ongoing status
24+
Ongoing AppTrainingStatus = "ongoing"
2225
)
2326

2427
// App - https://wit.ai/docs/http/20170307#get__apps_link
@@ -38,18 +41,18 @@ type App struct {
3841
Timezone string `json:"timezone,omitempty"`
3942
// Training information
4043
LastTrainingDurationSecs int `json:"last_training_duration_secs,omitempty"`
41-
WillTrainAt WitAiTime `json:"will_train_at,omitempty"`
42-
LastTrainedAt WitAiTime `json:"last_trained_at,omitempty"`
44+
WillTrainAt Time `json:"will_train_at,omitempty"`
45+
LastTrainedAt Time `json:"last_trained_at,omitempty"`
4346
TrainingStatus AppTrainingStatus `json:"training_status,omitempty"`
4447
}
4548

46-
// WitAiTime - Custom type to encapsulated a time.Time
47-
type WitAiTime struct {
49+
// Time - Custom type to encapsulated a time.Time
50+
type Time struct {
4851
time.Time
4952
}
5053

5154
// UnmarshalJSON - Our unmarshal function for our custom type
52-
func (witTime *WitAiTime) UnmarshalJSON(input []byte) error {
55+
func (witTime *Time) UnmarshalJSON(input []byte) error {
5356
strInput := string(input)
5457
strInput = strings.Trim(strInput, `"`)
5558
newTime, err := time.Parse(WitTimeFormat, strInput)

0 commit comments

Comments
 (0)