Skip to content
Branch: master
Commits on Sep 9, 2019
  1. add -no-robots, -red-logo flags

    dmitshur committed Sep 4, 2019
    These are useful for running a second, staging instance of the website:
    • no robots is used because the staging instance shouldn't be indexed
    • red logo makes it possible to tell the staging instance apart
    Update testdata to match.
  2. measure GitHub API rate limit

    dmitshur committed Sep 3, 2019
    This will provide visibility on how much GitHub API v3 and v4
    rate limit is remaining at various points in time, and how it
    changes when services are added or modified.
Commits on Aug 25, 2019
  1. _data/resume: add style for location class

    dmitshur committed Aug 24, 2019
    This class has been added to display location of companies.
    Regenerate assets; update testdata.
    	go generate ./assets
    	go test ./internal/page/resume -update
    Follows shurcooL/resume@dc47c8f.
Commits on Aug 17, 2019
  1. internal/page/blog: shorten blog posts on front page

    dmitshur committed Aug 17, 2019
    Add a View Full Post link at the end of posts that have been shortened,
    along with a fade to white effect to serve as a visual cue that a post
    has been cut short.
    Previously, some blog posts were very long, while others very short,
    which made it hard to get a sense of what posts there are.
    Now, their lengths are more consistent and predictable.
    This should help with glanceability of the blog.
    Fixes #27.
Commits on Jul 5, 2019
  1. display full import paths in activity feed

    dmitshur committed Jul 4, 2019
    This change optimizes how events in activity feed are displayed
    to emphasize the full import paths that are now provided via the
    Event.Container field.
    It builds on the work to compute full import paths done in the
    events service in commit shurcooL/events@8ae19e0.
    Fixes #26.
