Skip to content

Commit 00b44c0

Browse files
committed
Include week number in increases command
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent ec41106 commit 00b44c0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

cmd/increases.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ func runIncreasesE(cmd *cobra.Command, args []string) error {
8080
res = prettyJSON.String()
8181
}
8282

83+
yr, isoWeek := startDate.ISOWeek()
84+
fmt.Printf("Start date: %s\tWeek: %d (%d)\n",
85+
startDate.Format("2006-01-02"),
86+
isoWeek,
87+
yr)
8388
fmt.Println(res)
8489

8590
return nil

pkg/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func (c *Client) GetBuildIncreases(patStr string, owner string, startDate time.T
9090
q.Set("owner", owner)
9191
}
9292
q.Add("startDate", startDate.Format("2006-01-02"))
93-
log.Printf("Date: %s", startDate.Format("2006-01-02"))
93+
9494
u.RawQuery = q.Encode()
9595

9696
req, err := http.NewRequest(http.MethodGet, u.String(), nil)

0 commit comments

Comments
 (0)