Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Unified Diff: common/api/gitiles/gitiles.go

Issue 2979153002: [milo] initial call to get git history (Closed)
Patch Set: fix nits Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | milo/api/proto/buildbot.pb.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/api/gitiles/gitiles.go
diff --git a/common/api/gitiles/gitiles.go b/common/api/gitiles/gitiles.go
index 19ac8399a407a18d9e88e16fd71367e91b62a399..f9381706b0a65ff6c749a4539dd8a9dd2453cff4 100644
--- a/common/api/gitiles/gitiles.go
+++ b/common/api/gitiles/gitiles.go
@@ -22,6 +22,7 @@ import (
"net/http"
"net/url"
"strings"
+ "time"
"github.com/luci/luci-go/server/auth"
"golang.org/x/net/context"
@@ -34,6 +35,11 @@ type User struct {
Time string `json:"time"`
}
+// GetTime returns the Time field as real data!
+func (u *User) GetTime() (time.Time, error) {
+ return time.Parse(time.ANSIC, u.Time)
+}
+
// Commit is the information of a commit returned from gitiles.
type Commit struct {
Commit string `json:"commit"`
« no previous file with comments | « no previous file | milo/api/proto/buildbot.pb.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698