Commits on Jun 16, 2019
  1. add simple metrics to count ?go-get=1 requests

    dmitshur committed May 13, 2019
    This helps provide visibility to the rate at which Go packages are
    fetched at various hours of various days of the week.
  2. cancel other components if HTTP server fails

    dmitshur committed May 19, 2019
    If the HTTP server fails (e.g., fails to start listening on
    the specified port because it's already taken), we want to
    cancel all other components and exit right away. Do so by
    canceling the application-level context when that happens.
    Updates golang/go#32145
  3. all: improve httptest usage

    dmitshur committed May 19, 2019
    In tests, use the Result method. It produces output more representative
    of what the handler actually responded with, making tests more accurate.
    In legacy non-test usage as a temporary buffer, use Header() method
    instead of relying on directly setting the deprecated HeaderMap map.
    It was deprecated primarily for test-focused usage, but it's still
    deprecated, and makes tools report using it as a problem.
    Updates golang/go#32136
    Updates golang/go#32144
  4. add LICENSE file

    dmitshur committed Jun 16, 2019
    Make the MIT license easier to see by adding a LICENSE file.
    Use the template at
    Also regenerate .travis.yml and files with gorepogen.
Commits on May 18, 2019
  1. change module proxy URL to contain a non-empty host

    dmitshur committed May 18, 2019
    Previously, the URL of the module proxy used to serve modules beginning
    with the path contained an empty host value.
    This worked successfully in Go 1.11 and Go 1.12, leading to GET requests
    without stuttering. For example, to fetch a list of versions in the module, the request was:
    However, a module proxy URL with an empty host no longer works in Go tip
    as of, and evidence suggests that is the
    better behavior to continue to enforce.
    There are plans to document the requirement of a module proxy URL to
    have a non-empty host. It's also planned to improve the error reporting
    when the go command encounters an invalid module proxy URLs, so users
    will have a better idea of what went wrong. See issue golang/go#32006.
    To be compatible with Go 1.11, 1.12, and the future Go 1.13, this commit
    changes the module proxy URL used to serve own modules from "https://"
    to "". Future module proxy
    requests will look like:
    The module proxy protocol is meant primarily for machines rather than
    humans, so the longer path that stutters is an acceptable compromise.
    A benefit of the new proxy URL is that we no longer need to check
    if a request matches. Instead, all HTTP requests with a "/api/module/"
    path prefix can be immediately recognized as requests to the module
    proxy, and handled as such.
    As part of embracing the machine-focused aspect of these URLs,
    also remove the optional human-friendly behavior of redirecting
    when the module path and version are not encoded in the request URL.
    Instead, serve a 400 Bad Request error. A correct module proxy client
    will not make the mistake of forgetting to encode those values.
    Updates #24
    Updates golang/go#32006
Commits on May 8, 2019
  1. internal/code: copy directly from source to destination

    dmitshur committed May 8, 2019
    Instead of reading entire source into a buffer first, we can directly
    copy its contents to the writer. That is potentially more efficient.
  2. internal/code: factor out handling of each request type

    dmitshur committed May 8, 2019
    Each module proxy protocol request type is fairly orthogonal.
    Factoring out code handling each one into separate methods
    improves readability.
Commits on May 7, 2019
  1. internal/code: implement module proxy protocol

    dmitshur committed May 7, 2019
    This change adds an initial version of a Go module server
    that implements the module proxy protocol, as described
    This enables more efficient serving of Go modules, especially in cases
    where only the list, .info and .mod endpoints are requested (not .zip).
    That happens often: whenever the module isn't actually used in a build,
    rather it just happens to be in the module requirement graph.
    The module server isn't fully featured and has some known limitations,
    but it's enough to cover my current needs. It serves all current module
    versions at with identical checksums as the
    canonical go mod download algorithm. Its feature set may get expanded
    as my needs change.
Commits on May 6, 2019
  1. internal/code: add a timeout for git operations

    dmitshur committed May 6, 2019
    We expect normal git operations to complete well within 45 seconds.
    Add the timeout as a sanity check. It can help in a situation where
    the server is overloaded and some git operations take too long to
Commits on Apr 17, 2019
  1. change GitHub API timeout 5 -> 10 seconds

    dmitshur committed Apr 17, 2019
    In some rare cases, we end up hitting the 5 second timeout.
    It's okay to allow up to 10 seconds, so start using that.
  2. activity: add support for displaying change review events

    dmitshur committed Mar 18, 2019
    Some change comments are code reviews. Display them as such.
    Follows shurcooL/events@ddfd86e.
Commits on Apr 7, 2019
  1. shorten text at rune boundaries

    dmitshur committed Mar 28, 2019
    Chop off an entire rune, rather than just a part of one.
  2. internal/code: add support for Git-Protocol HTTP header

    dmitshur committed Mar 29, 2019
    This allows a git client to request a specific version of the Git
    wire protocol, e.g., version 2.
  3. remove deleted ioutil package from list

    dmitshur committed Mar 31, 2019
    It was deleted in shurcooL/go@6713ea5.
Commits on Mar 24, 2019
  1. update .../go-diff/diff import path

    dmitshur committed Mar 24, 2019
  2. replace internal uses of shurcool with dmitshur

    dmitshur committed Mar 24, 2019
    My GitHub and Twitter usernames have changed from shurcooL to dmitshur.
    Start using the new username internally, because the old one has become
    confusing to see by now.
Commits on Mar 18, 2019
  1. refactor SIGINT handling code, rename shurcoolGerritChange

    dmitshur committed Mar 18, 2019
    Make the SIGINT handling code cleaner, shorter, and more consistent
    with same code in other projects.
    The gerritClient is unauthenticated; it's not tied to shurcooL user.
    Rename shurcoolGerritChange variable to gerritChange to communicate
    that better.
Commits on Mar 17, 2019
  1. .travis.yml: use go vet instead of go tool vet

    dmitshur committed Mar 17, 2019
    As of Go 1.12, go tool vet is no longer supported¹.
    Start using the go vet command instead.
  2. internal/code: check that repo spec has canonical form

    dmitshur committed Mar 17, 2019
    It shouldn't be possible to create a repository with a non-cleaned path.
  3. replace generic -production flag with specific flags

    dmitshur committed Mar 17, 2019
    It's better to be explicit and clear with the flags. Instead of having
    one catch-all -production flag that controls many things, replace it
    with three specific, targeted flags. The new flags include -store-dir,
    -analytics-file, and -secure-cookie.
    Also rename -statefile flag to -state-file for consistency.
    This change updates home to follow more modern best practices,
    and makes it consistent with other, newer codebases.
  4. add test packages

    dmitshur committed Feb 2, 2019
    These packages are not meant to be used; they exist only to test
    the go command in various scenarios.
Commits on Feb 4, 2019
  1. _data/resume: update for resume API change

    dmitshur committed Feb 3, 2019
    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.
Commits on Jan 27, 2019
  1. reimplement listMasterCommits more directly

    dmitshur committed Jan 27, 2019
    Call the git log command more directly to fetch the required
    information with fewer type conversions and less overhead.
    This also reduces dependence on an external dependency.
Commits on Jan 20, 2019
  1. add support for viewing history of a single Go package

    dmitshur committed Jan 19, 2019
    It is implemented by specifying a git pathspec that constraints
    git operations to only the directory that contains the target
    Go package, and filters everything else out. Specifically:
    	# Commits affecting files in root directory only.
    	git log -- ':(glob)*'
    	# Commits affecting files in dir subdirectory only.
    	git log -- ':(glob)dir/*'
    Currently, there is no UI that leads to the new pages. That will
    be addressed in the future, when there are more package-specific
    operations supported. This is a single step towards providing a
    complete experience for individual packages.
Commits on Jan 19, 2019
  1. handle empty commits, show a blank slate

    dmitshur committed Jan 19, 2019
    Previously, there was a panic when trying to display an empty commit,
    because b[1:] was trying to trim a "\n" prefix that wasn't there.
    Instead of stripping it with bytes.TrimPrefix(b, []byte{'\n'}), just
    leave it. diff.ParseMultiFileDiff ignores it anyway.
    Also factor out blank slate component, since it's used in many places.
Commits on Jan 1, 2019
  1. about: 2019 is the Year of the Gopher

    dmitshur committed Jan 1, 2019
    Following the longstanding tradition. For example,
    see golang/go@c6282e7.
Commits on Dec 22, 2018
  1. Switch to dependency.

    dmitshur committed Dec 22, 2018
    It seems to be more well maintained and reliable at this time.
    google/uuid works out of box with Go modules, because the most recently
    tagged version is compatible with master (at this time, they're equal).
    On the other hand, using satori/go.uuid requires reverting back to an
    older API because its latest tag is more significantly behind master.
    See satori/go.uuid#90, satori/go.uuid#82, satori/go.uuid#76.
  2. Set charset=utf-8 in POST /action/new-repo handler.

    dmitshur committed Dec 22, 2018
    For consistency with other places where Content-Type header is set
    to "text/plain; charset=utf-8".
Commits on Nov 14, 2018
  1. http: Use package.

    dmitshur committed Nov 14, 2018
    The issue golang/go#21358 has been resolved upstream, so there's
    no more need to use a temporary fork of the ctxhttp package.
    Remove the forked ctxhttp package from package listing.
    It's about to be deprecated, so no point in showing it.
You can’t perform that action at this time.