Permalink
Browse files

_data/resume: update for resume API change

The resume.DmitriShuralyov function needs to be provided with the
current local time dependency explicitly. It no longer uses time.Now()
implicitly to figure it out. This was needed for mocking time for test
reproducibility purposes.

Follows shurcooL/resume@abdf68e.
Similar to 9c781c5.
  • Loading branch information...
dmitshur committed Feb 3, 2019
1 parent fdd6870 commit 5c8ae21d42400fffcf81f5a129fbd9b3fe5d416c
Showing with 2 additions and 1 deletion.
  1. +2 −1 _data/resume/main.go
@@ -12,6 +12,7 @@ import (
"net/url"
"strconv"
"strings"
"time"

"github.com/shurcooL/frontend/reactionsmenu"
homehttp "github.com/shurcooL/home/http"
@@ -54,7 +55,7 @@ func setup(ctx context.Context) {
notificationsService := httpclient.NewNotifications(httpClient, "", "")
returnURL := dom.GetWindow().Location().Pathname + dom.GetWindow().Location().Search
var buf bytes.Buffer
err = resume.RenderBodyInnerHTML(ctx, &buf, reactionsService, notificationsService, usersService, authenticatedUser, returnURL)
err = resume.RenderBodyInnerHTML(ctx, &buf, reactionsService, notificationsService, usersService, time.Now(), authenticatedUser, returnURL)
if err != nil {
log.Println(err)
return

0 comments on commit 5c8ae21

Please sign in to comment.