Skip to content

Instantly share code, notes, and snippets.

@tnuki10
Last active December 6, 2015 05:39
Show Gist options
  • Save tnuki10/ef577424a66e62c597eb to your computer and use it in GitHub Desktop.
Save tnuki10/ef577424a66e62c597eb to your computer and use it in GitHub Desktop.
Google App Engine for GoでのDeadlineの変更
import (
"appengine"
"appengine/urlfetch"
)
// 中省略
c := appengine.NewContext(r)
client := urlfetch.Client(c)
// deadline変更
transport := &urlfetch.Transport{
Context: c,
Deadline: 30 * time.Second,
}
client.Transport = transport
//これだけで行けた
client := urlfetch.Client(c)
client.Timeout = 30 * time.Second
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment