all: run prettier on js and css

Command used: docker run --rm -it --volume "$PWD":/wd agniva/prettier "**/*.{js,css}"

Updates golang/go#21719

Change-Id: Ibd53141bb0032078953af873dde0b0c47e290fb4
Reviewed-on: https://go-review.googlesource.com/c/website/+/183880
Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
diff --git a/content/static/godocs.js b/content/static/godocs.js
index 7aff251..149f768 100644
--- a/content/static/godocs.js
+++ b/content/static/godocs.js
@@ -11,336 +11,371 @@
  */
 
 (function() {
-'use strict';
+  'use strict';
 
-var headerEl = document.querySelector('.js-header');
-var menuButtonEl = document.querySelector('.js-headerMenuButton');
-menuButtonEl.addEventListener('click', function(e) {
-  e.preventDefault();
-  headerEl.classList.toggle('is-active');
-  menuButtonEl.setAttribute('aria-expanded', headerEl.classList.contains('is-active'));
-});
-
-/* Generates a table of contents: looks for h2 and h3 elements and generates
- * links. "Decorates" the element with id=="nav" with this table of contents.
- */
-function generateTOC() {
-  if ($('#manual-nav').length > 0) {
-    return;
-  }
-
-  // For search, we send the toc precomputed from server-side.
-  // TODO: Ideally, this should always be precomputed for all pages, but then
-  // we need to do HTML parsing on the server-side.
-  if (location.pathname === '/search') {
-    return;
-  }
-
-  var nav = $('#nav');
-  if (nav.length === 0) {
-    return;
-  }
-
-  var toc_items = [];
-  $(nav).nextAll('h2, h3').each(function() {
-    var node = this;
-    if (node.id == '')
-      node.id = 'tmp_' + toc_items.length;
-    var link = $('<a/>').attr('href', '#' + node.id).text($(node).text());
-    var item;
-    if ($(node).is('h2')) {
-      item = $('<dt/>');
-    } else { // h3
-      item = $('<dd class="indent"/>');
-    }
-    item.append(link);
-    toc_items.push(item);
+  var headerEl = document.querySelector('.js-header');
+  var menuButtonEl = document.querySelector('.js-headerMenuButton');
+  menuButtonEl.addEventListener('click', function(e) {
+    e.preventDefault();
+    headerEl.classList.toggle('is-active');
+    menuButtonEl.setAttribute(
+      'aria-expanded',
+      headerEl.classList.contains('is-active')
+    );
   });
-  if (toc_items.length <= 1) {
-    return;
-  }
-  var dl1 = $('<dl/>');
-  var dl2 = $('<dl/>');
 
-  var split_index = (toc_items.length / 2) + 1;
-  if (split_index < 8) {
-    split_index = toc_items.length;
-  }
-  for (var i = 0; i < split_index; i++) {
-    dl1.append(toc_items[i]);
-  }
-  for (/* keep using i */; i < toc_items.length; i++) {
-    dl2.append(toc_items[i]);
-  }
-
-  var tocTable = $('<table class="unruled"/>').appendTo(nav);
-  var tocBody = $('<tbody/>').appendTo(tocTable);
-  var tocRow = $('<tr/>').appendTo(tocBody);
-
-  // 1st column
-  $('<td class="first"/>').appendTo(tocRow).append(dl1);
-  // 2nd column
-  $('<td/>').appendTo(tocRow).append(dl2);
-}
-
-function bindToggle(el) {
-  $('.toggleButton', el).click(function() {
-    if ($(this).closest(".toggle, .toggleVisible")[0] != el) {
-      // Only trigger the closest toggle header.
+  /* Generates a table of contents: looks for h2 and h3 elements and generates
+   * links. "Decorates" the element with id=="nav" with this table of contents.
+   */
+  function generateTOC() {
+    if ($('#manual-nav').length > 0) {
       return;
     }
 
-    if ($(el).is('.toggle')) {
-      $(el).addClass('toggleVisible').removeClass('toggle');
-    } else {
-      $(el).addClass('toggle').removeClass('toggleVisible');
-    }
-  });
-}
-
-function bindToggles(selector) {
-  $(selector).each(function(i, el) {
-    bindToggle(el);
-  });
-}
-
-function bindToggleLink(el, prefix) {
-  $(el).click(function() {
-    var href = $(el).attr('href');
-    var i = href.indexOf('#'+prefix);
-    if (i < 0) {
+    // For search, we send the toc precomputed from server-side.
+    // TODO: Ideally, this should always be precomputed for all pages, but then
+    // we need to do HTML parsing on the server-side.
+    if (location.pathname === '/search') {
       return;
     }
-    var id = '#' + prefix + href.slice(i+1+prefix.length);
-    if ($(id).is('.toggle')) {
-      $(id).find('.toggleButton').first().click();
+
+    var nav = $('#nav');
+    if (nav.length === 0) {
+      return;
     }
-  });
-}
-function bindToggleLinks(selector, prefix) {
-  $(selector).each(function(i, el) {
-    bindToggleLink(el, prefix);
-  });
-}
 
-function setupInlinePlayground() {
-	'use strict';
-	// Set up playground when each element is toggled.
-	$('div.play').each(function (i, el) {
-		// Set up playground for this example.
-		var setup = function() {
-			var code = $('.code', el);
-			playground({
-				'codeEl':   code,
-				'outputEl': $('.output', el),
-				'runEl':    $('.run', el),
-				'fmtEl':    $('.fmt', el),
-				'shareEl':  $('.share', el),
-				'shareRedirect': '//play.golang.org/p/'
-			});
+    var toc_items = [];
+    $(nav)
+      .nextAll('h2, h3')
+      .each(function() {
+        var node = this;
+        if (node.id == '') node.id = 'tmp_' + toc_items.length;
+        var link = $('<a/>')
+          .attr('href', '#' + node.id)
+          .text($(node).text());
+        var item;
+        if ($(node).is('h2')) {
+          item = $('<dt/>');
+        } else {
+          // h3
+          item = $('<dd class="indent"/>');
+        }
+        item.append(link);
+        toc_items.push(item);
+      });
+    if (toc_items.length <= 1) {
+      return;
+    }
+    var dl1 = $('<dl/>');
+    var dl2 = $('<dl/>');
 
-			// Make the code textarea resize to fit content.
-			var resize = function() {
-				code.height(0);
-				var h = code[0].scrollHeight;
-				code.height(h+20); // minimize bouncing.
-				code.closest('.input').height(h);
-			};
-			code.on('keydown', resize);
-			code.on('keyup', resize);
-			code.keyup(); // resize now.
-		};
+    var split_index = toc_items.length / 2 + 1;
+    if (split_index < 8) {
+      split_index = toc_items.length;
+    }
+    for (var i = 0; i < split_index; i++) {
+      dl1.append(toc_items[i]);
+    }
+    for (; /* keep using i */ i < toc_items.length; i++) {
+      dl2.append(toc_items[i]);
+    }
 
-		// If example already visible, set up playground now.
-		if ($(el).is(':visible')) {
-			setup();
-			return;
-		}
+    var tocTable = $('<table class="unruled"/>').appendTo(nav);
+    var tocBody = $('<tbody/>').appendTo(tocTable);
+    var tocRow = $('<tr/>').appendTo(tocBody);
 
-		// Otherwise, set up playground when example is expanded.
-		var built = false;
-		$(el).closest('.toggle').click(function() {
-			// Only set up once.
-			if (!built) {
-				setup();
-				built = true;
-			}
-		});
-	});
-}
+    // 1st column
+    $('<td class="first"/>')
+      .appendTo(tocRow)
+      .append(dl1);
+    // 2nd column
+    $('<td/>')
+      .appendTo(tocRow)
+      .append(dl2);
+  }
 
-// fixFocus tries to put focus to #page so that keyboard navigation works.
-function fixFocus() {
-  var page = $('#page');
-  var topbar = $('div#topbar');
-  page.css('outline', 0); // disable outline when focused
-  page.attr('tabindex', -1); // and set tabindex so that it is focusable
-  $(window).resize(function (evt) {
-    // only focus page when the topbar is at fixed position (that is, it's in
-    // front of page, and keyboard event will go to the former by default.)
-    // by focusing page, keyboard event will go to page so that up/down arrow,
-    // space, etc. will work as expected.
-    if (topbar.css('position') == "fixed")
-      page.focus();
-  }).resize();
-}
-
-function toggleHash() {
-  var id = window.location.hash.substring(1);
-  // Open all of the toggles for a particular hash.
-  var els = $(
-    document.getElementById(id),
-    $('a[name]').filter(function() {
-      return $(this).attr('name') == id;
-    })
-  );
-
-  while (els.length) {
-    for (var i = 0; i < els.length; i++) {
-      var el = $(els[i]);
-      if (el.is('.toggle')) {
-        el.find('.toggleButton').first().click();
+  function bindToggle(el) {
+    $('.toggleButton', el).click(function() {
+      if ($(this).closest('.toggle, .toggleVisible')[0] != el) {
+        // Only trigger the closest toggle header.
+        return;
       }
-    }
-    els = el.parent();
-  }
-}
 
-function personalizeInstallInstructions() {
-  var prefix = '?download=';
-  var s = window.location.search;
-  if (s.indexOf(prefix) != 0) {
-    // No 'download' query string; detect "test" instructions from User Agent.
-    if (navigator.platform.indexOf('Win') != -1) {
-      $('.testUnix').hide();
-      $('.testWindows').show();
-    } else {
+      if ($(el).is('.toggle')) {
+        $(el)
+          .addClass('toggleVisible')
+          .removeClass('toggle');
+      } else {
+        $(el)
+          .addClass('toggle')
+          .removeClass('toggleVisible');
+      }
+    });
+  }
+
+  function bindToggles(selector) {
+    $(selector).each(function(i, el) {
+      bindToggle(el);
+    });
+  }
+
+  function bindToggleLink(el, prefix) {
+    $(el).click(function() {
+      var href = $(el).attr('href');
+      var i = href.indexOf('#' + prefix);
+      if (i < 0) {
+        return;
+      }
+      var id = '#' + prefix + href.slice(i + 1 + prefix.length);
+      if ($(id).is('.toggle')) {
+        $(id)
+          .find('.toggleButton')
+          .first()
+          .click();
+      }
+    });
+  }
+  function bindToggleLinks(selector, prefix) {
+    $(selector).each(function(i, el) {
+      bindToggleLink(el, prefix);
+    });
+  }
+
+  function setupInlinePlayground() {
+    'use strict';
+    // Set up playground when each element is toggled.
+    $('div.play').each(function(i, el) {
+      // Set up playground for this example.
+      var setup = function() {
+        var code = $('.code', el);
+        playground({
+          codeEl: code,
+          outputEl: $('.output', el),
+          runEl: $('.run', el),
+          fmtEl: $('.fmt', el),
+          shareEl: $('.share', el),
+          shareRedirect: '//play.golang.org/p/',
+        });
+
+        // Make the code textarea resize to fit content.
+        var resize = function() {
+          code.height(0);
+          var h = code[0].scrollHeight;
+          code.height(h + 20); // minimize bouncing.
+          code.closest('.input').height(h);
+        };
+        code.on('keydown', resize);
+        code.on('keyup', resize);
+        code.keyup(); // resize now.
+      };
+
+      // If example already visible, set up playground now.
+      if ($(el).is(':visible')) {
+        setup();
+        return;
+      }
+
+      // Otherwise, set up playground when example is expanded.
+      var built = false;
+      $(el)
+        .closest('.toggle')
+        .click(function() {
+          // Only set up once.
+          if (!built) {
+            setup();
+            built = true;
+          }
+        });
+    });
+  }
+
+  // fixFocus tries to put focus to #page so that keyboard navigation works.
+  function fixFocus() {
+    var page = $('#page');
+    var topbar = $('div#topbar');
+    page.css('outline', 0); // disable outline when focused
+    page.attr('tabindex', -1); // and set tabindex so that it is focusable
+    $(window)
+      .resize(function(evt) {
+        // only focus page when the topbar is at fixed position (that is, it's in
+        // front of page, and keyboard event will go to the former by default.)
+        // by focusing page, keyboard event will go to page so that up/down arrow,
+        // space, etc. will work as expected.
+        if (topbar.css('position') == 'fixed') page.focus();
+      })
+      .resize();
+  }
+
+  function toggleHash() {
+    var id = window.location.hash.substring(1);
+    // Open all of the toggles for a particular hash.
+    var els = $(
+      document.getElementById(id),
+      $('a[name]').filter(function() {
+        return $(this).attr('name') == id;
+      })
+    );
+
+    while (els.length) {
+      for (var i = 0; i < els.length; i++) {
+        var el = $(els[i]);
+        if (el.is('.toggle')) {
+          el.find('.toggleButton')
+            .first()
+            .click();
+        }
+      }
+      els = el.parent();
+    }
+  }
+
+  function personalizeInstallInstructions() {
+    var prefix = '?download=';
+    var s = window.location.search;
+    if (s.indexOf(prefix) != 0) {
+      // No 'download' query string; detect "test" instructions from User Agent.
+      if (navigator.platform.indexOf('Win') != -1) {
+        $('.testUnix').hide();
+        $('.testWindows').show();
+      } else {
+        $('.testUnix').show();
+        $('.testWindows').hide();
+      }
+      return;
+    }
+
+    var filename = s.substr(prefix.length);
+    var filenameRE = /^go1\.\d+(\.\d+)?([a-z0-9]+)?\.([a-z0-9]+)(-[a-z0-9]+)?(-osx10\.[68])?\.([a-z.]+)$/;
+    var m = filenameRE.exec(filename);
+    if (!m) {
+      // Can't interpret file name; bail.
+      return;
+    }
+    $('.downloadFilename').text(filename);
+    $('.hideFromDownload').hide();
+
+    var os = m[3];
+    var ext = m[6];
+    if (ext != 'tar.gz') {
+      $('#tarballInstructions').hide();
+    }
+    if (os != 'darwin' || ext != 'pkg') {
+      $('#darwinPackageInstructions').hide();
+    }
+    if (os != 'windows') {
+      $('#windowsInstructions').hide();
       $('.testUnix').show();
       $('.testWindows').hide();
+    } else {
+      if (ext != 'msi') {
+        $('#windowsInstallerInstructions').hide();
+      }
+      if (ext != 'zip') {
+        $('#windowsZipInstructions').hide();
+      }
+      $('.testUnix').hide();
+      $('.testWindows').show();
     }
-    return;
+
+    var download = 'https://dl.google.com/go/' + filename;
+
+    var message = $(
+      '<p class="downloading">' +
+        'Your download should begin shortly. ' +
+        'If it does not, click <a>this link</a>.</p>'
+    );
+    message.find('a').attr('href', download);
+    message.insertAfter('#nav');
+
+    window.location = download;
   }
 
-  var filename = s.substr(prefix.length);
-  var filenameRE = /^go1\.\d+(\.\d+)?([a-z0-9]+)?\.([a-z0-9]+)(-[a-z0-9]+)?(-osx10\.[68])?\.([a-z.]+)$/;
-  var m = filenameRE.exec(filename);
-  if (!m) {
-    // Can't interpret file name; bail.
-    return;
-  }
-  $('.downloadFilename').text(filename);
-  $('.hideFromDownload').hide();
-
-  var os = m[3];
-  var ext = m[6];
-  if (ext != 'tar.gz') {
-    $('#tarballInstructions').hide();
-  }
-  if (os != 'darwin' || ext != 'pkg') {
-    $('#darwinPackageInstructions').hide();
-  }
-  if (os != 'windows') {
-    $('#windowsInstructions').hide();
-    $('.testUnix').show();
-    $('.testWindows').hide();
-  } else {
-    if (ext != 'msi') {
-      $('#windowsInstallerInstructions').hide();
+  function updateVersionTags() {
+    var v = window.goVersion;
+    if (/^go[0-9.]+$/.test(v)) {
+      $('.versionTag')
+        .empty()
+        .text(v);
+      $('.whereTag').hide();
     }
-    if (ext != 'zip') {
-      $('#windowsZipInstructions').hide();
-    }
-    $('.testUnix').hide();
-    $('.testWindows').show();
   }
 
-  var download = "https://dl.google.com/go/" + filename;
-
-  var message = $('<p class="downloading">'+
-    'Your download should begin shortly. '+
-    'If it does not, click <a>this link</a>.</p>');
-  message.find('a').attr('href', download);
-  message.insertAfter('#nav');
-
-  window.location = download;
-}
-
-function updateVersionTags() {
-  var v = window.goVersion;
-  if (/^go[0-9.]+$/.test(v)) {
-    $(".versionTag").empty().text(v);
-    $(".whereTag").hide();
-  }
-}
-
-function addPermalinks() {
-  function addPermalink(source, parent) {
-    var id = source.attr("id");
-    if (id == "" || id.indexOf("tmp_") === 0) {
-      // Auto-generated permalink.
-      return;
+  function addPermalinks() {
+    function addPermalink(source, parent) {
+      var id = source.attr('id');
+      if (id == '' || id.indexOf('tmp_') === 0) {
+        // Auto-generated permalink.
+        return;
+      }
+      if (parent.find('> .permalink').length) {
+        // Already attached.
+        return;
+      }
+      parent
+        .append(' ')
+        .append($("<a class='permalink'>&#xb6;</a>").attr('href', '#' + id));
     }
-    if (parent.find("> .permalink").length) {
-      // Already attached.
-      return;
-    }
-    parent.append(" ").append($("<a class='permalink'>&#xb6;</a>").attr("href", "#" + id));
+
+    $('#page .container')
+      .find('h2[id], h3[id]')
+      .each(function() {
+        var el = $(this);
+        addPermalink(el, el);
+      });
+
+    $('#page .container')
+      .find('dl[id]')
+      .each(function() {
+        var el = $(this);
+        // Add the anchor to the "dt" element.
+        addPermalink(el, el.find('> dt').first());
+      });
   }
 
-  $("#page .container").find("h2[id], h3[id]").each(function() {
-    var el = $(this);
-    addPermalink(el, el);
+  $('.js-expandAll').click(function() {
+    if ($(this).hasClass('collapsed')) {
+      toggleExamples('toggle');
+      $(this).text('(Collapse All)');
+    } else {
+      toggleExamples('toggleVisible');
+      $(this).text('(Expand All)');
+    }
+    $(this).toggleClass('collapsed');
   });
 
-  $("#page .container").find("dl[id]").each(function() {
-    var el = $(this);
-    // Add the anchor to the "dt" element.
-    addPermalink(el, el.find("> dt").first());
-  });
-}
-
-$(".js-expandAll").click(function() {
-  if ($(this).hasClass("collapsed")) {
-    toggleExamples('toggle');
-    $(this).text("(Collapse All)");
-  } else {
-    toggleExamples('toggleVisible');
-    $(this).text("(Expand All)");
+  function toggleExamples(className) {
+    // We need to explicitly iterate through divs starting with "example_"
+    // to avoid toggling Overview and Index collapsibles.
+    $("[id^='example_']").each(function() {
+      // Check for state and click it only if required.
+      if ($(this).hasClass(className)) {
+        $(this)
+          .find('.toggleButton')
+          .first()
+          .click();
+      }
+    });
   }
-  $(this).toggleClass("collapsed")
-});
 
-function toggleExamples(className) {
-  // We need to explicitly iterate through divs starting with "example_"
-  // to avoid toggling Overview and Index collapsibles.
-  $("[id^='example_']").each(function() {
-    // Check for state and click it only if required.
-    if ($(this).hasClass(className)) {
-      $(this).find('.toggleButton').first().click();
-    }
+  $(document).ready(function() {
+    generateTOC();
+    addPermalinks();
+    bindToggles('.toggle');
+    bindToggles('.toggleVisible');
+    bindToggleLinks('.exampleLink', 'example_');
+    bindToggleLinks('.overviewLink', '');
+    bindToggleLinks('.examplesLink', '');
+    bindToggleLinks('.indexLink', '');
+    setupInlinePlayground();
+    fixFocus();
+    toggleHash();
+    personalizeInstallInstructions();
+    updateVersionTags();
+
+    // godoc.html defines window.initFuncs in the <head> tag, and root.html and
+    // codewalk.js push their on-page-ready functions to the list.
+    // We execute those functions here, to avoid loading jQuery until the page
+    // content is loaded.
+    for (var i = 0; i < window.initFuncs.length; i++) window.initFuncs[i]();
   });
-}
-
-$(document).ready(function() {
-  generateTOC();
-  addPermalinks();
-  bindToggles(".toggle");
-  bindToggles(".toggleVisible");
-  bindToggleLinks(".exampleLink", "example_");
-  bindToggleLinks(".overviewLink", "");
-  bindToggleLinks(".examplesLink", "");
-  bindToggleLinks(".indexLink", "");
-  setupInlinePlayground();
-  fixFocus();
-  toggleHash();
-  personalizeInstallInstructions();
-  updateVersionTags();
-
-  // godoc.html defines window.initFuncs in the <head> tag, and root.html and
-  // codewalk.js push their on-page-ready functions to the list.
-  // We execute those functions here, to avoid loading jQuery until the page
-  // content is loaded.
-  for (var i = 0; i < window.initFuncs.length; i++) window.initFuncs[i]();
-});
-
 })();
diff --git a/content/static/play.js b/content/static/play.js
index 6adbd6c..0a10165 100644
--- a/content/static/play.js
+++ b/content/static/play.js
@@ -3,112 +3,112 @@
 // license that can be found in the LICENSE file.
 
 function initPlayground(transport) {
-	'use strict';
+  'use strict';
 
-	function text(node) {
-		var s = '';
-		for (var i = 0; i < node.childNodes.length; i++) {
-			var n = node.childNodes[i];
-			if (n.nodeType === 1) {
-				if (n.tagName === 'BUTTON') continue
-				if (n.tagName === 'SPAN' && n.className === 'number') continue;
-				if (n.tagName === 'DIV' || n.tagName == 'BR') {
-					s += "\n";
-				}
-				s += text(n);
-				continue;
-			}
-			if (n.nodeType === 3) {
-				s += n.nodeValue;
-			}
-		}
-		return s.replace('\xA0', ' '); // replace non-breaking spaces
-	}
+  function text(node) {
+    var s = '';
+    for (var i = 0; i < node.childNodes.length; i++) {
+      var n = node.childNodes[i];
+      if (n.nodeType === 1) {
+        if (n.tagName === 'BUTTON') continue;
+        if (n.tagName === 'SPAN' && n.className === 'number') continue;
+        if (n.tagName === 'DIV' || n.tagName == 'BR') {
+          s += '\n';
+        }
+        s += text(n);
+        continue;
+      }
+      if (n.nodeType === 3) {
+        s += n.nodeValue;
+      }
+    }
+    return s.replace('\xA0', ' '); // replace non-breaking spaces
+  }
 
-	// When presenter notes are enabled, the index passed
-	// here will identify the playground to be synced
-	function init(code, index) {
-		var output = document.createElement('div');
-		var outpre = document.createElement('pre');
-		var running;
+  // When presenter notes are enabled, the index passed
+  // here will identify the playground to be synced
+  function init(code, index) {
+    var output = document.createElement('div');
+    var outpre = document.createElement('pre');
+    var running;
 
-		if ($ && $(output).resizable) {
-			$(output).resizable({
-				handles: 	'n,w,nw',
-				minHeight:	27,
-				minWidth:	135,
-				maxHeight:	608,
-				maxWidth:	990
-			});
-		}
+    if ($ && $(output).resizable) {
+      $(output).resizable({
+        handles: 'n,w,nw',
+        minHeight: 27,
+        minWidth: 135,
+        maxHeight: 608,
+        maxWidth: 990,
+      });
+    }
 
-		function onKill() {
-			if (running) running.Kill();
-			if (window.notesEnabled) updatePlayStorage('onKill', index);
-		}
+    function onKill() {
+      if (running) running.Kill();
+      if (window.notesEnabled) updatePlayStorage('onKill', index);
+    }
 
-		function onRun(e) {
-			var sk = e.shiftKey || localStorage.getItem('play-shiftKey') === 'true';
-			if (running) running.Kill();
-			output.style.display = 'block';
-			outpre.innerHTML = '';
-			run1.style.display = 'none';
-			var options = {Race: sk};
-			running = transport.Run(text(code), PlaygroundOutput(outpre), options);
-			if (window.notesEnabled) updatePlayStorage('onRun', index, e);
-		}
+    function onRun(e) {
+      var sk = e.shiftKey || localStorage.getItem('play-shiftKey') === 'true';
+      if (running) running.Kill();
+      output.style.display = 'block';
+      outpre.innerHTML = '';
+      run1.style.display = 'none';
+      var options = { Race: sk };
+      running = transport.Run(text(code), PlaygroundOutput(outpre), options);
+      if (window.notesEnabled) updatePlayStorage('onRun', index, e);
+    }
 
-		function onClose() {
-			if (running) running.Kill();
-			output.style.display = 'none';
-			run1.style.display = 'inline-block';
-			if (window.notesEnabled) updatePlayStorage('onClose', index);
-		}
+    function onClose() {
+      if (running) running.Kill();
+      output.style.display = 'none';
+      run1.style.display = 'inline-block';
+      if (window.notesEnabled) updatePlayStorage('onClose', index);
+    }
 
-		if (window.notesEnabled) {
-			playgroundHandlers.onRun.push(onRun);
-			playgroundHandlers.onClose.push(onClose);
-			playgroundHandlers.onKill.push(onKill);
-		}
+    if (window.notesEnabled) {
+      playgroundHandlers.onRun.push(onRun);
+      playgroundHandlers.onClose.push(onClose);
+      playgroundHandlers.onKill.push(onKill);
+    }
 
-		var run1 = document.createElement('button');
-		run1.innerHTML = 'Run';
-		run1.className = 'run';
-		run1.addEventListener("click", onRun, false);
-		var run2 = document.createElement('button');
-		run2.className = 'run';
-		run2.innerHTML = 'Run';
-		run2.addEventListener("click", onRun, false);
-		var kill = document.createElement('button');
-		kill.className = 'kill';
-		kill.innerHTML = 'Kill';
-		kill.addEventListener("click", onKill, false);
-		var close = document.createElement('button');
-		close.className = 'close';
-		close.innerHTML = 'Close';
-		close.addEventListener("click", onClose, false);
+    var run1 = document.createElement('button');
+    run1.innerHTML = 'Run';
+    run1.className = 'run';
+    run1.addEventListener('click', onRun, false);
+    var run2 = document.createElement('button');
+    run2.className = 'run';
+    run2.innerHTML = 'Run';
+    run2.addEventListener('click', onRun, false);
+    var kill = document.createElement('button');
+    kill.className = 'kill';
+    kill.innerHTML = 'Kill';
+    kill.addEventListener('click', onKill, false);
+    var close = document.createElement('button');
+    close.className = 'close';
+    close.innerHTML = 'Close';
+    close.addEventListener('click', onClose, false);
 
-		var button = document.createElement('div');
-		button.classList.add('buttons');
-		button.appendChild(run1);
-		// Hack to simulate insertAfter
-		code.parentNode.insertBefore(button, code.nextSibling);
+    var button = document.createElement('div');
+    button.classList.add('buttons');
+    button.appendChild(run1);
+    // Hack to simulate insertAfter
+    code.parentNode.insertBefore(button, code.nextSibling);
 
-		var buttons = document.createElement('div');
-		buttons.classList.add('buttons');
-		buttons.appendChild(run2);
-		buttons.appendChild(kill);
-		buttons.appendChild(close);
+    var buttons = document.createElement('div');
+    buttons.classList.add('buttons');
+    buttons.appendChild(run2);
+    buttons.appendChild(kill);
+    buttons.appendChild(close);
 
-		output.classList.add('output');
-		output.appendChild(buttons);
-		output.appendChild(outpre);
-		output.style.display = 'none';
-		code.parentNode.insertBefore(output, button.nextSibling);
-	}
+    output.classList.add('output');
+    output.appendChild(buttons);
+    output.appendChild(outpre);
+    output.style.display = 'none';
+    code.parentNode.insertBefore(output, button.nextSibling);
+  }
 
-	var play = document.querySelectorAll('div.playground');
-	for (var i = 0; i < play.length; i++) {
-		init(play[i], i);
-	}
+  var play = document.querySelectorAll('div.playground');
+  for (var i = 0; i < play.length; i++) {
+    init(play[i], i);
+  }
 }
diff --git a/content/static/playground.js b/content/static/playground.js
index 524bc28..97391d1 100644
--- a/content/static/playground.js
+++ b/content/static/playground.js
@@ -44,230 +44,243 @@
 // enableVet enables running vet if a program was compiled and ran successfully.
 // If vet returned any errors, display them before the output of a program.
 function HTTPTransport(enableVet) {
-	'use strict';
+  'use strict';
 
-	function playback(output, data) {
-		// Backwards compatibility: default values do not affect the output.
-		var events = data.Events || [];
-		var errors = data.Errors || "";
-		var status = data.Status || 0;
-		var isTest = data.IsTest || false;
-		var testsFailed = data.TestsFailed || 0;
+  function playback(output, data) {
+    // Backwards compatibility: default values do not affect the output.
+    var events = data.Events || [];
+    var errors = data.Errors || '';
+    var status = data.Status || 0;
+    var isTest = data.IsTest || false;
+    var testsFailed = data.TestsFailed || 0;
 
-		var timeout;
-		output({Kind: 'start'});
-		function next() {
-			if (!events || events.length === 0) {
-				if (isTest) {
-					if (testsFailed > 0) {
-						output({Kind: 'system', Body: '\n'+testsFailed+' test'+(testsFailed>1?'s':'')+' failed.'});
-					} else {
-						output({Kind: 'system', Body: '\nAll tests passed.'});
-					}
-				} else {
-					if (status > 0) {
-						output({Kind: 'end', Body: 'status ' + status + '.'});
-					} else {
-						if (errors !== "") {
-							// errors are displayed only in the case of timeout.
-							output({Kind: 'end', Body: errors + '.'});
-						} else {
-							output({Kind: 'end'});
-						}
-					}
-				}
-				return;
-			}
-			var e = events.shift();
-			if (e.Delay === 0) {
-				output({Kind: e.Kind, Body: e.Message});
-				next();
-				return;
-			}
-			timeout = setTimeout(function() {
-				output({Kind: e.Kind, Body: e.Message});
-				next();
-			}, e.Delay / 1000000);
-		}
-		next();
-		return {
-			Stop: function() {
-				clearTimeout(timeout);
-			}
-		};
-	}
+    var timeout;
+    output({ Kind: 'start' });
+    function next() {
+      if (!events || events.length === 0) {
+        if (isTest) {
+          if (testsFailed > 0) {
+            output({
+              Kind: 'system',
+              Body:
+                '\n' +
+                testsFailed +
+                ' test' +
+                (testsFailed > 1 ? 's' : '') +
+                ' failed.',
+            });
+          } else {
+            output({ Kind: 'system', Body: '\nAll tests passed.' });
+          }
+        } else {
+          if (status > 0) {
+            output({ Kind: 'end', Body: 'status ' + status + '.' });
+          } else {
+            if (errors !== '') {
+              // errors are displayed only in the case of timeout.
+              output({ Kind: 'end', Body: errors + '.' });
+            } else {
+              output({ Kind: 'end' });
+            }
+          }
+        }
+        return;
+      }
+      var e = events.shift();
+      if (e.Delay === 0) {
+        output({ Kind: e.Kind, Body: e.Message });
+        next();
+        return;
+      }
+      timeout = setTimeout(function() {
+        output({ Kind: e.Kind, Body: e.Message });
+        next();
+      }, e.Delay / 1000000);
+    }
+    next();
+    return {
+      Stop: function() {
+        clearTimeout(timeout);
+      },
+    };
+  }
 
-	function error(output, msg) {
-		output({Kind: 'start'});
-		output({Kind: 'stderr', Body: msg});
-		output({Kind: 'end'});
-	}
+  function error(output, msg) {
+    output({ Kind: 'start' });
+    output({ Kind: 'stderr', Body: msg });
+    output({ Kind: 'end' });
+  }
 
-	function buildFailed(output, msg) {
-		output({Kind: 'start'});
-		output({Kind: 'stderr', Body: msg});
-		output({Kind: 'system', Body: '\nGo build failed.'});
-	}
+  function buildFailed(output, msg) {
+    output({ Kind: 'start' });
+    output({ Kind: 'stderr', Body: msg });
+    output({ Kind: 'system', Body: '\nGo build failed.' });
+  }
 
-	var seq = 0;
-	return {
-		Run: function(body, output, options) {
-			seq++;
-			var cur = seq;
-			var playing;
-			$.ajax('/compile', {
-				type: 'POST',
-				data: {'version': 2, 'body': body},
-				dataType: 'json',
-				success: function(data) {
-					if (seq != cur) return;
-					if (!data) return;
-					if (playing != null) playing.Stop();
-					if (data.Errors) {
-						if (data.Errors === 'process took too long') {
-							// Playback the output that was captured before the timeout.
-							playing = playback(output, data);
-						} else {
-							buildFailed(output, data.Errors);
-						}
-						return;
-					}
+  var seq = 0;
+  return {
+    Run: function(body, output, options) {
+      seq++;
+      var cur = seq;
+      var playing;
+      $.ajax('/compile', {
+        type: 'POST',
+        data: { version: 2, body: body },
+        dataType: 'json',
+        success: function(data) {
+          if (seq != cur) return;
+          if (!data) return;
+          if (playing != null) playing.Stop();
+          if (data.Errors) {
+            if (data.Errors === 'process took too long') {
+              // Playback the output that was captured before the timeout.
+              playing = playback(output, data);
+            } else {
+              buildFailed(output, data.Errors);
+            }
+            return;
+          }
 
-					if (!enableVet) {
-						playing = playback(output, data);
-						return;
-					}
+          if (!enableVet) {
+            playing = playback(output, data);
+            return;
+          }
 
-					$.ajax("/vet", {
-						data: {"body": body},
-						type: "POST",
-						dataType: "json",
-						success: function(dataVet) {
-							if (dataVet.Errors) {
-								if (!data.Events) {
-									data.Events = [];
-								}
-								// inject errors from the vet as the first events in the output
-								data.Events.unshift({Message: 'Go vet exited.\n\n', Kind: 'system', Delay: 0});
-								data.Events.unshift({Message: dataVet.Errors, Kind: 'stderr', Delay: 0});
-							}
-							playing = playback(output, data);
-						},
-						error: function() {
-							playing = playback(output, data);
-						}
-					});
-				},
-				error: function() {
-					error(output, 'Error communicating with remote server.');
-				}
-			});
-			return {
-				Kill: function() {
-					if (playing != null) playing.Stop();
-					output({Kind: 'end', Body: 'killed'});
-				}
-			};
-		}
-	};
+          $.ajax('/vet', {
+            data: { body: body },
+            type: 'POST',
+            dataType: 'json',
+            success: function(dataVet) {
+              if (dataVet.Errors) {
+                if (!data.Events) {
+                  data.Events = [];
+                }
+                // inject errors from the vet as the first events in the output
+                data.Events.unshift({
+                  Message: 'Go vet exited.\n\n',
+                  Kind: 'system',
+                  Delay: 0,
+                });
+                data.Events.unshift({
+                  Message: dataVet.Errors,
+                  Kind: 'stderr',
+                  Delay: 0,
+                });
+              }
+              playing = playback(output, data);
+            },
+            error: function() {
+              playing = playback(output, data);
+            },
+          });
+        },
+        error: function() {
+          error(output, 'Error communicating with remote server.');
+        },
+      });
+      return {
+        Kill: function() {
+          if (playing != null) playing.Stop();
+          output({ Kind: 'end', Body: 'killed' });
+        },
+      };
+    },
+  };
 }
 
 function SocketTransport() {
-	'use strict';
+  'use strict';
 
-	var id = 0;
-	var outputs = {};
-	var started = {};
-	var websocket;
-	if (window.location.protocol == "http:") {
-		websocket = new WebSocket('ws://' + window.location.host + '/socket');
-	} else if (window.location.protocol == "https:") {
-		websocket = new WebSocket('wss://' + window.location.host + '/socket');
-	}
+  var id = 0;
+  var outputs = {};
+  var started = {};
+  var websocket;
+  if (window.location.protocol == 'http:') {
+    websocket = new WebSocket('ws://' + window.location.host + '/socket');
+  } else if (window.location.protocol == 'https:') {
+    websocket = new WebSocket('wss://' + window.location.host + '/socket');
+  }
 
-	websocket.onclose = function() {
-		console.log('websocket connection closed');
-	};
+  websocket.onclose = function() {
+    console.log('websocket connection closed');
+  };
 
-	websocket.onmessage = function(e) {
-		var m = JSON.parse(e.data);
-		var output = outputs[m.Id];
-		if (output === null)
-			return;
-		if (!started[m.Id]) {
-			output({Kind: 'start'});
-			started[m.Id] = true;
-		}
-		output({Kind: m.Kind, Body: m.Body});
-	};
+  websocket.onmessage = function(e) {
+    var m = JSON.parse(e.data);
+    var output = outputs[m.Id];
+    if (output === null) return;
+    if (!started[m.Id]) {
+      output({ Kind: 'start' });
+      started[m.Id] = true;
+    }
+    output({ Kind: m.Kind, Body: m.Body });
+  };
 
-	function send(m) {
-		websocket.send(JSON.stringify(m));
-	}
+  function send(m) {
+    websocket.send(JSON.stringify(m));
+  }
 
-	return {
-		Run: function(body, output, options) {
-			var thisID = id+'';
-			id++;
-			outputs[thisID] = output;
-			send({Id: thisID, Kind: 'run', Body: body, Options: options});
-			return {
-				Kill: function() {
-					send({Id: thisID, Kind: 'kill'});
-				}
-			};
-		}
-	};
+  return {
+    Run: function(body, output, options) {
+      var thisID = id + '';
+      id++;
+      outputs[thisID] = output;
+      send({ Id: thisID, Kind: 'run', Body: body, Options: options });
+      return {
+        Kill: function() {
+          send({ Id: thisID, Kind: 'kill' });
+        },
+      };
+    },
+  };
 }
 
 function PlaygroundOutput(el) {
-	'use strict';
+  'use strict';
 
-	return function(write) {
-		if (write.Kind == 'start') {
-			el.innerHTML = '';
-			return;
-		}
+  return function(write) {
+    if (write.Kind == 'start') {
+      el.innerHTML = '';
+      return;
+    }
 
-		var cl = 'system';
-		if (write.Kind == 'stdout' || write.Kind == 'stderr')
-			cl = write.Kind;
+    var cl = 'system';
+    if (write.Kind == 'stdout' || write.Kind == 'stderr') cl = write.Kind;
 
-		var m = write.Body;
-		if (write.Kind == 'end') {
-			m = '\nProgram exited' + (m?(': '+m):'.');
-		}
+    var m = write.Body;
+    if (write.Kind == 'end') {
+      m = '\nProgram exited' + (m ? ': ' + m : '.');
+    }
 
-		if (m.indexOf('IMAGE:') === 0) {
-			// TODO(adg): buffer all writes before creating image
-			var url = 'data:image/png;base64,' + m.substr(6);
-			var img = document.createElement('img');
-			img.src = url;
-			el.appendChild(img);
-			return;
-		}
+    if (m.indexOf('IMAGE:') === 0) {
+      // TODO(adg): buffer all writes before creating image
+      var url = 'data:image/png;base64,' + m.substr(6);
+      var img = document.createElement('img');
+      img.src = url;
+      el.appendChild(img);
+      return;
+    }
 
-		// ^L clears the screen.
-		var s = m.split('\x0c');
-		if (s.length > 1) {
-			el.innerHTML = '';
-			m = s.pop();
-		}
+    // ^L clears the screen.
+    var s = m.split('\x0c');
+    if (s.length > 1) {
+      el.innerHTML = '';
+      m = s.pop();
+    }
 
-		m = m.replace(/&/g, '&amp;');
-		m = m.replace(/</g, '&lt;');
-		m = m.replace(/>/g, '&gt;');
+    m = m.replace(/&/g, '&amp;');
+    m = m.replace(/</g, '&lt;');
+    m = m.replace(/>/g, '&gt;');
 
-		var needScroll = (el.scrollTop + el.offsetHeight) == el.scrollHeight;
+    var needScroll = el.scrollTop + el.offsetHeight == el.scrollHeight;
 
-		var span = document.createElement('span');
-		span.className = cl;
-		span.innerHTML = m;
-		el.appendChild(span);
+    var span = document.createElement('span');
+    span.className = cl;
+    span.innerHTML = m;
+    el.appendChild(span);
 
-		if (needScroll)
-			el.scrollTop = el.scrollHeight - el.offsetHeight;
-	};
+    if (needScroll) el.scrollTop = el.scrollHeight - el.offsetHeight;
+  };
 }
 
 (function() {
@@ -275,7 +288,9 @@
     var regex = /prog.go:([0-9]+)/g;
     var r = regex.exec(error);
     while (r) {
-      $(".lines div").eq(r[1]-1).addClass("lineerror");
+      $('.lines div')
+        .eq(r[1] - 1)
+        .addClass('lineerror');
       r = regex.exec(error);
     }
   }
@@ -286,7 +301,7 @@
     };
   }
   function lineClear() {
-    $(".lineerror").removeClass("lineerror");
+    $('.lineerror').removeClass('lineerror');
   }
 
   // opts is an object with these keys
@@ -312,28 +327,28 @@
     function insertTabs(n) {
       // find the selection start and end
       var start = code[0].selectionStart;
-      var end   = code[0].selectionEnd;
+      var end = code[0].selectionEnd;
       // split the textarea content into two, and insert n tabs
       var v = code[0].value;
       var u = v.substr(0, start);
-      for (var i=0; i<n; i++) {
-        u += "\t";
+      for (var i = 0; i < n; i++) {
+        u += '\t';
       }
       u += v.substr(end);
       // set revised content
       code[0].value = u;
       // reset caret position after inserted tabs
-      code[0].selectionStart = start+n;
-      code[0].selectionEnd = start+n;
+      code[0].selectionStart = start + n;
+      code[0].selectionEnd = start + n;
     }
     function autoindent(el) {
       var curpos = el.selectionStart;
       var tabs = 0;
       while (curpos > 0) {
         curpos--;
-        if (el.value[curpos] == "\t") {
+        if (el.value[curpos] == '\t') {
           tabs++;
-        } else if (tabs > 0 || el.value[curpos] == "\n") {
+        } else if (tabs > 0 || el.value[curpos] == '\n') {
           break;
         }
       }
@@ -346,13 +361,13 @@
     function handleSaveShortcut(e) {
       if (e.isDefaultPrevented()) return false;
       if (!e.metaKey && !e.ctrlKey) return false;
-      if (e.key != "S" && e.key != "s") return false;
+      if (e.key != 'S' && e.key != 's') return false;
 
       e.preventDefault();
 
       // Share and save
       share(function(url) {
-        window.location.href = url + ".go?download=true";
+        window.location.href = url + '.go?download=true';
       });
 
       return true;
@@ -361,17 +376,22 @@
     function keyHandler(e) {
       if (opts.enableShortcuts && handleSaveShortcut(e)) return;
 
-      if (e.keyCode == 9 && !e.ctrlKey) { // tab (but not ctrl-tab)
+      if (e.keyCode == 9 && !e.ctrlKey) {
+        // tab (but not ctrl-tab)
         insertTabs(1);
         e.preventDefault();
         return false;
       }
-      if (e.keyCode == 13) { // enter
-        if (e.shiftKey) { // +shift
+      if (e.keyCode == 13) {
+        // enter
+        if (e.shiftKey) {
+          // +shift
           run();
           e.preventDefault();
           return false;
-        } if (e.ctrlKey) { // +control
+        }
+        if (e.ctrlKey) {
+          // +control
           fmt();
           e.preventDefault();
         } else {
@@ -391,17 +411,20 @@
       $(opts.codeEl).val(text);
     }
     function origin(href) {
-      return (""+href).split("/").slice(0, 3).join("/");
+      return ('' + href)
+        .split('/')
+        .slice(0, 3)
+        .join('/');
     }
 
-    var pushedEmpty = (window.location.pathname == "/");
+    var pushedEmpty = window.location.pathname == '/';
     function inputChanged() {
       if (pushedEmpty) {
         return;
       }
       pushedEmpty = true;
       $(opts.shareURLEl).hide();
-      window.history.pushState(null, "", "/");
+      window.history.pushState(null, '', '/');
     }
     function popState(e) {
       if (e === null) {
@@ -412,7 +435,12 @@
       }
     }
     var rewriteHistory = false;
-    if (window.history && window.history.pushState && window.addEventListener && opts.enableHistory) {
+    if (
+      window.history &&
+      window.history.pushState &&
+      window.addEventListener &&
+      opts.enableHistory
+    ) {
       rewriteHistory = true;
       code[0].addEventListener('input', inputChanged);
       window.addEventListener('popstate', popState);
@@ -422,36 +450,42 @@
       if (running) running.Kill();
       lineClear();
       lineHighlight(error);
-      output.empty().addClass("error").text(error);
+      output
+        .empty()
+        .addClass('error')
+        .text(error);
     }
     function loading() {
       lineClear();
       if (running) running.Kill();
-      output.removeClass("error").text('Waiting for remote server...');
+      output.removeClass('error').text('Waiting for remote server...');
     }
     function run() {
       loading();
-      running = transport.Run(body(), highlightOutput(PlaygroundOutput(output[0])));
+      running = transport.Run(
+        body(),
+        highlightOutput(PlaygroundOutput(output[0]))
+      );
     }
 
     function fmt() {
       loading();
-      var data = {"body": body()};
-      if ($(opts.fmtImportEl).is(":checked")) {
-        data["imports"] = "true";
+      var data = { body: body() };
+      if ($(opts.fmtImportEl).is(':checked')) {
+        data['imports'] = 'true';
       }
-      $.ajax("/fmt", {
+      $.ajax('/fmt', {
         data: data,
-        type: "POST",
-        dataType: "json",
+        type: 'POST',
+        dataType: 'json',
         success: function(data) {
           if (data.Error) {
             setError(data.Error);
           } else {
             setBody(data.Body);
-            setError("");
+            setError('');
           }
-        }
+        },
       });
     }
 
@@ -465,21 +499,21 @@
       sharing = true;
 
       var sharingData = body();
-      $.ajax("/share", {
+      $.ajax('/share', {
         processData: false,
         data: sharingData,
-        type: "POST",
-        contentType: "text/plain; charset=utf-8",
+        type: 'POST',
+        contentType: 'text/plain; charset=utf-8',
         complete: function(xhr) {
           sharing = false;
           if (xhr.status != 200) {
-            alert("Server error; try again.");
+            alert('Server error; try again.');
             return;
           }
           if (opts.shareRedirect) {
             window.location = opts.shareRedirect + xhr.responseText;
           }
-          var path = "/p/" + xhr.responseText;
+          var path = '/p/' + xhr.responseText;
           var url = origin(window.location) + path;
 
           for (var i = 0; i < shareCallbacks.length; i++) {
@@ -488,22 +522,29 @@
           shareCallbacks = [];
 
           if (shareURL) {
-            shareURL.show().val(url).focus().select();
+            shareURL
+              .show()
+              .val(url)
+              .focus()
+              .select();
 
             if (rewriteHistory) {
-              var historyData = {"code": sharingData};
-              window.history.pushState(historyData, "", path);
+              var historyData = { code: sharingData };
+              window.history.pushState(historyData, '', path);
               pushedEmpty = false;
             }
           }
-        }
+        },
       });
     }
 
     $(opts.runEl).click(run);
     $(opts.fmtEl).click(fmt);
 
-    if (opts.shareEl !== null && (opts.shareURLEl !== null || opts.shareRedirect !== null)) {
+    if (
+      opts.shareEl !== null &&
+      (opts.shareURLEl !== null || opts.shareRedirect !== null)
+    ) {
       if (opts.shareURLEl) {
         shareURL = $(opts.shareURLEl).hide();
       }
@@ -515,16 +556,16 @@
     if (opts.toysEl !== null) {
       $(opts.toysEl).bind('change', function() {
         var toy = $(this).val();
-        $.ajax("/doc/play/"+toy, {
+        $.ajax('/doc/play/' + toy, {
           processData: false,
-          type: "GET",
+          type: 'GET',
           complete: function(xhr) {
             if (xhr.status != 200) {
-              alert("Server error; try again.");
+              alert('Server error; try again.');
               return;
             }
             setBody(xhr.responseText);
-          }
+          },
         });
       });
     }
diff --git a/content/static/static.go b/content/static/static.go
index 235525f..d3bb43f 100644
--- a/content/static/static.go
+++ b/content/static/static.go
@@ -73,7 +73,7 @@
 
 	"godoc.html": "<!DOCTYPE\x20html>\x0a<html\x20lang=\"en\">\x0a<meta\x20charset=\"utf-8\">\x0a<meta\x20name=\"description\"\x20content=\"Go\x20is\x20an\x20open\x20source\x20programming\x20language\x20that\x20makes\x20it\x20easy\x20to\x20build\x20simple,\x20reliable,\x20and\x20efficient\x20software.\">\x0a<meta\x20name=\"viewport\"\x20content=\"width=device-width,\x20initial-scale=1\">\x0a<meta\x20name=\"theme-color\"\x20content=\"#00ADD8\">\x0a{{with\x20.Tabtitle}}\x0a\x20\x20<title>{{html\x20.}}\x20-\x20The\x20Go\x20Programming\x20Language</title>\x0a{{else}}\x0a\x20\x20<title>The\x20Go\x20Programming\x20Language</title>\x0a{{end}}\x0a<link\x20href=\"https://fonts.googleapis.com/css?family=Work+Sans:600|Roboto:400,700\"\x20rel=\"stylesheet\">\x0a<link\x20href=\"https://fonts.googleapis.com/css?family=Product+Sans&text=Supported%20by%20Google&display=swap\"\x20rel=\"stylesheet\">\x0a<link\x20type=\"text/css\"\x20rel=\"stylesheet\"\x20href=\"/lib/godoc/style.css\">\x0a{{if\x20.SearchBox}}\x0a<link\x20rel=\"search\"\x20type=\"application/opensearchdescription+xml\"\x20title=\"godoc\"\x20href=\"/opensearch.xml\"\x20/>\x0a{{end}}\x0a<script>window.initFuncs\x20=\x20[];</script>\x0a{{with\x20.GoogleAnalytics}}\x0a<script>\x0avar\x20_gaq\x20=\x20_gaq\x20||\x20[];\x0a_gaq.push([\"_setAccount\",\x20\"{{.}}\"]);\x0awindow.trackPageview\x20=\x20function()\x20{\x0a\x20\x20_gaq.push([\"_trackPageview\",\x20location.pathname+location.hash]);\x0a};\x0awindow.trackPageview();\x0awindow.trackEvent\x20=\x20function(category,\x20action,\x20opt_label,\x20opt_value,\x20opt_noninteraction)\x20{\x0a\x20\x20_gaq.push([\"_trackEvent\",\x20category,\x20action,\x20opt_label,\x20opt_value,\x20opt_noninteraction]);\x0a};\x0a</script>\x0a{{end}}\x0a<script\x20src=\"/lib/godoc/jquery.js\"\x20defer></script>\x0a\x0a{{if\x20.Playground}}\x0a<script\x20src=\"/lib/godoc/playground.js\"\x20defer></script>\x0a{{end}}\x0a{{with\x20.Version}}<script>var\x20goVersion\x20=\x20{{printf\x20\"%q\"\x20.}};</script>{{end}}\x0a<script\x20src=\"/lib/godoc/godocs.js\"\x20defer></script>\x0a\x0a<body\x20class=\"Site\">\x0a<header\x20class=\"Header\x20js-header\">\x0a\x20\x20<nav\x20class=\"Header-nav\x20{{if\x20.Title}}Header-nav--wide{{end}}\">\x0a\x20\x20\x20\x20<a\x20href=\"/\"><img\x20class=\"Header-logo\"\x20src=\"/lib/godoc/images/go-logo-blue.svg\"\x20alt=\"Go\"></a>\x0a\x20\x20\x20\x20<button\x20class=\"Header-menuButton\x20js-headerMenuButton\"\x20aria-label=\"Main\x20menu\"\x20aria-expanded=\"false\">\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\"Header-menuButtonInner\"></div>\x0a\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20<ul\x20class=\"Header-menu\">\x0a\x20\x20\x20\x20\x20\x20<li\x20class=\"Header-menuItem\"><a\x20href=\"/doc/\">Documents</a></li>\x0a\x20\x20\x20\x20\x20\x20<li\x20class=\"Header-menuItem\"><a\x20href=\"/pkg/\">Packages</a></li>\x0a\x20\x20\x20\x20\x20\x20<li\x20class=\"Header-menuItem\"><a\x20href=\"/project/\">The\x20Project</a></li>\x0a\x20\x20\x20\x20\x20\x20<li\x20class=\"Header-menuItem\"><a\x20href=\"/help/\">Help</a></li>\x0a\x20\x20\x20\x20\x20\x20{{if\x20not\x20.GoogleCN}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20<li\x20class=\"Header-menuItem\"><a\x20href=\"/blog/\">Blog</a></li>\x0a\x20\x20\x20\x20\x20\x20\x20\x20{{if\x20.Playground}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<li\x20class=\"Header-menuItem\"><a\x20href=\"https://play.golang.org/\">Play</a></li>\x0a\x20\x20\x20\x20\x20\x20\x20\x20{{end}}\x0a\x20\x20\x20\x20\x20\x20{{end}}\x0a\x20\x20\x20\x20\x20\x20<li\x20class=\"Header-menuItem\x20Header-menuItem--search\">\x0a\x20\x20\x20\x20\x20\x20\x20\x20<form\x20class=\"HeaderSearch\"\x20role=\"search\"\x20action=\"/search\">\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20class=\"HeaderSearch-input\"\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type=\"search\"\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20name=\"q\"\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20placeholder=\"Search\"\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20aria-label=\"Search\"\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20autocapitalize=\"off\"\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20autocomplete=\"off\"\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20autocorrect=\"off\"\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20spellcheck=\"false\"\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20required>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\"HeaderSearch-submit\">\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<!--\x20magnifying\x20glass:\x20--><svg\x20class=\"HeaderSearch-icon\"\x20width=\"24\"\x20height=\"24\"\x20viewBox=\"0\x200\x2024\x2024\"><title>Search</title><path\x20d=\"M15.5\x2014h-.79l-.28-.27C15.41\x2012.59\x2016\x2011.11\x2016\x209.5\x2016\x205.91\x2013.09\x203\x209.5\x203S3\x205.91\x203\x209.5\x205.91\x2016\x209.5\x2016c1.61\x200\x203.09-.59\x204.23-1.57l.27.28v.79l5\x204.99L20.49\x2019l-4.99-5zm-6\x200C7.01\x2014\x205\x2011.99\x205\x209.5S7.01\x205\x209.5\x205\x2014\x207.01\x2014\x209.5\x2011.99\x2014\x209.5\x2014z\"/><path\x20d=\"M0\x200h24v24H0z\"\x20fill=\"none\"/></svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</form>\x0a\x20\x20\x20\x20\x20\x20</li>\x0a\x20\x20\x20\x20</ul>\x0a\x20\x20</nav>\x0a</header>\x0a\x0a<main\x20id=\"page\"\x20class=\"Site-content{{if\x20.Title}}\x20wide{{end}}\">\x0a<div\x20class=\"container\">\x0a\x0a{{if\x20or\x20.Title\x20.SrcPath}}\x0a\x20\x20<h1>\x0a\x20\x20\x20\x20{{html\x20.Title}}\x0a\x20\x20\x20\x20{{html\x20.SrcPath\x20|\x20srcBreadcrumb}}\x0a\x20\x20</h1>\x0a{{end}}\x0a\x0a{{with\x20.Subtitle}}\x0a\x20\x20<h2>{{html\x20.}}</h2>\x0a{{end}}\x0a\x0a{{with\x20.SrcPath}}\x0a\x20\x20<h2>\x0a\x20\x20\x20\x20Documentation:\x20{{html\x20.\x20|\x20srcToPkgLink}}\x0a\x20\x20</h2>\x0a{{end}}\x0a\x0a{{/*\x20The\x20Table\x20of\x20Contents\x20is\x20automatically\x20inserted\x20in\x20this\x20<div>.\x0a\x20\x20\x20\x20\x20Do\x20not\x20delete\x20this\x20<div>.\x20*/}}\x0a<div\x20id=\"nav\"></div>\x0a\x0a{{/*\x20Body\x20is\x20HTML-escaped\x20elsewhere\x20*/}}\x0a{{printf\x20\"%s\"\x20.Body}}\x0a\x0a</div><!--\x20.container\x20-->\x0a</main><!--\x20#page\x20-->\x0a<footer>\x0a\x20\x20<div\x20class=\"Footer\x20{{if\x20.Title}}Footer--wide{{end}}\">\x0a\x20\x20\x20\x20<img\x20class=\"Footer-gopher\"\x20src=\"/lib/godoc/images/footer-gopher.jpg\"\x20alt=\"The\x20Go\x20Gopher\">\x0a\x20\x20\x20\x20<ul\x20class=\"Footer-links\">\x0a\x20\x20\x20\x20\x20\x20<li\x20class=\"Footer-link\"><a\x20href=\"/doc/copyright.html\">Copyright</a></li>\x0a\x20\x20\x20\x20\x20\x20<li\x20class=\"Footer-link\"><a\x20href=\"/doc/tos.html\">Terms\x20of\x20Service</a></li>\x0a\x20\x20\x20\x20\x20\x20<li\x20class=\"Footer-link\"><a\x20href=\"http://www.google.com/intl/en/policies/privacy/\">Privacy\x20Policy</a></li>\x0a\x20\x20\x20\x20\x20\x20<li\x20class=\"Footer-link\"><a\x20href=\"http://golang.org/issues/new?title=x/website:\"\x20target=\"_blank\"\x20rel=\"noopener\">Report\x20a\x20website\x20issue</a></li>\x0a\x20\x20\x20\x20</ul>\x0a\x20\x20\x20\x20<a\x20class=\"Footer-supportedBy\"\x20href=\"https://google.com\">Supported\x20by\x20Google</a>\x0a\x20\x20</div>\x0a</footer>\x0a{{if\x20.GoogleAnalytics}}\x0a<script>\x0a(function()\x20{\x0a\x20\x20var\x20ga\x20=\x20document.createElement(\"script\");\x20ga.type\x20=\x20\"text/javascript\";\x20ga.async\x20=\x20true;\x0a\x20\x20ga.src\x20=\x20(\"https:\"\x20==\x20document.location.protocol\x20?\x20\"https://ssl\"\x20:\x20\"http://www\")\x20+\x20\".google-analytics.com/ga.js\";\x0a\x20\x20var\x20s\x20=\x20document.getElementsByTagName(\"script\")[0];\x20s.parentNode.insertBefore(ga,\x20s);\x0a})();\x0a</script>\x0a{{end}}\x0a\x0a",
 
-	"godocs.js": "//\x20Copyright\x202012\x20The\x20Go\x20Authors.\x20All\x20rights\x20reserved.\x0a//\x20Use\x20of\x20this\x20source\x20code\x20is\x20governed\x20by\x20a\x20BSD-style\x0a//\x20license\x20that\x20can\x20be\x20found\x20in\x20the\x20LICENSE\x20file.\x0a\x0a/*\x20A\x20little\x20code\x20to\x20ease\x20navigation\x20of\x20these\x20documents.\x0a\x20*\x0a\x20*\x20On\x20window\x20load\x20we:\x0a\x20*\x20\x20+\x20Generate\x20a\x20table\x20of\x20contents\x20(generateTOC)\x0a\x20*\x20\x20+\x20Bind\x20foldable\x20sections\x20(bindToggles)\x0a\x20*\x20\x20+\x20Bind\x20links\x20to\x20foldable\x20sections\x20(bindToggleLinks)\x0a\x20*/\x0a\x0a(function()\x20{\x0a'use\x20strict';\x0a\x0avar\x20headerEl\x20=\x20document.querySelector('.js-header');\x0avar\x20menuButtonEl\x20=\x20document.querySelector('.js-headerMenuButton');\x0amenuButtonEl.addEventListener('click',\x20function(e)\x20{\x0a\x20\x20e.preventDefault();\x0a\x20\x20headerEl.classList.toggle('is-active');\x0a\x20\x20menuButtonEl.setAttribute('aria-expanded',\x20headerEl.classList.contains('is-active'));\x0a});\x0a\x0a/*\x20Generates\x20a\x20table\x20of\x20contents:\x20looks\x20for\x20h2\x20and\x20h3\x20elements\x20and\x20generates\x0a\x20*\x20links.\x20\"Decorates\"\x20the\x20element\x20with\x20id==\"nav\"\x20with\x20this\x20table\x20of\x20contents.\x0a\x20*/\x0afunction\x20generateTOC()\x20{\x0a\x20\x20if\x20($('#manual-nav').length\x20>\x200)\x20{\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20//\x20For\x20search,\x20we\x20send\x20the\x20toc\x20precomputed\x20from\x20server-side.\x0a\x20\x20//\x20TODO:\x20Ideally,\x20this\x20should\x20always\x20be\x20precomputed\x20for\x20all\x20pages,\x20but\x20then\x0a\x20\x20//\x20we\x20need\x20to\x20do\x20HTML\x20parsing\x20on\x20the\x20server-side.\x0a\x20\x20if\x20(location.pathname\x20===\x20'/search')\x20{\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20nav\x20=\x20$('#nav');\x0a\x20\x20if\x20(nav.length\x20===\x200)\x20{\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20toc_items\x20=\x20[];\x0a\x20\x20$(nav).nextAll('h2,\x20h3').each(function()\x20{\x0a\x20\x20\x20\x20var\x20node\x20=\x20this;\x0a\x20\x20\x20\x20if\x20(node.id\x20==\x20'')\x0a\x20\x20\x20\x20\x20\x20node.id\x20=\x20'tmp_'\x20+\x20toc_items.length;\x0a\x20\x20\x20\x20var\x20link\x20=\x20$('<a/>').attr('href',\x20'#'\x20+\x20node.id).text($(node).text());\x0a\x20\x20\x20\x20var\x20item;\x0a\x20\x20\x20\x20if\x20($(node).is('h2'))\x20{\x0a\x20\x20\x20\x20\x20\x20item\x20=\x20$('<dt/>');\x0a\x20\x20\x20\x20}\x20else\x20{\x20//\x20h3\x0a\x20\x20\x20\x20\x20\x20item\x20=\x20$('<dd\x20class=\"indent\"/>');\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20item.append(link);\x0a\x20\x20\x20\x20toc_items.push(item);\x0a\x20\x20});\x0a\x20\x20if\x20(toc_items.length\x20<=\x201)\x20{\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x20\x20var\x20dl1\x20=\x20$('<dl/>');\x0a\x20\x20var\x20dl2\x20=\x20$('<dl/>');\x0a\x0a\x20\x20var\x20split_index\x20=\x20(toc_items.length\x20/\x202)\x20+\x201;\x0a\x20\x20if\x20(split_index\x20<\x208)\x20{\x0a\x20\x20\x20\x20split_index\x20=\x20toc_items.length;\x0a\x20\x20}\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20split_index;\x20i++)\x20{\x0a\x20\x20\x20\x20dl1.append(toc_items[i]);\x0a\x20\x20}\x0a\x20\x20for\x20(/*\x20keep\x20using\x20i\x20*/;\x20i\x20<\x20toc_items.length;\x20i++)\x20{\x0a\x20\x20\x20\x20dl2.append(toc_items[i]);\x0a\x20\x20}\x0a\x0a\x20\x20var\x20tocTable\x20=\x20$('<table\x20class=\"unruled\"/>').appendTo(nav);\x0a\x20\x20var\x20tocBody\x20=\x20$('<tbody/>').appendTo(tocTable);\x0a\x20\x20var\x20tocRow\x20=\x20$('<tr/>').appendTo(tocBody);\x0a\x0a\x20\x20//\x201st\x20column\x0a\x20\x20$('<td\x20class=\"first\"/>').appendTo(tocRow).append(dl1);\x0a\x20\x20//\x202nd\x20column\x0a\x20\x20$('<td/>').appendTo(tocRow).append(dl2);\x0a}\x0a\x0afunction\x20bindToggle(el)\x20{\x0a\x20\x20$('.toggleButton',\x20el).click(function()\x20{\x0a\x20\x20\x20\x20if\x20($(this).closest(\".toggle,\x20.toggleVisible\")[0]\x20!=\x20el)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20Only\x20trigger\x20the\x20closest\x20toggle\x20header.\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20($(el).is('.toggle'))\x20{\x0a\x20\x20\x20\x20\x20\x20$(el).addClass('toggleVisible').removeClass('toggle');\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20$(el).addClass('toggle').removeClass('toggleVisible');\x0a\x20\x20\x20\x20}\x0a\x20\x20});\x0a}\x0a\x0afunction\x20bindToggles(selector)\x20{\x0a\x20\x20$(selector).each(function(i,\x20el)\x20{\x0a\x20\x20\x20\x20bindToggle(el);\x0a\x20\x20});\x0a}\x0a\x0afunction\x20bindToggleLink(el,\x20prefix)\x20{\x0a\x20\x20$(el).click(function()\x20{\x0a\x20\x20\x20\x20var\x20href\x20=\x20$(el).attr('href');\x0a\x20\x20\x20\x20var\x20i\x20=\x20href.indexOf('#'+prefix);\x0a\x20\x20\x20\x20if\x20(i\x20<\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20var\x20id\x20=\x20'#'\x20+\x20prefix\x20+\x20href.slice(i+1+prefix.length);\x0a\x20\x20\x20\x20if\x20($(id).is('.toggle'))\x20{\x0a\x20\x20\x20\x20\x20\x20$(id).find('.toggleButton').first().click();\x0a\x20\x20\x20\x20}\x0a\x20\x20});\x0a}\x0afunction\x20bindToggleLinks(selector,\x20prefix)\x20{\x0a\x20\x20$(selector).each(function(i,\x20el)\x20{\x0a\x20\x20\x20\x20bindToggleLink(el,\x20prefix);\x0a\x20\x20});\x0a}\x0a\x0afunction\x20setupInlinePlayground()\x20{\x0a\x09'use\x20strict';\x0a\x09//\x20Set\x20up\x20playground\x20when\x20each\x20element\x20is\x20toggled.\x0a\x09$('div.play').each(function\x20(i,\x20el)\x20{\x0a\x09\x09//\x20Set\x20up\x20playground\x20for\x20this\x20example.\x0a\x09\x09var\x20setup\x20=\x20function()\x20{\x0a\x09\x09\x09var\x20code\x20=\x20$('.code',\x20el);\x0a\x09\x09\x09playground({\x0a\x09\x09\x09\x09'codeEl':\x20\x20\x20code,\x0a\x09\x09\x09\x09'outputEl':\x20$('.output',\x20el),\x0a\x09\x09\x09\x09'runEl':\x20\x20\x20\x20$('.run',\x20el),\x0a\x09\x09\x09\x09'fmtEl':\x20\x20\x20\x20$('.fmt',\x20el),\x0a\x09\x09\x09\x09'shareEl':\x20\x20$('.share',\x20el),\x0a\x09\x09\x09\x09'shareRedirect':\x20'//play.golang.org/p/'\x0a\x09\x09\x09});\x0a\x0a\x09\x09\x09//\x20Make\x20the\x20code\x20textarea\x20resize\x20to\x20fit\x20content.\x0a\x09\x09\x09var\x20resize\x20=\x20function()\x20{\x0a\x09\x09\x09\x09code.height(0);\x0a\x09\x09\x09\x09var\x20h\x20=\x20code[0].scrollHeight;\x0a\x09\x09\x09\x09code.height(h+20);\x20//\x20minimize\x20bouncing.\x0a\x09\x09\x09\x09code.closest('.input').height(h);\x0a\x09\x09\x09};\x0a\x09\x09\x09code.on('keydown',\x20resize);\x0a\x09\x09\x09code.on('keyup',\x20resize);\x0a\x09\x09\x09code.keyup();\x20//\x20resize\x20now.\x0a\x09\x09};\x0a\x0a\x09\x09//\x20If\x20example\x20already\x20visible,\x20set\x20up\x20playground\x20now.\x0a\x09\x09if\x20($(el).is(':visible'))\x20{\x0a\x09\x09\x09setup();\x0a\x09\x09\x09return;\x0a\x09\x09}\x0a\x0a\x09\x09//\x20Otherwise,\x20set\x20up\x20playground\x20when\x20example\x20is\x20expanded.\x0a\x09\x09var\x20built\x20=\x20false;\x0a\x09\x09$(el).closest('.toggle').click(function()\x20{\x0a\x09\x09\x09//\x20Only\x20set\x20up\x20once.\x0a\x09\x09\x09if\x20(!built)\x20{\x0a\x09\x09\x09\x09setup();\x0a\x09\x09\x09\x09built\x20=\x20true;\x0a\x09\x09\x09}\x0a\x09\x09});\x0a\x09});\x0a}\x0a\x0a//\x20fixFocus\x20tries\x20to\x20put\x20focus\x20to\x20#page\x20so\x20that\x20keyboard\x20navigation\x20works.\x0afunction\x20fixFocus()\x20{\x0a\x20\x20var\x20page\x20=\x20$('#page');\x0a\x20\x20var\x20topbar\x20=\x20$('div#topbar');\x0a\x20\x20page.css('outline',\x200);\x20//\x20disable\x20outline\x20when\x20focused\x0a\x20\x20page.attr('tabindex',\x20-1);\x20//\x20and\x20set\x20tabindex\x20so\x20that\x20it\x20is\x20focusable\x0a\x20\x20$(window).resize(function\x20(evt)\x20{\x0a\x20\x20\x20\x20//\x20only\x20focus\x20page\x20when\x20the\x20topbar\x20is\x20at\x20fixed\x20position\x20(that\x20is,\x20it's\x20in\x0a\x20\x20\x20\x20//\x20front\x20of\x20page,\x20and\x20keyboard\x20event\x20will\x20go\x20to\x20the\x20former\x20by\x20default.)\x0a\x20\x20\x20\x20//\x20by\x20focusing\x20page,\x20keyboard\x20event\x20will\x20go\x20to\x20page\x20so\x20that\x20up/down\x20arrow,\x0a\x20\x20\x20\x20//\x20space,\x20etc.\x20will\x20work\x20as\x20expected.\x0a\x20\x20\x20\x20if\x20(topbar.css('position')\x20==\x20\"fixed\")\x0a\x20\x20\x20\x20\x20\x20page.focus();\x0a\x20\x20}).resize();\x0a}\x0a\x0afunction\x20toggleHash()\x20{\x0a\x20\x20var\x20id\x20=\x20window.location.hash.substring(1);\x0a\x20\x20//\x20Open\x20all\x20of\x20the\x20toggles\x20for\x20a\x20particular\x20hash.\x0a\x20\x20var\x20els\x20=\x20$(\x0a\x20\x20\x20\x20document.getElementById(id),\x0a\x20\x20\x20\x20$('a[name]').filter(function()\x20{\x0a\x20\x20\x20\x20\x20\x20return\x20$(this).attr('name')\x20==\x20id;\x0a\x20\x20\x20\x20})\x0a\x20\x20);\x0a\x0a\x20\x20while\x20(els.length)\x20{\x0a\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20els.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20el\x20=\x20$(els[i]);\x0a\x20\x20\x20\x20\x20\x20if\x20(el.is('.toggle'))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.find('.toggleButton').first().click();\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20els\x20=\x20el.parent();\x0a\x20\x20}\x0a}\x0a\x0afunction\x20personalizeInstallInstructions()\x20{\x0a\x20\x20var\x20prefix\x20=\x20'?download=';\x0a\x20\x20var\x20s\x20=\x20window.location.search;\x0a\x20\x20if\x20(s.indexOf(prefix)\x20!=\x200)\x20{\x0a\x20\x20\x20\x20//\x20No\x20'download'\x20query\x20string;\x20detect\x20\"test\"\x20instructions\x20from\x20User\x20Agent.\x0a\x20\x20\x20\x20if\x20(navigator.platform.indexOf('Win')\x20!=\x20-1)\x20{\x0a\x20\x20\x20\x20\x20\x20$('.testUnix').hide();\x0a\x20\x20\x20\x20\x20\x20$('.testWindows').show();\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20$('.testUnix').show();\x0a\x20\x20\x20\x20\x20\x20$('.testWindows').hide();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20filename\x20=\x20s.substr(prefix.length);\x0a\x20\x20var\x20filenameRE\x20=\x20/^go1\\.\\d+(\\.\\d+)?([a-z0-9]+)?\\.([a-z0-9]+)(-[a-z0-9]+)?(-osx10\\.[68])?\\.([a-z.]+)$/;\x0a\x20\x20var\x20m\x20=\x20filenameRE.exec(filename);\x0a\x20\x20if\x20(!m)\x20{\x0a\x20\x20\x20\x20//\x20Can't\x20interpret\x20file\x20name;\x20bail.\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x20\x20$('.downloadFilename').text(filename);\x0a\x20\x20$('.hideFromDownload').hide();\x0a\x0a\x20\x20var\x20os\x20=\x20m[3];\x0a\x20\x20var\x20ext\x20=\x20m[6];\x0a\x20\x20if\x20(ext\x20!=\x20'tar.gz')\x20{\x0a\x20\x20\x20\x20$('#tarballInstructions').hide();\x0a\x20\x20}\x0a\x20\x20if\x20(os\x20!=\x20'darwin'\x20||\x20ext\x20!=\x20'pkg')\x20{\x0a\x20\x20\x20\x20$('#darwinPackageInstructions').hide();\x0a\x20\x20}\x0a\x20\x20if\x20(os\x20!=\x20'windows')\x20{\x0a\x20\x20\x20\x20$('#windowsInstructions').hide();\x0a\x20\x20\x20\x20$('.testUnix').show();\x0a\x20\x20\x20\x20$('.testWindows').hide();\x0a\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20if\x20(ext\x20!=\x20'msi')\x20{\x0a\x20\x20\x20\x20\x20\x20$('#windowsInstallerInstructions').hide();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(ext\x20!=\x20'zip')\x20{\x0a\x20\x20\x20\x20\x20\x20$('#windowsZipInstructions').hide();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20$('.testUnix').hide();\x0a\x20\x20\x20\x20$('.testWindows').show();\x0a\x20\x20}\x0a\x0a\x20\x20var\x20download\x20=\x20\"https://dl.google.com/go/\"\x20+\x20filename;\x0a\x0a\x20\x20var\x20message\x20=\x20$('<p\x20class=\"downloading\">'+\x0a\x20\x20\x20\x20'Your\x20download\x20should\x20begin\x20shortly.\x20'+\x0a\x20\x20\x20\x20'If\x20it\x20does\x20not,\x20click\x20<a>this\x20link</a>.</p>');\x0a\x20\x20message.find('a').attr('href',\x20download);\x0a\x20\x20message.insertAfter('#nav');\x0a\x0a\x20\x20window.location\x20=\x20download;\x0a}\x0a\x0afunction\x20updateVersionTags()\x20{\x0a\x20\x20var\x20v\x20=\x20window.goVersion;\x0a\x20\x20if\x20(/^go[0-9.]+$/.test(v))\x20{\x0a\x20\x20\x20\x20$(\".versionTag\").empty().text(v);\x0a\x20\x20\x20\x20$(\".whereTag\").hide();\x0a\x20\x20}\x0a}\x0a\x0afunction\x20addPermalinks()\x20{\x0a\x20\x20function\x20addPermalink(source,\x20parent)\x20{\x0a\x20\x20\x20\x20var\x20id\x20=\x20source.attr(\"id\");\x0a\x20\x20\x20\x20if\x20(id\x20==\x20\"\"\x20||\x20id.indexOf(\"tmp_\")\x20===\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20Auto-generated\x20permalink.\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(parent.find(\">\x20.permalink\").length)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20Already\x20attached.\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20parent.append(\"\x20\").append($(\"<a\x20class='permalink'>&#xb6;</a>\").attr(\"href\",\x20\"#\"\x20+\x20id));\x0a\x20\x20}\x0a\x0a\x20\x20$(\"#page\x20.container\").find(\"h2[id],\x20h3[id]\").each(function()\x20{\x0a\x20\x20\x20\x20var\x20el\x20=\x20$(this);\x0a\x20\x20\x20\x20addPermalink(el,\x20el);\x0a\x20\x20});\x0a\x0a\x20\x20$(\"#page\x20.container\").find(\"dl[id]\").each(function()\x20{\x0a\x20\x20\x20\x20var\x20el\x20=\x20$(this);\x0a\x20\x20\x20\x20//\x20Add\x20the\x20anchor\x20to\x20the\x20\"dt\"\x20element.\x0a\x20\x20\x20\x20addPermalink(el,\x20el.find(\">\x20dt\").first());\x0a\x20\x20});\x0a}\x0a\x0a$(\".js-expandAll\").click(function()\x20{\x0a\x20\x20if\x20($(this).hasClass(\"collapsed\"))\x20{\x0a\x20\x20\x20\x20toggleExamples('toggle');\x0a\x20\x20\x20\x20$(this).text(\"(Collapse\x20All)\");\x0a\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20toggleExamples('toggleVisible');\x0a\x20\x20\x20\x20$(this).text(\"(Expand\x20All)\");\x0a\x20\x20}\x0a\x20\x20$(this).toggleClass(\"collapsed\")\x0a});\x0a\x0afunction\x20toggleExamples(className)\x20{\x0a\x20\x20//\x20We\x20need\x20to\x20explicitly\x20iterate\x20through\x20divs\x20starting\x20with\x20\"example_\"\x0a\x20\x20//\x20to\x20avoid\x20toggling\x20Overview\x20and\x20Index\x20collapsibles.\x0a\x20\x20$(\"[id^='example_']\").each(function()\x20{\x0a\x20\x20\x20\x20//\x20Check\x20for\x20state\x20and\x20click\x20it\x20only\x20if\x20required.\x0a\x20\x20\x20\x20if\x20($(this).hasClass(className))\x20{\x0a\x20\x20\x20\x20\x20\x20$(this).find('.toggleButton').first().click();\x0a\x20\x20\x20\x20}\x0a\x20\x20});\x0a}\x0a\x0a$(document).ready(function()\x20{\x0a\x20\x20generateTOC();\x0a\x20\x20addPermalinks();\x0a\x20\x20bindToggles(\".toggle\");\x0a\x20\x20bindToggles(\".toggleVisible\");\x0a\x20\x20bindToggleLinks(\".exampleLink\",\x20\"example_\");\x0a\x20\x20bindToggleLinks(\".overviewLink\",\x20\"\");\x0a\x20\x20bindToggleLinks(\".examplesLink\",\x20\"\");\x0a\x20\x20bindToggleLinks(\".indexLink\",\x20\"\");\x0a\x20\x20setupInlinePlayground();\x0a\x20\x20fixFocus();\x0a\x20\x20toggleHash();\x0a\x20\x20personalizeInstallInstructions();\x0a\x20\x20updateVersionTags();\x0a\x0a\x20\x20//\x20godoc.html\x20defines\x20window.initFuncs\x20in\x20the\x20<head>\x20tag,\x20and\x20root.html\x20and\x0a\x20\x20//\x20codewalk.js\x20push\x20their\x20on-page-ready\x20functions\x20to\x20the\x20list.\x0a\x20\x20//\x20We\x20execute\x20those\x20functions\x20here,\x20to\x20avoid\x20loading\x20jQuery\x20until\x20the\x20page\x0a\x20\x20//\x20content\x20is\x20loaded.\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20window.initFuncs.length;\x20i++)\x20window.initFuncs[i]();\x0a});\x0a\x0a})();\x0a",
+	"godocs.js": "//\x20Copyright\x202012\x20The\x20Go\x20Authors.\x20All\x20rights\x20reserved.\x0a//\x20Use\x20of\x20this\x20source\x20code\x20is\x20governed\x20by\x20a\x20BSD-style\x0a//\x20license\x20that\x20can\x20be\x20found\x20in\x20the\x20LICENSE\x20file.\x0a\x0a/*\x20A\x20little\x20code\x20to\x20ease\x20navigation\x20of\x20these\x20documents.\x0a\x20*\x0a\x20*\x20On\x20window\x20load\x20we:\x0a\x20*\x20\x20+\x20Generate\x20a\x20table\x20of\x20contents\x20(generateTOC)\x0a\x20*\x20\x20+\x20Bind\x20foldable\x20sections\x20(bindToggles)\x0a\x20*\x20\x20+\x20Bind\x20links\x20to\x20foldable\x20sections\x20(bindToggleLinks)\x0a\x20*/\x0a\x0a(function()\x20{\x0a\x20\x20'use\x20strict';\x0a\x0a\x20\x20var\x20headerEl\x20=\x20document.querySelector('.js-header');\x0a\x20\x20var\x20menuButtonEl\x20=\x20document.querySelector('.js-headerMenuButton');\x0a\x20\x20menuButtonEl.addEventListener('click',\x20function(e)\x20{\x0a\x20\x20\x20\x20e.preventDefault();\x0a\x20\x20\x20\x20headerEl.classList.toggle('is-active');\x0a\x20\x20\x20\x20menuButtonEl.setAttribute(\x0a\x20\x20\x20\x20\x20\x20'aria-expanded',\x0a\x20\x20\x20\x20\x20\x20headerEl.classList.contains('is-active')\x0a\x20\x20\x20\x20);\x0a\x20\x20});\x0a\x0a\x20\x20/*\x20Generates\x20a\x20table\x20of\x20contents:\x20looks\x20for\x20h2\x20and\x20h3\x20elements\x20and\x20generates\x0a\x20\x20\x20*\x20links.\x20\"Decorates\"\x20the\x20element\x20with\x20id==\"nav\"\x20with\x20this\x20table\x20of\x20contents.\x0a\x20\x20\x20*/\x0a\x20\x20function\x20generateTOC()\x20{\x0a\x20\x20\x20\x20if\x20($('#manual-nav').length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20//\x20For\x20search,\x20we\x20send\x20the\x20toc\x20precomputed\x20from\x20server-side.\x0a\x20\x20\x20\x20//\x20TODO:\x20Ideally,\x20this\x20should\x20always\x20be\x20precomputed\x20for\x20all\x20pages,\x20but\x20then\x0a\x20\x20\x20\x20//\x20we\x20need\x20to\x20do\x20HTML\x20parsing\x20on\x20the\x20server-side.\x0a\x20\x20\x20\x20if\x20(location.pathname\x20===\x20'/search')\x20{\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20nav\x20=\x20$('#nav');\x0a\x20\x20\x20\x20if\x20(nav.length\x20===\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20toc_items\x20=\x20[];\x0a\x20\x20\x20\x20$(nav)\x0a\x20\x20\x20\x20\x20\x20.nextAll('h2,\x20h3')\x0a\x20\x20\x20\x20\x20\x20.each(function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20node\x20=\x20this;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(node.id\x20==\x20'')\x20node.id\x20=\x20'tmp_'\x20+\x20toc_items.length;\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20link\x20=\x20$('<a/>')\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.attr('href',\x20'#'\x20+\x20node.id)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.text($(node).text());\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20item;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20($(node).is('h2'))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20item\x20=\x20$('<dt/>');\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20h3\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20item\x20=\x20$('<dd\x20class=\"indent\"/>');\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20item.append(link);\x0a\x20\x20\x20\x20\x20\x20\x20\x20toc_items.push(item);\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20if\x20(toc_items.length\x20<=\x201)\x20{\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20var\x20dl1\x20=\x20$('<dl/>');\x0a\x20\x20\x20\x20var\x20dl2\x20=\x20$('<dl/>');\x0a\x0a\x20\x20\x20\x20var\x20split_index\x20=\x20toc_items.length\x20/\x202\x20+\x201;\x0a\x20\x20\x20\x20if\x20(split_index\x20<\x208)\x20{\x0a\x20\x20\x20\x20\x20\x20split_index\x20=\x20toc_items.length;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20split_index;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20dl1.append(toc_items[i]);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20for\x20(;\x20/*\x20keep\x20using\x20i\x20*/\x20i\x20<\x20toc_items.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20dl2.append(toc_items[i]);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20tocTable\x20=\x20$('<table\x20class=\"unruled\"/>').appendTo(nav);\x0a\x20\x20\x20\x20var\x20tocBody\x20=\x20$('<tbody/>').appendTo(tocTable);\x0a\x20\x20\x20\x20var\x20tocRow\x20=\x20$('<tr/>').appendTo(tocBody);\x0a\x0a\x20\x20\x20\x20//\x201st\x20column\x0a\x20\x20\x20\x20$('<td\x20class=\"first\"/>')\x0a\x20\x20\x20\x20\x20\x20.appendTo(tocRow)\x0a\x20\x20\x20\x20\x20\x20.append(dl1);\x0a\x20\x20\x20\x20//\x202nd\x20column\x0a\x20\x20\x20\x20$('<td/>')\x0a\x20\x20\x20\x20\x20\x20.appendTo(tocRow)\x0a\x20\x20\x20\x20\x20\x20.append(dl2);\x0a\x20\x20}\x0a\x0a\x20\x20function\x20bindToggle(el)\x20{\x0a\x20\x20\x20\x20$('.toggleButton',\x20el).click(function()\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20($(this).closest('.toggle,\x20.toggleVisible')[0]\x20!=\x20el)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Only\x20trigger\x20the\x20closest\x20toggle\x20header.\x0a\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20if\x20($(el).is('.toggle'))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20$(el)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.addClass('toggleVisible')\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.removeClass('toggle');\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20$(el)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.addClass('toggle')\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.removeClass('toggleVisible');\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20});\x0a\x20\x20}\x0a\x0a\x20\x20function\x20bindToggles(selector)\x20{\x0a\x20\x20\x20\x20$(selector).each(function(i,\x20el)\x20{\x0a\x20\x20\x20\x20\x20\x20bindToggle(el);\x0a\x20\x20\x20\x20});\x0a\x20\x20}\x0a\x0a\x20\x20function\x20bindToggleLink(el,\x20prefix)\x20{\x0a\x20\x20\x20\x20$(el).click(function()\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20href\x20=\x20$(el).attr('href');\x0a\x20\x20\x20\x20\x20\x20var\x20i\x20=\x20href.indexOf('#'\x20+\x20prefix);\x0a\x20\x20\x20\x20\x20\x20if\x20(i\x20<\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20var\x20id\x20=\x20'#'\x20+\x20prefix\x20+\x20href.slice(i\x20+\x201\x20+\x20prefix.length);\x0a\x20\x20\x20\x20\x20\x20if\x20($(id).is('.toggle'))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20$(id)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.find('.toggleButton')\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.first()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.click();\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20});\x0a\x20\x20}\x0a\x20\x20function\x20bindToggleLinks(selector,\x20prefix)\x20{\x0a\x20\x20\x20\x20$(selector).each(function(i,\x20el)\x20{\x0a\x20\x20\x20\x20\x20\x20bindToggleLink(el,\x20prefix);\x0a\x20\x20\x20\x20});\x0a\x20\x20}\x0a\x0a\x20\x20function\x20setupInlinePlayground()\x20{\x0a\x20\x20\x20\x20'use\x20strict';\x0a\x20\x20\x20\x20//\x20Set\x20up\x20playground\x20when\x20each\x20element\x20is\x20toggled.\x0a\x20\x20\x20\x20$('div.play').each(function(i,\x20el)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20Set\x20up\x20playground\x20for\x20this\x20example.\x0a\x20\x20\x20\x20\x20\x20var\x20setup\x20=\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20code\x20=\x20$('.code',\x20el);\x0a\x20\x20\x20\x20\x20\x20\x20\x20playground({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20codeEl:\x20code,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20outputEl:\x20$('.output',\x20el),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20runEl:\x20$('.run',\x20el),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fmtEl:\x20$('.fmt',\x20el),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20shareEl:\x20$('.share',\x20el),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20shareRedirect:\x20'//play.golang.org/p/',\x0a\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Make\x20the\x20code\x20textarea\x20resize\x20to\x20fit\x20content.\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20resize\x20=\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20code.height(0);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20var\x20h\x20=\x20code[0].scrollHeight;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20code.height(h\x20+\x2020);\x20//\x20minimize\x20bouncing.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20code.closest('.input').height(h);\x0a\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20code.on('keydown',\x20resize);\x0a\x20\x20\x20\x20\x20\x20\x20\x20code.on('keyup',\x20resize);\x0a\x20\x20\x20\x20\x20\x20\x20\x20code.keyup();\x20//\x20resize\x20now.\x0a\x20\x20\x20\x20\x20\x20};\x0a\x0a\x20\x20\x20\x20\x20\x20//\x20If\x20example\x20already\x20visible,\x20set\x20up\x20playground\x20now.\x0a\x20\x20\x20\x20\x20\x20if\x20($(el).is(':visible'))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20setup();\x0a\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20//\x20Otherwise,\x20set\x20up\x20playground\x20when\x20example\x20is\x20expanded.\x0a\x20\x20\x20\x20\x20\x20var\x20built\x20=\x20false;\x0a\x20\x20\x20\x20\x20\x20$(el)\x0a\x20\x20\x20\x20\x20\x20\x20\x20.closest('.toggle')\x0a\x20\x20\x20\x20\x20\x20\x20\x20.click(function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Only\x20set\x20up\x20once.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!built)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setup();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20built\x20=\x20true;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20});\x0a\x20\x20}\x0a\x0a\x20\x20//\x20fixFocus\x20tries\x20to\x20put\x20focus\x20to\x20#page\x20so\x20that\x20keyboard\x20navigation\x20works.\x0a\x20\x20function\x20fixFocus()\x20{\x0a\x20\x20\x20\x20var\x20page\x20=\x20$('#page');\x0a\x20\x20\x20\x20var\x20topbar\x20=\x20$('div#topbar');\x0a\x20\x20\x20\x20page.css('outline',\x200);\x20//\x20disable\x20outline\x20when\x20focused\x0a\x20\x20\x20\x20page.attr('tabindex',\x20-1);\x20//\x20and\x20set\x20tabindex\x20so\x20that\x20it\x20is\x20focusable\x0a\x20\x20\x20\x20$(window)\x0a\x20\x20\x20\x20\x20\x20.resize(function(evt)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20only\x20focus\x20page\x20when\x20the\x20topbar\x20is\x20at\x20fixed\x20position\x20(that\x20is,\x20it's\x20in\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20front\x20of\x20page,\x20and\x20keyboard\x20event\x20will\x20go\x20to\x20the\x20former\x20by\x20default.)\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20by\x20focusing\x20page,\x20keyboard\x20event\x20will\x20go\x20to\x20page\x20so\x20that\x20up/down\x20arrow,\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20space,\x20etc.\x20will\x20work\x20as\x20expected.\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(topbar.css('position')\x20==\x20'fixed')\x20page.focus();\x0a\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20\x20\x20.resize();\x0a\x20\x20}\x0a\x0a\x20\x20function\x20toggleHash()\x20{\x0a\x20\x20\x20\x20var\x20id\x20=\x20window.location.hash.substring(1);\x0a\x20\x20\x20\x20//\x20Open\x20all\x20of\x20the\x20toggles\x20for\x20a\x20particular\x20hash.\x0a\x20\x20\x20\x20var\x20els\x20=\x20$(\x0a\x20\x20\x20\x20\x20\x20document.getElementById(id),\x0a\x20\x20\x20\x20\x20\x20$('a[name]').filter(function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20return\x20$(this).attr('name')\x20==\x20id;\x0a\x20\x20\x20\x20\x20\x20})\x0a\x20\x20\x20\x20);\x0a\x0a\x20\x20\x20\x20while\x20(els.length)\x20{\x0a\x20\x20\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20els.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20el\x20=\x20$(els[i]);\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(el.is('.toggle'))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20el.find('.toggleButton')\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.first()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.click();\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20els\x20=\x20el.parent();\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x0a\x20\x20function\x20personalizeInstallInstructions()\x20{\x0a\x20\x20\x20\x20var\x20prefix\x20=\x20'?download=';\x0a\x20\x20\x20\x20var\x20s\x20=\x20window.location.search;\x0a\x20\x20\x20\x20if\x20(s.indexOf(prefix)\x20!=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20No\x20'download'\x20query\x20string;\x20detect\x20\"test\"\x20instructions\x20from\x20User\x20Agent.\x0a\x20\x20\x20\x20\x20\x20if\x20(navigator.platform.indexOf('Win')\x20!=\x20-1)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20$('.testUnix').hide();\x0a\x20\x20\x20\x20\x20\x20\x20\x20$('.testWindows').show();\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20$('.testUnix').show();\x0a\x20\x20\x20\x20\x20\x20\x20\x20$('.testWindows').hide();\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20filename\x20=\x20s.substr(prefix.length);\x0a\x20\x20\x20\x20var\x20filenameRE\x20=\x20/^go1\\.\\d+(\\.\\d+)?([a-z0-9]+)?\\.([a-z0-9]+)(-[a-z0-9]+)?(-osx10\\.[68])?\\.([a-z.]+)$/;\x0a\x20\x20\x20\x20var\x20m\x20=\x20filenameRE.exec(filename);\x0a\x20\x20\x20\x20if\x20(!m)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20Can't\x20interpret\x20file\x20name;\x20bail.\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20$('.downloadFilename').text(filename);\x0a\x20\x20\x20\x20$('.hideFromDownload').hide();\x0a\x0a\x20\x20\x20\x20var\x20os\x20=\x20m[3];\x0a\x20\x20\x20\x20var\x20ext\x20=\x20m[6];\x0a\x20\x20\x20\x20if\x20(ext\x20!=\x20'tar.gz')\x20{\x0a\x20\x20\x20\x20\x20\x20$('#tarballInstructions').hide();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(os\x20!=\x20'darwin'\x20||\x20ext\x20!=\x20'pkg')\x20{\x0a\x20\x20\x20\x20\x20\x20$('#darwinPackageInstructions').hide();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(os\x20!=\x20'windows')\x20{\x0a\x20\x20\x20\x20\x20\x20$('#windowsInstructions').hide();\x0a\x20\x20\x20\x20\x20\x20$('.testUnix').show();\x0a\x20\x20\x20\x20\x20\x20$('.testWindows').hide();\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(ext\x20!=\x20'msi')\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20$('#windowsInstallerInstructions').hide();\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20if\x20(ext\x20!=\x20'zip')\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20$('#windowsZipInstructions').hide();\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20$('.testUnix').hide();\x0a\x20\x20\x20\x20\x20\x20$('.testWindows').show();\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20download\x20=\x20'https://dl.google.com/go/'\x20+\x20filename;\x0a\x0a\x20\x20\x20\x20var\x20message\x20=\x20$(\x0a\x20\x20\x20\x20\x20\x20'<p\x20class=\"downloading\">'\x20+\x0a\x20\x20\x20\x20\x20\x20\x20\x20'Your\x20download\x20should\x20begin\x20shortly.\x20'\x20+\x0a\x20\x20\x20\x20\x20\x20\x20\x20'If\x20it\x20does\x20not,\x20click\x20<a>this\x20link</a>.</p>'\x0a\x20\x20\x20\x20);\x0a\x20\x20\x20\x20message.find('a').attr('href',\x20download);\x0a\x20\x20\x20\x20message.insertAfter('#nav');\x0a\x0a\x20\x20\x20\x20window.location\x20=\x20download;\x0a\x20\x20}\x0a\x0a\x20\x20function\x20updateVersionTags()\x20{\x0a\x20\x20\x20\x20var\x20v\x20=\x20window.goVersion;\x0a\x20\x20\x20\x20if\x20(/^go[0-9.]+$/.test(v))\x20{\x0a\x20\x20\x20\x20\x20\x20$('.versionTag')\x0a\x20\x20\x20\x20\x20\x20\x20\x20.empty()\x0a\x20\x20\x20\x20\x20\x20\x20\x20.text(v);\x0a\x20\x20\x20\x20\x20\x20$('.whereTag').hide();\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x0a\x20\x20function\x20addPermalinks()\x20{\x0a\x20\x20\x20\x20function\x20addPermalink(source,\x20parent)\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20id\x20=\x20source.attr('id');\x0a\x20\x20\x20\x20\x20\x20if\x20(id\x20==\x20''\x20||\x20id.indexOf('tmp_')\x20===\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Auto-generated\x20permalink.\x0a\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20if\x20(parent.find('>\x20.permalink').length)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Already\x20attached.\x0a\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20parent\x0a\x20\x20\x20\x20\x20\x20\x20\x20.append('\x20')\x0a\x20\x20\x20\x20\x20\x20\x20\x20.append($(\"<a\x20class='permalink'>&#xb6;</a>\").attr('href',\x20'#'\x20+\x20id));\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20$('#page\x20.container')\x0a\x20\x20\x20\x20\x20\x20.find('h2[id],\x20h3[id]')\x0a\x20\x20\x20\x20\x20\x20.each(function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20el\x20=\x20$(this);\x0a\x20\x20\x20\x20\x20\x20\x20\x20addPermalink(el,\x20el);\x0a\x20\x20\x20\x20\x20\x20});\x0a\x0a\x20\x20\x20\x20$('#page\x20.container')\x0a\x20\x20\x20\x20\x20\x20.find('dl[id]')\x0a\x20\x20\x20\x20\x20\x20.each(function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20el\x20=\x20$(this);\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20Add\x20the\x20anchor\x20to\x20the\x20\"dt\"\x20element.\x0a\x20\x20\x20\x20\x20\x20\x20\x20addPermalink(el,\x20el.find('>\x20dt').first());\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20}\x0a\x0a\x20\x20$('.js-expandAll').click(function()\x20{\x0a\x20\x20\x20\x20if\x20($(this).hasClass('collapsed'))\x20{\x0a\x20\x20\x20\x20\x20\x20toggleExamples('toggle');\x0a\x20\x20\x20\x20\x20\x20$(this).text('(Collapse\x20All)');\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20toggleExamples('toggleVisible');\x0a\x20\x20\x20\x20\x20\x20$(this).text('(Expand\x20All)');\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20$(this).toggleClass('collapsed');\x0a\x20\x20});\x0a\x0a\x20\x20function\x20toggleExamples(className)\x20{\x0a\x20\x20\x20\x20//\x20We\x20need\x20to\x20explicitly\x20iterate\x20through\x20divs\x20starting\x20with\x20\"example_\"\x0a\x20\x20\x20\x20//\x20to\x20avoid\x20toggling\x20Overview\x20and\x20Index\x20collapsibles.\x0a\x20\x20\x20\x20$(\"[id^='example_']\").each(function()\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20Check\x20for\x20state\x20and\x20click\x20it\x20only\x20if\x20required.\x0a\x20\x20\x20\x20\x20\x20if\x20($(this).hasClass(className))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20$(this)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.find('.toggleButton')\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.first()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.click();\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20});\x0a\x20\x20}\x0a\x0a\x20\x20$(document).ready(function()\x20{\x0a\x20\x20\x20\x20generateTOC();\x0a\x20\x20\x20\x20addPermalinks();\x0a\x20\x20\x20\x20bindToggles('.toggle');\x0a\x20\x20\x20\x20bindToggles('.toggleVisible');\x0a\x20\x20\x20\x20bindToggleLinks('.exampleLink',\x20'example_');\x0a\x20\x20\x20\x20bindToggleLinks('.overviewLink',\x20'');\x0a\x20\x20\x20\x20bindToggleLinks('.examplesLink',\x20'');\x0a\x20\x20\x20\x20bindToggleLinks('.indexLink',\x20'');\x0a\x20\x20\x20\x20setupInlinePlayground();\x0a\x20\x20\x20\x20fixFocus();\x0a\x20\x20\x20\x20toggleHash();\x0a\x20\x20\x20\x20personalizeInstallInstructions();\x0a\x20\x20\x20\x20updateVersionTags();\x0a\x0a\x20\x20\x20\x20//\x20godoc.html\x20defines\x20window.initFuncs\x20in\x20the\x20<head>\x20tag,\x20and\x20root.html\x20and\x0a\x20\x20\x20\x20//\x20codewalk.js\x20push\x20their\x20on-page-ready\x20functions\x20to\x20the\x20list.\x0a\x20\x20\x20\x20//\x20We\x20execute\x20those\x20functions\x20here,\x20to\x20avoid\x20loading\x20jQuery\x20until\x20the\x20page\x0a\x20\x20\x20\x20//\x20content\x20is\x20loaded.\x0a\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20window.initFuncs.length;\x20i++)\x20window.initFuncs[i]();\x0a\x20\x20});\x0a})();\x0a",
 
 	"images/cloud-download.svg": "<svg\x20xmlns=\"http://www.w3.org/2000/svg\"\x20width=\"24\"\x20height=\"24\"><path\x20fill=\"none\"\x20d=\"M0\x200h24v24H0V0z\"/><path\x20fill=\"#202224\"\x20d=\"M19.35\x2010.04C18.67\x206.59\x2015.64\x204\x2012\x204\x209.11\x204\x206.6\x205.64\x205.35\x208.04\x202.34\x208.36\x200\x2010.91\x200\x2014c0\x203.31\x202.69\x206\x206\x206h13c2.76\x200\x205-2.24\x205-5\x200-2.64-2.05-4.78-4.65-4.96zM19\x2018H6c-2.21\x200-4-1.79-4-4\x200-2.05\x201.53-3.76\x203.56-3.97l1.07-.11.5-.95C8.08\x207.14\x209.94\x206\x2012\x206c2.62\x200\x204.88\x201.86\x205.39\x204.43l.3\x201.5\x201.53.11c1.56.1\x202.78\x201.41\x202.78\x202.96\x200\x201.65-1.35\x203-3\x203zm-5.55-8h-2.9v3H8l4\x204\x204-4h-2.55z\"/></svg>\x0a",
 
@@ -97,9 +97,9 @@
 
 	"packageroot.html": "<!--\x0a\x09Copyright\x202018\x20The\x20Go\x20Authors.\x20All\x20rights\x20reserved.\x0a\x09Use\x20of\x20this\x20source\x20code\x20is\x20governed\x20by\x20a\x20BSD-style\x0a\x09license\x20that\x20can\x20be\x20found\x20in\x20the\x20LICENSE\x20file.\x0a-->\x0a<!--\x0a\x09Note:\x20Static\x20(i.e.,\x20not\x20template-generated)\x20href\x20and\x20id\x0a\x09attributes\x20start\x20with\x20\"pkg-\"\x20to\x20make\x20it\x20impossible\x20for\x0a\x09them\x20to\x20conflict\x20with\x20generated\x20attributes\x20(some\x20of\x20which\x0a\x09correspond\x20to\x20Go\x20identifiers).\x0a-->\x0a{{with\x20.PAst}}\x0a\x09{{range\x20$filename,\x20$ast\x20:=\x20.}}\x0a\x09\x09<a\x20href=\"{{$filename|srcLink|html}}\">{{$filename|filename|html}}</a>:<pre>{{node_html\x20$\x20$ast\x20false}}</pre>\x0a\x09{{end}}\x0a{{end}}\x0a\x0a{{with\x20.Dirs}}\x0a\x09{{/*\x20DirList\x20entries\x20are\x20numbers\x20and\x20strings\x20-\x20no\x20need\x20for\x20FSet\x20*/}}\x0a\x09{{if\x20$.PDoc}}\x0a\x09\x09<h2\x20id=\"pkg-subdirectories\">Subdirectories</h2>\x0a\x09{{end}}\x0a\x09\x09<div\x20id=\"manual-nav\">\x0a\x09\x09\x09<dl>\x0a\x09\x09\x09\x09<dt><a\x20href=\"#stdlib\">Standard\x20library</a></dt>\x0a\x09\x09\x09\x09{{if\x20hasThirdParty\x20.List\x20}}\x0a\x09\x09\x09\x09\x09<dt><a\x20href=\"#thirdparty\">Third\x20party</a></dt>\x0a\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09<dt><a\x20href=\"#other\">Other\x20packages</a></dt>\x0a\x09\x09\x09\x09<dd><a\x20href=\"#subrepo\">Sub-repositories</a></dd>\x0a\x09\x09\x09\x09<dd><a\x20href=\"#community\">Community</a></dd>\x0a\x09\x09\x09</dl>\x0a\x09\x09</div>\x0a\x0a\x09\x09<div\x20id=\"stdlib\"\x20class=\"toggleVisible\">\x0a\x09\x09\x09<div\x20class=\"collapsed\">\x0a\x09\x09\x09\x09<h2\x20class=\"toggleButton\"\x20title=\"Click\x20to\x20show\x20Standard\x20library\x20section\">Standard\x20library\x20\xe2\x96\xb9</h2>\x0a\x09\x09\x09</div>\x0a\x09\x09\x09<div\x20class=\"expanded\">\x0a\x09\x09\x09\x09<h2\x20class=\"toggleButton\"\x20title=\"Click\x20to\x20hide\x20Standard\x20library\x20section\">Standard\x20library\x20\xe2\x96\xbe</h2>\x0a\x09\x09\x09\x09<img\x20alt=\"\"\x20class=\"gopher\"\x20src=\"/doc/gopher/pkg.png\"/>\x0a\x09\x09\x09\x09<div\x20class=\"pkg-dir\">\x0a\x09\x09\x09\x09\x09<table>\x0a\x09\x09\x09\x09\x09\x09<tr>\x0a\x09\x09\x09\x09\x09\x09\x09<th\x20class=\"pkg-name\">Name</th>\x0a\x09\x09\x09\x09\x09\x09\x09<th\x20class=\"pkg-synopsis\">Synopsis</th>\x0a\x09\x09\x09\x09\x09\x09</tr>\x0a\x0a\x09\x09\x09\x09\x09\x09{{range\x20.List}}\x0a\x09\x09\x09\x09\x09\x09\x09<tr>\x0a\x09\x09\x09\x09\x09\x09\x09{{if\x20eq\x20.RootType\x20\"GOROOT\"}}\x0a\x09\x09\x09\x09\x09\x09\x09{{if\x20$.DirFlat}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09{{if\x20.HasPkg}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09<td\x20class=\"pkg-name\">\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09<a\x20href=\"{{html\x20.Path}}/{{modeQueryString\x20$.Mode\x20|\x20html}}\">{{html\x20.Path}}</a>\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09</td>\x0a\x09\x09\x09\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09\x09\x09{{else}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09<td\x20class=\"pkg-name\"\x20style=\"padding-left:\x20{{multiply\x20.Depth\x2020}}px;\">\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09<a\x20href=\"{{html\x20.Path}}/{{modeQueryString\x20$.Mode\x20|\x20html}}\">{{html\x20.Name}}</a>\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09</td>\x0a\x09\x09\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09<td\x20class=\"pkg-synopsis\">\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09{{html\x20.Synopsis}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09</td>\x0a\x09\x09\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09\x09\x09</tr>\x0a\x09\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09</table>\x0a\x09\x09\x09\x09</div>\x20<!--\x20.pkg-dir\x20-->\x0a\x09\x09\x09</div>\x20<!--\x20.expanded\x20-->\x0a\x09\x09</div>\x20<!--\x20#stdlib\x20.toggleVisible\x20-->\x0a\x0a\x09{{if\x20hasThirdParty\x20.List\x20}}\x0a\x09\x09<div\x20id=\"thirdparty\"\x20class=\"toggleVisible\">\x0a\x09\x09\x09<div\x20class=\"collapsed\">\x0a\x09\x09\x09\x09<h2\x20class=\"toggleButton\"\x20title=\"Click\x20to\x20show\x20Third\x20party\x20section\">Third\x20party\x20\xe2\x96\xb9</h2>\x0a\x09\x09\x09</div>\x0a\x09\x09\x09<div\x20class=\"expanded\">\x0a\x09\x09\x09\x09<h2\x20class=\"toggleButton\"\x20title=\"Click\x20to\x20hide\x20Third\x20party\x20section\">Third\x20party\x20\xe2\x96\xbe</h2>\x0a\x09\x09\x09\x09<div\x20class=\"pkg-dir\">\x0a\x09\x09\x09\x09\x09<table>\x0a\x09\x09\x09\x09\x09\x09<tr>\x0a\x09\x09\x09\x09\x09\x09\x09<th\x20class=\"pkg-name\">Name</th>\x0a\x09\x09\x09\x09\x09\x09\x09<th\x20class=\"pkg-synopsis\">Synopsis</th>\x0a\x09\x09\x09\x09\x09\x09</tr>\x0a\x0a\x09\x09\x09\x09\x09\x09{{range\x20.List}}\x0a\x09\x09\x09\x09\x09\x09\x09<tr>\x0a\x09\x09\x09\x09\x09\x09\x09\x09{{if\x20eq\x20.RootType\x20\"GOPATH\"}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09{{if\x20$.DirFlat}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09{{if\x20.HasPkg}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09<td\x20class=\"pkg-name\">\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09<a\x20href=\"{{html\x20.Path}}/{{modeQueryString\x20$.Mode\x20|\x20html}}\">{{html\x20.Path}}</a>\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09</td>\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09{{else}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09<td\x20class=\"pkg-name\"\x20style=\"padding-left:\x20{{multiply\x20.Depth\x2020}}px;\">\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09<a\x20href=\"{{html\x20.Path}}/{{modeQueryString\x20$.Mode\x20|\x20html}}\">{{html\x20.Name}}</a>\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09</td>\x0a\x09\x09\x09\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09<td\x20class=\"pkg-synopsis\">\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09{{html\x20.Synopsis}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09</td>\x0a\x09\x09\x09\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09\x09\x09</tr>\x0a\x09\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09</table>\x0a\x09\x09\x09\x09</div>\x20<!--\x20.pkg-dir\x20-->\x0a\x09\x09\x09</div>\x20<!--\x20.expanded\x20-->\x0a\x09\x09</div>\x20<!--\x20#stdlib\x20.toggleVisible\x20-->\x0a\x09{{end}}\x0a\x0a\x09<h2\x20id=\"other\">Other\x20packages</h2>\x0a\x09<h3\x20id=\"subrepo\">Sub-repositories</h3>\x0a\x09<p>\x0a\x09These\x20packages\x20are\x20part\x20of\x20the\x20Go\x20Project\x20but\x20outside\x20the\x20main\x20Go\x20tree.\x0a\x09They\x20are\x20developed\x20under\x20looser\x20<a\x20href=\"/doc/go1compat\">compatibility\x20requirements</a>\x20than\x20the\x20Go\x20core.\x0a\x09Install\x20them\x20with\x20\"<a\x20href=\"/cmd/go/#hdr-Download_and_install_packages_and_dependencies\">go\x20get</a>\".\x0a\x09</p>\x0a\x09<ul>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/benchmarks\">benchmarks</a>\x20\xe2\x80\x94\x20benchmarks\x20to\x20measure\x20Go\x20as\x20it\x20is\x20developed.</li>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/blog\">blog</a>\x20\xe2\x80\x94\x20<a\x20href=\"//blog.golang.org\">blog.golang.org</a>'s\x20implementation.</li>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/build\">build</a>\x20\xe2\x80\x94\x20<a\x20href=\"//build.golang.org\">build.golang.org</a>'s\x20implementation.</li>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/crypto\">crypto</a>\x20\xe2\x80\x94\x20additional\x20cryptography\x20packages.</li>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/debug\">debug</a>\x20\xe2\x80\x94\x20an\x20experimental\x20debugger\x20for\x20Go.</li>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/image\">image</a>\x20\xe2\x80\x94\x20additional\x20imaging\x20packages.</li>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/mobile\">mobile</a>\x20\xe2\x80\x94\x20experimental\x20support\x20for\x20Go\x20on\x20mobile\x20platforms.</li>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/net\">net</a>\x20\xe2\x80\x94\x20additional\x20networking\x20packages.</li>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/perf\">perf</a>\x20\xe2\x80\x94\x20packages\x20and\x20tools\x20for\x20performance\x20measurement,\x20storage,\x20and\x20analysis.</li>\x0a\x09\x09<li><a\x20href=\"//pkg.go.dev/golang.org/x/pkgsite\">pkgsite</a>\x20\xe2\x80\x94\x20home\x20of\x20the\x20pkg.go.dev\x20website.</li>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/review\">review</a>\x20\xe2\x80\x94\x20a\x20tool\x20for\x20working\x20with\x20Gerrit\x20code\x20reviews.</li>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/sync\">sync</a>\x20\xe2\x80\x94\x20additional\x20concurrency\x20primitives.</li>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/sys\">sys</a>\x20\xe2\x80\x94\x20packages\x20for\x20making\x20system\x20calls.</li>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/text\">text</a>\x20\xe2\x80\x94\x20packages\x20for\x20working\x20with\x20text.</li>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/time\">time</a>\x20\xe2\x80\x94\x20additional\x20time\x20packages.</li>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/tools\">tools</a>\x20\xe2\x80\x94\x20godoc,\x20goimports,\x20gorename,\x20and\x20other\x20tools.</li>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/tour\">tour</a>\x20\xe2\x80\x94\x20<a\x20href=\"//tour.golang.org\">tour.golang.org</a>'s\x20implementation.</li>\x0a\x09\x09<li><a\x20href=\"//godoc.org/golang.org/x/exp\">exp</a>\x20\xe2\x80\x94\x20experimental\x20and\x20deprecated\x20packages\x20(handle\x20with\x20care;\x20may\x20change\x20without\x20warning).</li>\x0a\x09</ul>\x0a\x0a\x09<h3\x20id=\"community\">Community</h3>\x0a\x09<p>\x0a\x09These\x20services\x20can\x20help\x20you\x20find\x20Open\x20Source\x20packages\x20provided\x20by\x20the\x20community.\x0a\x09</p>\x0a\x09<ul>\x0a\x09\x09<li><a\x20href=\"//godoc.org\">GoDoc</a>\x20-\x20a\x20package\x20index\x20and\x20search\x20engine.</li>\x0a\x09\x09<li><a\x20href=\"http://go-search.org\">Go\x20Search</a>\x20-\x20a\x20code\x20search\x20engine.</li>\x0a\x09\x09<li><a\x20href=\"/wiki/Projects\">Projects\x20at\x20the\x20Go\x20Wiki</a>\x20-\x20a\x20curated\x20list\x20of\x20Go\x20projects.</li>\x0a\x09</ul>\x0a{{end}}\x0a",
 
-	"play.js": "//\x20Copyright\x202012\x20The\x20Go\x20Authors.\x20All\x20rights\x20reserved.\x0a//\x20Use\x20of\x20this\x20source\x20code\x20is\x20governed\x20by\x20a\x20BSD-style\x0a//\x20license\x20that\x20can\x20be\x20found\x20in\x20the\x20LICENSE\x20file.\x0a\x0afunction\x20initPlayground(transport)\x20{\x0a\x09'use\x20strict';\x0a\x0a\x09function\x20text(node)\x20{\x0a\x09\x09var\x20s\x20=\x20'';\x0a\x09\x09for\x20(var\x20i\x20=\x200;\x20i\x20<\x20node.childNodes.length;\x20i++)\x20{\x0a\x09\x09\x09var\x20n\x20=\x20node.childNodes[i];\x0a\x09\x09\x09if\x20(n.nodeType\x20===\x201)\x20{\x0a\x09\x09\x09\x09if\x20(n.tagName\x20===\x20'BUTTON')\x20continue\x0a\x09\x09\x09\x09if\x20(n.tagName\x20===\x20'SPAN'\x20&&\x20n.className\x20===\x20'number')\x20continue;\x0a\x09\x09\x09\x09if\x20(n.tagName\x20===\x20'DIV'\x20||\x20n.tagName\x20==\x20'BR')\x20{\x0a\x09\x09\x09\x09\x09s\x20+=\x20\"\\n\";\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09\x09s\x20+=\x20text(n);\x0a\x09\x09\x09\x09continue;\x0a\x09\x09\x09}\x0a\x09\x09\x09if\x20(n.nodeType\x20===\x203)\x20{\x0a\x09\x09\x09\x09s\x20+=\x20n.nodeValue;\x0a\x09\x09\x09}\x0a\x09\x09}\x0a\x09\x09return\x20s.replace('\\xA0',\x20'\x20');\x20//\x20replace\x20non-breaking\x20spaces\x0a\x09}\x0a\x0a\x09//\x20When\x20presenter\x20notes\x20are\x20enabled,\x20the\x20index\x20passed\x0a\x09//\x20here\x20will\x20identify\x20the\x20playground\x20to\x20be\x20synced\x0a\x09function\x20init(code,\x20index)\x20{\x0a\x09\x09var\x20output\x20=\x20document.createElement('div');\x0a\x09\x09var\x20outpre\x20=\x20document.createElement('pre');\x0a\x09\x09var\x20running;\x0a\x0a\x09\x09if\x20($\x20&&\x20$(output).resizable)\x20{\x0a\x09\x09\x09$(output).resizable({\x0a\x09\x09\x09\x09handles:\x20\x09'n,w,nw',\x0a\x09\x09\x09\x09minHeight:\x0927,\x0a\x09\x09\x09\x09minWidth:\x09135,\x0a\x09\x09\x09\x09maxHeight:\x09608,\x0a\x09\x09\x09\x09maxWidth:\x09990\x0a\x09\x09\x09});\x0a\x09\x09}\x0a\x0a\x09\x09function\x20onKill()\x20{\x0a\x09\x09\x09if\x20(running)\x20running.Kill();\x0a\x09\x09\x09if\x20(window.notesEnabled)\x20updatePlayStorage('onKill',\x20index);\x0a\x09\x09}\x0a\x0a\x09\x09function\x20onRun(e)\x20{\x0a\x09\x09\x09var\x20sk\x20=\x20e.shiftKey\x20||\x20localStorage.getItem('play-shiftKey')\x20===\x20'true';\x0a\x09\x09\x09if\x20(running)\x20running.Kill();\x0a\x09\x09\x09output.style.display\x20=\x20'block';\x0a\x09\x09\x09outpre.innerHTML\x20=\x20'';\x0a\x09\x09\x09run1.style.display\x20=\x20'none';\x0a\x09\x09\x09var\x20options\x20=\x20{Race:\x20sk};\x0a\x09\x09\x09running\x20=\x20transport.Run(text(code),\x20PlaygroundOutput(outpre),\x20options);\x0a\x09\x09\x09if\x20(window.notesEnabled)\x20updatePlayStorage('onRun',\x20index,\x20e);\x0a\x09\x09}\x0a\x0a\x09\x09function\x20onClose()\x20{\x0a\x09\x09\x09if\x20(running)\x20running.Kill();\x0a\x09\x09\x09output.style.display\x20=\x20'none';\x0a\x09\x09\x09run1.style.display\x20=\x20'inline-block';\x0a\x09\x09\x09if\x20(window.notesEnabled)\x20updatePlayStorage('onClose',\x20index);\x0a\x09\x09}\x0a\x0a\x09\x09if\x20(window.notesEnabled)\x20{\x0a\x09\x09\x09playgroundHandlers.onRun.push(onRun);\x0a\x09\x09\x09playgroundHandlers.onClose.push(onClose);\x0a\x09\x09\x09playgroundHandlers.onKill.push(onKill);\x0a\x09\x09}\x0a\x0a\x09\x09var\x20run1\x20=\x20document.createElement('button');\x0a\x09\x09run1.innerHTML\x20=\x20'Run';\x0a\x09\x09run1.className\x20=\x20'run';\x0a\x09\x09run1.addEventListener(\"click\",\x20onRun,\x20false);\x0a\x09\x09var\x20run2\x20=\x20document.createElement('button');\x0a\x09\x09run2.className\x20=\x20'run';\x0a\x09\x09run2.innerHTML\x20=\x20'Run';\x0a\x09\x09run2.addEventListener(\"click\",\x20onRun,\x20false);\x0a\x09\x09var\x20kill\x20=\x20document.createElement('button');\x0a\x09\x09kill.className\x20=\x20'kill';\x0a\x09\x09kill.innerHTML\x20=\x20'Kill';\x0a\x09\x09kill.addEventListener(\"click\",\x20onKill,\x20false);\x0a\x09\x09var\x20close\x20=\x20document.createElement('button');\x0a\x09\x09close.className\x20=\x20'close';\x0a\x09\x09close.innerHTML\x20=\x20'Close';\x0a\x09\x09close.addEventListener(\"click\",\x20onClose,\x20false);\x0a\x0a\x09\x09var\x20button\x20=\x20document.createElement('div');\x0a\x09\x09button.classList.add('buttons');\x0a\x09\x09button.appendChild(run1);\x0a\x09\x09//\x20Hack\x20to\x20simulate\x20insertAfter\x0a\x09\x09code.parentNode.insertBefore(button,\x20code.nextSibling);\x0a\x0a\x09\x09var\x20buttons\x20=\x20document.createElement('div');\x0a\x09\x09buttons.classList.add('buttons');\x0a\x09\x09buttons.appendChild(run2);\x0a\x09\x09buttons.appendChild(kill);\x0a\x09\x09buttons.appendChild(close);\x0a\x0a\x09\x09output.classList.add('output');\x0a\x09\x09output.appendChild(buttons);\x0a\x09\x09output.appendChild(outpre);\x0a\x09\x09output.style.display\x20=\x20'none';\x0a\x09\x09code.parentNode.insertBefore(output,\x20button.nextSibling);\x0a\x09}\x0a\x0a\x09var\x20play\x20=\x20document.querySelectorAll('div.playground');\x0a\x09for\x20(var\x20i\x20=\x200;\x20i\x20<\x20play.length;\x20i++)\x20{\x0a\x09\x09init(play[i],\x20i);\x0a\x09}\x0a}\x0a",
+	"play.js": "//\x20Copyright\x202012\x20The\x20Go\x20Authors.\x20All\x20rights\x20reserved.\x0a//\x20Use\x20of\x20this\x20source\x20code\x20is\x20governed\x20by\x20a\x20BSD-style\x0a//\x20license\x20that\x20can\x20be\x20found\x20in\x20the\x20LICENSE\x20file.\x0a\x0afunction\x20initPlayground(transport)\x20{\x0a\x20\x20'use\x20strict';\x0a\x0a\x20\x20function\x20text(node)\x20{\x0a\x20\x20\x20\x20var\x20s\x20=\x20'';\x0a\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20node.childNodes.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20n\x20=\x20node.childNodes[i];\x0a\x20\x20\x20\x20\x20\x20if\x20(n.nodeType\x20===\x201)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(n.tagName\x20===\x20'BUTTON')\x20continue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(n.tagName\x20===\x20'SPAN'\x20&&\x20n.className\x20===\x20'number')\x20continue;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(n.tagName\x20===\x20'DIV'\x20||\x20n.tagName\x20==\x20'BR')\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20s\x20+=\x20'\\n';\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20s\x20+=\x20text(n);\x0a\x20\x20\x20\x20\x20\x20\x20\x20continue;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20if\x20(n.nodeType\x20===\x203)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20s\x20+=\x20n.nodeValue;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20return\x20s.replace('\\xA0',\x20'\x20');\x20//\x20replace\x20non-breaking\x20spaces\x0a\x20\x20}\x0a\x0a\x20\x20//\x20When\x20presenter\x20notes\x20are\x20enabled,\x20the\x20index\x20passed\x0a\x20\x20//\x20here\x20will\x20identify\x20the\x20playground\x20to\x20be\x20synced\x0a\x20\x20function\x20init(code,\x20index)\x20{\x0a\x20\x20\x20\x20var\x20output\x20=\x20document.createElement('div');\x0a\x20\x20\x20\x20var\x20outpre\x20=\x20document.createElement('pre');\x0a\x20\x20\x20\x20var\x20running;\x0a\x0a\x20\x20\x20\x20if\x20($\x20&&\x20$(output).resizable)\x20{\x0a\x20\x20\x20\x20\x20\x20$(output).resizable({\x0a\x20\x20\x20\x20\x20\x20\x20\x20handles:\x20'n,w,nw',\x0a\x20\x20\x20\x20\x20\x20\x20\x20minHeight:\x2027,\x0a\x20\x20\x20\x20\x20\x20\x20\x20minWidth:\x20135,\x0a\x20\x20\x20\x20\x20\x20\x20\x20maxHeight:\x20608,\x0a\x20\x20\x20\x20\x20\x20\x20\x20maxWidth:\x20990,\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20function\x20onKill()\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(running)\x20running.Kill();\x0a\x20\x20\x20\x20\x20\x20if\x20(window.notesEnabled)\x20updatePlayStorage('onKill',\x20index);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20function\x20onRun(e)\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20sk\x20=\x20e.shiftKey\x20||\x20localStorage.getItem('play-shiftKey')\x20===\x20'true';\x0a\x20\x20\x20\x20\x20\x20if\x20(running)\x20running.Kill();\x0a\x20\x20\x20\x20\x20\x20output.style.display\x20=\x20'block';\x0a\x20\x20\x20\x20\x20\x20outpre.innerHTML\x20=\x20'';\x0a\x20\x20\x20\x20\x20\x20run1.style.display\x20=\x20'none';\x0a\x20\x20\x20\x20\x20\x20var\x20options\x20=\x20{\x20Race:\x20sk\x20};\x0a\x20\x20\x20\x20\x20\x20running\x20=\x20transport.Run(text(code),\x20PlaygroundOutput(outpre),\x20options);\x0a\x20\x20\x20\x20\x20\x20if\x20(window.notesEnabled)\x20updatePlayStorage('onRun',\x20index,\x20e);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20function\x20onClose()\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(running)\x20running.Kill();\x0a\x20\x20\x20\x20\x20\x20output.style.display\x20=\x20'none';\x0a\x20\x20\x20\x20\x20\x20run1.style.display\x20=\x20'inline-block';\x0a\x20\x20\x20\x20\x20\x20if\x20(window.notesEnabled)\x20updatePlayStorage('onClose',\x20index);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(window.notesEnabled)\x20{\x0a\x20\x20\x20\x20\x20\x20playgroundHandlers.onRun.push(onRun);\x0a\x20\x20\x20\x20\x20\x20playgroundHandlers.onClose.push(onClose);\x0a\x20\x20\x20\x20\x20\x20playgroundHandlers.onKill.push(onKill);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20run1\x20=\x20document.createElement('button');\x0a\x20\x20\x20\x20run1.innerHTML\x20=\x20'Run';\x0a\x20\x20\x20\x20run1.className\x20=\x20'run';\x0a\x20\x20\x20\x20run1.addEventListener('click',\x20onRun,\x20false);\x0a\x20\x20\x20\x20var\x20run2\x20=\x20document.createElement('button');\x0a\x20\x20\x20\x20run2.className\x20=\x20'run';\x0a\x20\x20\x20\x20run2.innerHTML\x20=\x20'Run';\x0a\x20\x20\x20\x20run2.addEventListener('click',\x20onRun,\x20false);\x0a\x20\x20\x20\x20var\x20kill\x20=\x20document.createElement('button');\x0a\x20\x20\x20\x20kill.className\x20=\x20'kill';\x0a\x20\x20\x20\x20kill.innerHTML\x20=\x20'Kill';\x0a\x20\x20\x20\x20kill.addEventListener('click',\x20onKill,\x20false);\x0a\x20\x20\x20\x20var\x20close\x20=\x20document.createElement('button');\x0a\x20\x20\x20\x20close.className\x20=\x20'close';\x0a\x20\x20\x20\x20close.innerHTML\x20=\x20'Close';\x0a\x20\x20\x20\x20close.addEventListener('click',\x20onClose,\x20false);\x0a\x0a\x20\x20\x20\x20var\x20button\x20=\x20document.createElement('div');\x0a\x20\x20\x20\x20button.classList.add('buttons');\x0a\x20\x20\x20\x20button.appendChild(run1);\x0a\x20\x20\x20\x20//\x20Hack\x20to\x20simulate\x20insertAfter\x0a\x20\x20\x20\x20code.parentNode.insertBefore(button,\x20code.nextSibling);\x0a\x0a\x20\x20\x20\x20var\x20buttons\x20=\x20document.createElement('div');\x0a\x20\x20\x20\x20buttons.classList.add('buttons');\x0a\x20\x20\x20\x20buttons.appendChild(run2);\x0a\x20\x20\x20\x20buttons.appendChild(kill);\x0a\x20\x20\x20\x20buttons.appendChild(close);\x0a\x0a\x20\x20\x20\x20output.classList.add('output');\x0a\x20\x20\x20\x20output.appendChild(buttons);\x0a\x20\x20\x20\x20output.appendChild(outpre);\x0a\x20\x20\x20\x20output.style.display\x20=\x20'none';\x0a\x20\x20\x20\x20code.parentNode.insertBefore(output,\x20button.nextSibling);\x0a\x20\x20}\x0a\x0a\x20\x20var\x20play\x20=\x20document.querySelectorAll('div.playground');\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20play.length;\x20i++)\x20{\x0a\x20\x20\x20\x20init(play[i],\x20i);\x0a\x20\x20}\x0a}\x0a",
 
-	"playground.js": "//\x20Copyright\x202012\x20The\x20Go\x20Authors.\x20All\x20rights\x20reserved.\x0a//\x20Use\x20of\x20this\x20source\x20code\x20is\x20governed\x20by\x20a\x20BSD-style\x0a//\x20license\x20that\x20can\x20be\x20found\x20in\x20the\x20LICENSE\x20file.\x0a\x0a/*\x0aIn\x20the\x20absence\x20of\x20any\x20formal\x20way\x20to\x20specify\x20interfaces\x20in\x20JavaScript,\x0ahere's\x20a\x20skeleton\x20implementation\x20of\x20a\x20playground\x20transport.\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20function\x20Transport()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Set\x20up\x20any\x20transport\x20state\x20(eg,\x20make\x20a\x20websocket\x20connection).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run:\x20function(body,\x20output,\x20options)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Compile\x20and\x20run\x20the\x20program\x20'body'\x20with\x20'options'.\x0a\x09\x09\x09\x09//\x20Call\x20the\x20'output'\x20callback\x20to\x20display\x20program\x20output.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Kill:\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Kill\x20the\x20running\x20program.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x09//\x20The\x20output\x20callback\x20is\x20called\x20multiple\x20times,\x20and\x20each\x20time\x20it\x20is\x0a\x09//\x20passed\x20an\x20object\x20of\x20this\x20form.\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20write\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Kind:\x20'string',\x20//\x20'start',\x20'stdout',\x20'stderr',\x20'end'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Body:\x20'string'\x20\x20//\x20content\x20of\x20write\x20or\x20end\x20status\x20message\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x09//\x20The\x20first\x20call\x20must\x20be\x20of\x20Kind\x20'start'\x20with\x20no\x20body.\x0a\x09//\x20Subsequent\x20calls\x20may\x20be\x20of\x20Kind\x20'stdout'\x20or\x20'stderr'\x0a\x09//\x20and\x20must\x20have\x20a\x20non-null\x20Body\x20string.\x0a\x09//\x20The\x20final\x20call\x20should\x20be\x20of\x20Kind\x20'end'\x20with\x20an\x20optional\x0a\x09//\x20Body\x20string,\x20signifying\x20a\x20failure\x20(\"killed\",\x20for\x20example).\x0a\x0a\x09//\x20The\x20output\x20callback\x20must\x20be\x20of\x20this\x20form.\x0a\x09//\x20See\x20PlaygroundOutput\x20(below)\x20for\x20an\x20implementation.\x0a\x20\x20\x20\x20\x20\x20\x20\x20function\x20outputCallback(write)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a*/\x0a\x0a//\x20HTTPTransport\x20is\x20the\x20default\x20transport.\x0a//\x20enableVet\x20enables\x20running\x20vet\x20if\x20a\x20program\x20was\x20compiled\x20and\x20ran\x20successfully.\x0a//\x20If\x20vet\x20returned\x20any\x20errors,\x20display\x20them\x20before\x20the\x20output\x20of\x20a\x20program.\x0afunction\x20HTTPTransport(enableVet)\x20{\x0a\x09'use\x20strict';\x0a\x0a\x09function\x20playback(output,\x20data)\x20{\x0a\x09\x09//\x20Backwards\x20compatibility:\x20default\x20values\x20do\x20not\x20affect\x20the\x20output.\x0a\x09\x09var\x20events\x20=\x20data.Events\x20||\x20[];\x0a\x09\x09var\x20errors\x20=\x20data.Errors\x20||\x20\"\";\x0a\x09\x09var\x20status\x20=\x20data.Status\x20||\x200;\x0a\x09\x09var\x20isTest\x20=\x20data.IsTest\x20||\x20false;\x0a\x09\x09var\x20testsFailed\x20=\x20data.TestsFailed\x20||\x200;\x0a\x0a\x09\x09var\x20timeout;\x0a\x09\x09output({Kind:\x20'start'});\x0a\x09\x09function\x20next()\x20{\x0a\x09\x09\x09if\x20(!events\x20||\x20events.length\x20===\x200)\x20{\x0a\x09\x09\x09\x09if\x20(isTest)\x20{\x0a\x09\x09\x09\x09\x09if\x20(testsFailed\x20>\x200)\x20{\x0a\x09\x09\x09\x09\x09\x09output({Kind:\x20'system',\x20Body:\x20'\\n'+testsFailed+'\x20test'+(testsFailed>1?'s':'')+'\x20failed.'});\x0a\x09\x09\x09\x09\x09}\x20else\x20{\x0a\x09\x09\x09\x09\x09\x09output({Kind:\x20'system',\x20Body:\x20'\\nAll\x20tests\x20passed.'});\x0a\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09}\x20else\x20{\x0a\x09\x09\x09\x09\x09if\x20(status\x20>\x200)\x20{\x0a\x09\x09\x09\x09\x09\x09output({Kind:\x20'end',\x20Body:\x20'status\x20'\x20+\x20status\x20+\x20'.'});\x0a\x09\x09\x09\x09\x09}\x20else\x20{\x0a\x09\x09\x09\x09\x09\x09if\x20(errors\x20!==\x20\"\")\x20{\x0a\x09\x09\x09\x09\x09\x09\x09//\x20errors\x20are\x20displayed\x20only\x20in\x20the\x20case\x20of\x20timeout.\x0a\x09\x09\x09\x09\x09\x09\x09output({Kind:\x20'end',\x20Body:\x20errors\x20+\x20'.'});\x0a\x09\x09\x09\x09\x09\x09}\x20else\x20{\x0a\x09\x09\x09\x09\x09\x09\x09output({Kind:\x20'end'});\x0a\x09\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09\x09return;\x0a\x09\x09\x09}\x0a\x09\x09\x09var\x20e\x20=\x20events.shift();\x0a\x09\x09\x09if\x20(e.Delay\x20===\x200)\x20{\x0a\x09\x09\x09\x09output({Kind:\x20e.Kind,\x20Body:\x20e.Message});\x0a\x09\x09\x09\x09next();\x0a\x09\x09\x09\x09return;\x0a\x09\x09\x09}\x0a\x09\x09\x09timeout\x20=\x20setTimeout(function()\x20{\x0a\x09\x09\x09\x09output({Kind:\x20e.Kind,\x20Body:\x20e.Message});\x0a\x09\x09\x09\x09next();\x0a\x09\x09\x09},\x20e.Delay\x20/\x201000000);\x0a\x09\x09}\x0a\x09\x09next();\x0a\x09\x09return\x20{\x0a\x09\x09\x09Stop:\x20function()\x20{\x0a\x09\x09\x09\x09clearTimeout(timeout);\x0a\x09\x09\x09}\x0a\x09\x09};\x0a\x09}\x0a\x0a\x09function\x20error(output,\x20msg)\x20{\x0a\x09\x09output({Kind:\x20'start'});\x0a\x09\x09output({Kind:\x20'stderr',\x20Body:\x20msg});\x0a\x09\x09output({Kind:\x20'end'});\x0a\x09}\x0a\x0a\x09function\x20buildFailed(output,\x20msg)\x20{\x0a\x09\x09output({Kind:\x20'start'});\x0a\x09\x09output({Kind:\x20'stderr',\x20Body:\x20msg});\x0a\x09\x09output({Kind:\x20'system',\x20Body:\x20'\\nGo\x20build\x20failed.'});\x0a\x09}\x0a\x0a\x09var\x20seq\x20=\x200;\x0a\x09return\x20{\x0a\x09\x09Run:\x20function(body,\x20output,\x20options)\x20{\x0a\x09\x09\x09seq++;\x0a\x09\x09\x09var\x20cur\x20=\x20seq;\x0a\x09\x09\x09var\x20playing;\x0a\x09\x09\x09$.ajax('/compile',\x20{\x0a\x09\x09\x09\x09type:\x20'POST',\x0a\x09\x09\x09\x09data:\x20{'version':\x202,\x20'body':\x20body},\x0a\x09\x09\x09\x09dataType:\x20'json',\x0a\x09\x09\x09\x09success:\x20function(data)\x20{\x0a\x09\x09\x09\x09\x09if\x20(seq\x20!=\x20cur)\x20return;\x0a\x09\x09\x09\x09\x09if\x20(!data)\x20return;\x0a\x09\x09\x09\x09\x09if\x20(playing\x20!=\x20null)\x20playing.Stop();\x0a\x09\x09\x09\x09\x09if\x20(data.Errors)\x20{\x0a\x09\x09\x09\x09\x09\x09if\x20(data.Errors\x20===\x20'process\x20took\x20too\x20long')\x20{\x0a\x09\x09\x09\x09\x09\x09\x09//\x20Playback\x20the\x20output\x20that\x20was\x20captured\x20before\x20the\x20timeout.\x0a\x09\x09\x09\x09\x09\x09\x09playing\x20=\x20playback(output,\x20data);\x0a\x09\x09\x09\x09\x09\x09}\x20else\x20{\x0a\x09\x09\x09\x09\x09\x09\x09buildFailed(output,\x20data.Errors);\x0a\x09\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09\x09\x09return;\x0a\x09\x09\x09\x09\x09}\x0a\x0a\x09\x09\x09\x09\x09if\x20(!enableVet)\x20{\x0a\x09\x09\x09\x09\x09\x09playing\x20=\x20playback(output,\x20data);\x0a\x09\x09\x09\x09\x09\x09return;\x0a\x09\x09\x09\x09\x09}\x0a\x0a\x09\x09\x09\x09\x09$.ajax(\"/vet\",\x20{\x0a\x09\x09\x09\x09\x09\x09data:\x20{\"body\":\x20body},\x0a\x09\x09\x09\x09\x09\x09type:\x20\"POST\",\x0a\x09\x09\x09\x09\x09\x09dataType:\x20\"json\",\x0a\x09\x09\x09\x09\x09\x09success:\x20function(dataVet)\x20{\x0a\x09\x09\x09\x09\x09\x09\x09if\x20(dataVet.Errors)\x20{\x0a\x09\x09\x09\x09\x09\x09\x09\x09if\x20(!data.Events)\x20{\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09data.Events\x20=\x20[];\x0a\x09\x09\x09\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09\x09\x09\x09\x09//\x20inject\x20errors\x20from\x20the\x20vet\x20as\x20the\x20first\x20events\x20in\x20the\x20output\x0a\x09\x09\x09\x09\x09\x09\x09\x09data.Events.unshift({Message:\x20'Go\x20vet\x20exited.\\n\\n',\x20Kind:\x20'system',\x20Delay:\x200});\x0a\x09\x09\x09\x09\x09\x09\x09\x09data.Events.unshift({Message:\x20dataVet.Errors,\x20Kind:\x20'stderr',\x20Delay:\x200});\x0a\x09\x09\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09\x09\x09\x09playing\x20=\x20playback(output,\x20data);\x0a\x09\x09\x09\x09\x09\x09},\x0a\x09\x09\x09\x09\x09\x09error:\x20function()\x20{\x0a\x09\x09\x09\x09\x09\x09\x09playing\x20=\x20playback(output,\x20data);\x0a\x09\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09\x09});\x0a\x09\x09\x09\x09},\x0a\x09\x09\x09\x09error:\x20function()\x20{\x0a\x09\x09\x09\x09\x09error(output,\x20'Error\x20communicating\x20with\x20remote\x20server.');\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09});\x0a\x09\x09\x09return\x20{\x0a\x09\x09\x09\x09Kill:\x20function()\x20{\x0a\x09\x09\x09\x09\x09if\x20(playing\x20!=\x20null)\x20playing.Stop();\x0a\x09\x09\x09\x09\x09output({Kind:\x20'end',\x20Body:\x20'killed'});\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09};\x0a\x09\x09}\x0a\x09};\x0a}\x0a\x0afunction\x20SocketTransport()\x20{\x0a\x09'use\x20strict';\x0a\x0a\x09var\x20id\x20=\x200;\x0a\x09var\x20outputs\x20=\x20{};\x0a\x09var\x20started\x20=\x20{};\x0a\x09var\x20websocket;\x0a\x09if\x20(window.location.protocol\x20==\x20\"http:\")\x20{\x0a\x09\x09websocket\x20=\x20new\x20WebSocket('ws://'\x20+\x20window.location.host\x20+\x20'/socket');\x0a\x09}\x20else\x20if\x20(window.location.protocol\x20==\x20\"https:\")\x20{\x0a\x09\x09websocket\x20=\x20new\x20WebSocket('wss://'\x20+\x20window.location.host\x20+\x20'/socket');\x0a\x09}\x0a\x0a\x09websocket.onclose\x20=\x20function()\x20{\x0a\x09\x09console.log('websocket\x20connection\x20closed');\x0a\x09};\x0a\x0a\x09websocket.onmessage\x20=\x20function(e)\x20{\x0a\x09\x09var\x20m\x20=\x20JSON.parse(e.data);\x0a\x09\x09var\x20output\x20=\x20outputs[m.Id];\x0a\x09\x09if\x20(output\x20===\x20null)\x0a\x09\x09\x09return;\x0a\x09\x09if\x20(!started[m.Id])\x20{\x0a\x09\x09\x09output({Kind:\x20'start'});\x0a\x09\x09\x09started[m.Id]\x20=\x20true;\x0a\x09\x09}\x0a\x09\x09output({Kind:\x20m.Kind,\x20Body:\x20m.Body});\x0a\x09};\x0a\x0a\x09function\x20send(m)\x20{\x0a\x09\x09websocket.send(JSON.stringify(m));\x0a\x09}\x0a\x0a\x09return\x20{\x0a\x09\x09Run:\x20function(body,\x20output,\x20options)\x20{\x0a\x09\x09\x09var\x20thisID\x20=\x20id+'';\x0a\x09\x09\x09id++;\x0a\x09\x09\x09outputs[thisID]\x20=\x20output;\x0a\x09\x09\x09send({Id:\x20thisID,\x20Kind:\x20'run',\x20Body:\x20body,\x20Options:\x20options});\x0a\x09\x09\x09return\x20{\x0a\x09\x09\x09\x09Kill:\x20function()\x20{\x0a\x09\x09\x09\x09\x09send({Id:\x20thisID,\x20Kind:\x20'kill'});\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09};\x0a\x09\x09}\x0a\x09};\x0a}\x0a\x0afunction\x20PlaygroundOutput(el)\x20{\x0a\x09'use\x20strict';\x0a\x0a\x09return\x20function(write)\x20{\x0a\x09\x09if\x20(write.Kind\x20==\x20'start')\x20{\x0a\x09\x09\x09el.innerHTML\x20=\x20'';\x0a\x09\x09\x09return;\x0a\x09\x09}\x0a\x0a\x09\x09var\x20cl\x20=\x20'system';\x0a\x09\x09if\x20(write.Kind\x20==\x20'stdout'\x20||\x20write.Kind\x20==\x20'stderr')\x0a\x09\x09\x09cl\x20=\x20write.Kind;\x0a\x0a\x09\x09var\x20m\x20=\x20write.Body;\x0a\x09\x09if\x20(write.Kind\x20==\x20'end')\x20{\x0a\x09\x09\x09m\x20=\x20'\\nProgram\x20exited'\x20+\x20(m?(':\x20'+m):'.');\x0a\x09\x09}\x0a\x0a\x09\x09if\x20(m.indexOf('IMAGE:')\x20===\x200)\x20{\x0a\x09\x09\x09//\x20TODO(adg):\x20buffer\x20all\x20writes\x20before\x20creating\x20image\x0a\x09\x09\x09var\x20url\x20=\x20'data:image/png;base64,'\x20+\x20m.substr(6);\x0a\x09\x09\x09var\x20img\x20=\x20document.createElement('img');\x0a\x09\x09\x09img.src\x20=\x20url;\x0a\x09\x09\x09el.appendChild(img);\x0a\x09\x09\x09return;\x0a\x09\x09}\x0a\x0a\x09\x09//\x20^L\x20clears\x20the\x20screen.\x0a\x09\x09var\x20s\x20=\x20m.split('\\x0c');\x0a\x09\x09if\x20(s.length\x20>\x201)\x20{\x0a\x09\x09\x09el.innerHTML\x20=\x20'';\x0a\x09\x09\x09m\x20=\x20s.pop();\x0a\x09\x09}\x0a\x0a\x09\x09m\x20=\x20m.replace(/&/g,\x20'&amp;');\x0a\x09\x09m\x20=\x20m.replace(/</g,\x20'&lt;');\x0a\x09\x09m\x20=\x20m.replace(/>/g,\x20'&gt;');\x0a\x0a\x09\x09var\x20needScroll\x20=\x20(el.scrollTop\x20+\x20el.offsetHeight)\x20==\x20el.scrollHeight;\x0a\x0a\x09\x09var\x20span\x20=\x20document.createElement('span');\x0a\x09\x09span.className\x20=\x20cl;\x0a\x09\x09span.innerHTML\x20=\x20m;\x0a\x09\x09el.appendChild(span);\x0a\x0a\x09\x09if\x20(needScroll)\x0a\x09\x09\x09el.scrollTop\x20=\x20el.scrollHeight\x20-\x20el.offsetHeight;\x0a\x09};\x0a}\x0a\x0a(function()\x20{\x0a\x20\x20function\x20lineHighlight(error)\x20{\x0a\x20\x20\x20\x20var\x20regex\x20=\x20/prog.go:([0-9]+)/g;\x0a\x20\x20\x20\x20var\x20r\x20=\x20regex.exec(error);\x0a\x20\x20\x20\x20while\x20(r)\x20{\x0a\x20\x20\x20\x20\x20\x20$(\".lines\x20div\").eq(r[1]-1).addClass(\"lineerror\");\x0a\x20\x20\x20\x20\x20\x20r\x20=\x20regex.exec(error);\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x20\x20function\x20highlightOutput(wrappedOutput)\x20{\x0a\x20\x20\x20\x20return\x20function(write)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(write.Body)\x20lineHighlight(write.Body);\x0a\x20\x20\x20\x20\x20\x20wrappedOutput(write);\x0a\x20\x20\x20\x20};\x0a\x20\x20}\x0a\x20\x20function\x20lineClear()\x20{\x0a\x20\x20\x20\x20$(\".lineerror\").removeClass(\"lineerror\");\x0a\x20\x20}\x0a\x0a\x20\x20//\x20opts\x20is\x20an\x20object\x20with\x20these\x20keys\x0a\x20\x20//\x20\x20codeEl\x20-\x20code\x20editor\x20element\x0a\x20\x20//\x20\x20outputEl\x20-\x20program\x20output\x20element\x0a\x20\x20//\x20\x20runEl\x20-\x20run\x20button\x20element\x0a\x20\x20//\x20\x20fmtEl\x20-\x20fmt\x20button\x20element\x20(optional)\x0a\x20\x20//\x20\x20fmtImportEl\x20-\x20fmt\x20\"imports\"\x20checkbox\x20element\x20(optional)\x0a\x20\x20//\x20\x20shareEl\x20-\x20share\x20button\x20element\x20(optional)\x0a\x20\x20//\x20\x20shareURLEl\x20-\x20share\x20URL\x20text\x20input\x20element\x20(optional)\x0a\x20\x20//\x20\x20shareRedirect\x20-\x20base\x20URL\x20to\x20redirect\x20to\x20on\x20share\x20(optional)\x0a\x20\x20//\x20\x20toysEl\x20-\x20toys\x20select\x20element\x20(optional)\x0a\x20\x20//\x20\x20enableHistory\x20-\x20enable\x20using\x20HTML5\x20history\x20API\x20(optional)\x0a\x20\x20//\x20\x20transport\x20-\x20playground\x20transport\x20to\x20use\x20(default\x20is\x20HTTPTransport)\x0a\x20\x20//\x20\x20enableShortcuts\x20-\x20whether\x20to\x20enable\x20shortcuts\x20(Ctrl+S/Cmd+S\x20to\x20save)\x20(default\x20is\x20false)\x0a\x20\x20//\x20\x20enableVet\x20-\x20enable\x20running\x20vet\x20and\x20displaying\x20its\x20errors\x0a\x20\x20function\x20playground(opts)\x20{\x0a\x20\x20\x20\x20var\x20code\x20=\x20$(opts.codeEl);\x0a\x20\x20\x20\x20var\x20transport\x20=\x20opts['transport']\x20||\x20new\x20HTTPTransport(opts['enableVet']);\x0a\x20\x20\x20\x20var\x20running;\x0a\x0a\x20\x20\x20\x20//\x20autoindent\x20helpers.\x0a\x20\x20\x20\x20function\x20insertTabs(n)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20find\x20the\x20selection\x20start\x20and\x20end\x0a\x20\x20\x20\x20\x20\x20var\x20start\x20=\x20code[0].selectionStart;\x0a\x20\x20\x20\x20\x20\x20var\x20end\x20\x20\x20=\x20code[0].selectionEnd;\x0a\x20\x20\x20\x20\x20\x20//\x20split\x20the\x20textarea\x20content\x20into\x20two,\x20and\x20insert\x20n\x20tabs\x0a\x20\x20\x20\x20\x20\x20var\x20v\x20=\x20code[0].value;\x0a\x20\x20\x20\x20\x20\x20var\x20u\x20=\x20v.substr(0,\x20start);\x0a\x20\x20\x20\x20\x20\x20for\x20(var\x20i=0;\x20i<n;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20u\x20+=\x20\"\\t\";\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20u\x20+=\x20v.substr(end);\x0a\x20\x20\x20\x20\x20\x20//\x20set\x20revised\x20content\x0a\x20\x20\x20\x20\x20\x20code[0].value\x20=\x20u;\x0a\x20\x20\x20\x20\x20\x20//\x20reset\x20caret\x20position\x20after\x20inserted\x20tabs\x0a\x20\x20\x20\x20\x20\x20code[0].selectionStart\x20=\x20start+n;\x0a\x20\x20\x20\x20\x20\x20code[0].selectionEnd\x20=\x20start+n;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20autoindent(el)\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20curpos\x20=\x20el.selectionStart;\x0a\x20\x20\x20\x20\x20\x20var\x20tabs\x20=\x200;\x0a\x20\x20\x20\x20\x20\x20while\x20(curpos\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20curpos--;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(el.value[curpos]\x20==\x20\"\\t\")\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tabs++;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(tabs\x20>\x200\x20||\x20el.value[curpos]\x20==\x20\"\\n\")\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20break;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20setTimeout(function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20insertTabs(tabs);\x0a\x20\x20\x20\x20\x20\x20},\x201);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20//\x20NOTE(cbro):\x20e\x20is\x20a\x20jQuery\x20event,\x20not\x20a\x20DOM\x20event.\x0a\x20\x20\x20\x20function\x20handleSaveShortcut(e)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(e.isDefaultPrevented())\x20return\x20false;\x0a\x20\x20\x20\x20\x20\x20if\x20(!e.metaKey\x20&&\x20!e.ctrlKey)\x20return\x20false;\x0a\x20\x20\x20\x20\x20\x20if\x20(e.key\x20!=\x20\"S\"\x20&&\x20e.key\x20!=\x20\"s\")\x20return\x20false;\x0a\x0a\x20\x20\x20\x20\x20\x20e.preventDefault();\x0a\x0a\x20\x20\x20\x20\x20\x20//\x20Share\x20and\x20save\x0a\x20\x20\x20\x20\x20\x20share(function(url)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20window.location.href\x20=\x20url\x20+\x20\".go?download=true\";\x0a\x20\x20\x20\x20\x20\x20});\x0a\x0a\x20\x20\x20\x20\x20\x20return\x20true;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20function\x20keyHandler(e)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(opts.enableShortcuts\x20&&\x20handleSaveShortcut(e))\x20return;\x0a\x0a\x20\x20\x20\x20\x20\x20if\x20(e.keyCode\x20==\x209\x20&&\x20!e.ctrlKey)\x20{\x20//\x20tab\x20(but\x20not\x20ctrl-tab)\x0a\x20\x20\x20\x20\x20\x20\x20\x20insertTabs(1);\x0a\x20\x20\x20\x20\x20\x20\x20\x20e.preventDefault();\x0a\x20\x20\x20\x20\x20\x20\x20\x20return\x20false;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20if\x20(e.keyCode\x20==\x2013)\x20{\x20//\x20enter\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(e.shiftKey)\x20{\x20//\x20+shift\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20run();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20e.preventDefault();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20false;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20if\x20(e.ctrlKey)\x20{\x20//\x20+control\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fmt();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20e.preventDefault();\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20autoindent(e.target);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20return\x20true;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20code.unbind('keydown').bind('keydown',\x20keyHandler);\x0a\x20\x20\x20\x20var\x20outdiv\x20=\x20$(opts.outputEl).empty();\x0a\x20\x20\x20\x20var\x20output\x20=\x20$('<pre/>').appendTo(outdiv);\x0a\x0a\x20\x20\x20\x20function\x20body()\x20{\x0a\x20\x20\x20\x20\x20\x20return\x20$(opts.codeEl).val();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20setBody(text)\x20{\x0a\x20\x20\x20\x20\x20\x20$(opts.codeEl).val(text);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20origin(href)\x20{\x0a\x20\x20\x20\x20\x20\x20return\x20(\"\"+href).split(\"/\").slice(0,\x203).join(\"/\");\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20pushedEmpty\x20=\x20(window.location.pathname\x20==\x20\"/\");\x0a\x20\x20\x20\x20function\x20inputChanged()\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(pushedEmpty)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20pushedEmpty\x20=\x20true;\x0a\x20\x20\x20\x20\x20\x20$(opts.shareURLEl).hide();\x0a\x20\x20\x20\x20\x20\x20window.history.pushState(null,\x20\"\",\x20\"/\");\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20popState(e)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(e\x20===\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20if\x20(e\x20&&\x20e.state\x20&&\x20e.state.code)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20setBody(e.state.code);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20var\x20rewriteHistory\x20=\x20false;\x0a\x20\x20\x20\x20if\x20(window.history\x20&&\x20window.history.pushState\x20&&\x20window.addEventListener\x20&&\x20opts.enableHistory)\x20{\x0a\x20\x20\x20\x20\x20\x20rewriteHistory\x20=\x20true;\x0a\x20\x20\x20\x20\x20\x20code[0].addEventListener('input',\x20inputChanged);\x0a\x20\x20\x20\x20\x20\x20window.addEventListener('popstate',\x20popState);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20function\x20setError(error)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(running)\x20running.Kill();\x0a\x20\x20\x20\x20\x20\x20lineClear();\x0a\x20\x20\x20\x20\x20\x20lineHighlight(error);\x0a\x20\x20\x20\x20\x20\x20output.empty().addClass(\"error\").text(error);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20loading()\x20{\x0a\x20\x20\x20\x20\x20\x20lineClear();\x0a\x20\x20\x20\x20\x20\x20if\x20(running)\x20running.Kill();\x0a\x20\x20\x20\x20\x20\x20output.removeClass(\"error\").text('Waiting\x20for\x20remote\x20server...');\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20run()\x20{\x0a\x20\x20\x20\x20\x20\x20loading();\x0a\x20\x20\x20\x20\x20\x20running\x20=\x20transport.Run(body(),\x20highlightOutput(PlaygroundOutput(output[0])));\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20function\x20fmt()\x20{\x0a\x20\x20\x20\x20\x20\x20loading();\x0a\x20\x20\x20\x20\x20\x20var\x20data\x20=\x20{\"body\":\x20body()};\x0a\x20\x20\x20\x20\x20\x20if\x20($(opts.fmtImportEl).is(\":checked\"))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20data[\"imports\"]\x20=\x20\"true\";\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20$.ajax(\"/fmt\",\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20data:\x20data,\x0a\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\"POST\",\x0a\x20\x20\x20\x20\x20\x20\x20\x20dataType:\x20\"json\",\x0a\x20\x20\x20\x20\x20\x20\x20\x20success:\x20function(data)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(data.Error)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setError(data.Error);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setBody(data.Body);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setError(\"\");\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20shareURL;\x20//\x20jQuery\x20element\x20to\x20show\x20the\x20shared\x20URL.\x0a\x20\x20\x20\x20var\x20sharing\x20=\x20false;\x20//\x20true\x20if\x20there\x20is\x20a\x20pending\x20request.\x0a\x20\x20\x20\x20var\x20shareCallbacks\x20=\x20[];\x0a\x20\x20\x20\x20function\x20share(opt_callback)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(opt_callback)\x20shareCallbacks.push(opt_callback);\x0a\x0a\x20\x20\x20\x20\x20\x20if\x20(sharing)\x20return;\x0a\x20\x20\x20\x20\x20\x20sharing\x20=\x20true;\x0a\x0a\x20\x20\x20\x20\x20\x20var\x20sharingData\x20=\x20body();\x0a\x20\x20\x20\x20\x20\x20$.ajax(\"/share\",\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20processData:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20data:\x20sharingData,\x0a\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\"POST\",\x0a\x20\x20\x20\x20\x20\x20\x20\x20contentType:\x20\"text/plain;\x20charset=utf-8\",\x0a\x20\x20\x20\x20\x20\x20\x20\x20complete:\x20function(xhr)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20sharing\x20=\x20false;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(xhr.status\x20!=\x20200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20alert(\"Server\x20error;\x20try\x20again.\");\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(opts.shareRedirect)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.location\x20=\x20opts.shareRedirect\x20+\x20xhr.responseText;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20var\x20path\x20=\x20\"/p/\"\x20+\x20xhr.responseText;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20var\x20url\x20=\x20origin(window.location)\x20+\x20path;\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20shareCallbacks.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20shareCallbacks[i](url);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20shareCallbacks\x20=\x20[];\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(shareURL)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20shareURL.show().val(url).focus().select();\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(rewriteHistory)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20var\x20historyData\x20=\x20{\"code\":\x20sharingData};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.history.pushState(historyData,\x20\"\",\x20path);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20pushedEmpty\x20=\x20false;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20$(opts.runEl).click(run);\x0a\x20\x20\x20\x20$(opts.fmtEl).click(fmt);\x0a\x0a\x20\x20\x20\x20if\x20(opts.shareEl\x20!==\x20null\x20&&\x20(opts.shareURLEl\x20!==\x20null\x20||\x20opts.shareRedirect\x20!==\x20null))\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(opts.shareURLEl)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20shareURL\x20=\x20$(opts.shareURLEl).hide();\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20$(opts.shareEl).click(function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20share();\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(opts.toysEl\x20!==\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20$(opts.toysEl).bind('change',\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20toy\x20=\x20$(this).val();\x0a\x20\x20\x20\x20\x20\x20\x20\x20$.ajax(\"/doc/play/\"+toy,\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processData:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\"GET\",\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20complete:\x20function(xhr)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(xhr.status\x20!=\x20200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20alert(\"Server\x20error;\x20try\x20again.\");\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setBody(xhr.responseText);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x0a\x20\x20window.playground\x20=\x20playground;\x0a})();\x0a",
+	"playground.js": "//\x20Copyright\x202012\x20The\x20Go\x20Authors.\x20All\x20rights\x20reserved.\x0a//\x20Use\x20of\x20this\x20source\x20code\x20is\x20governed\x20by\x20a\x20BSD-style\x0a//\x20license\x20that\x20can\x20be\x20found\x20in\x20the\x20LICENSE\x20file.\x0a\x0a/*\x0aIn\x20the\x20absence\x20of\x20any\x20formal\x20way\x20to\x20specify\x20interfaces\x20in\x20JavaScript,\x0ahere's\x20a\x20skeleton\x20implementation\x20of\x20a\x20playground\x20transport.\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20function\x20Transport()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Set\x20up\x20any\x20transport\x20state\x20(eg,\x20make\x20a\x20websocket\x20connection).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run:\x20function(body,\x20output,\x20options)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Compile\x20and\x20run\x20the\x20program\x20'body'\x20with\x20'options'.\x0a\x09\x09\x09\x09//\x20Call\x20the\x20'output'\x20callback\x20to\x20display\x20program\x20output.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Kill:\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Kill\x20the\x20running\x20program.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x09//\x20The\x20output\x20callback\x20is\x20called\x20multiple\x20times,\x20and\x20each\x20time\x20it\x20is\x0a\x09//\x20passed\x20an\x20object\x20of\x20this\x20form.\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20write\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Kind:\x20'string',\x20//\x20'start',\x20'stdout',\x20'stderr',\x20'end'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Body:\x20'string'\x20\x20//\x20content\x20of\x20write\x20or\x20end\x20status\x20message\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x09//\x20The\x20first\x20call\x20must\x20be\x20of\x20Kind\x20'start'\x20with\x20no\x20body.\x0a\x09//\x20Subsequent\x20calls\x20may\x20be\x20of\x20Kind\x20'stdout'\x20or\x20'stderr'\x0a\x09//\x20and\x20must\x20have\x20a\x20non-null\x20Body\x20string.\x0a\x09//\x20The\x20final\x20call\x20should\x20be\x20of\x20Kind\x20'end'\x20with\x20an\x20optional\x0a\x09//\x20Body\x20string,\x20signifying\x20a\x20failure\x20(\"killed\",\x20for\x20example).\x0a\x0a\x09//\x20The\x20output\x20callback\x20must\x20be\x20of\x20this\x20form.\x0a\x09//\x20See\x20PlaygroundOutput\x20(below)\x20for\x20an\x20implementation.\x0a\x20\x20\x20\x20\x20\x20\x20\x20function\x20outputCallback(write)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a*/\x0a\x0a//\x20HTTPTransport\x20is\x20the\x20default\x20transport.\x0a//\x20enableVet\x20enables\x20running\x20vet\x20if\x20a\x20program\x20was\x20compiled\x20and\x20ran\x20successfully.\x0a//\x20If\x20vet\x20returned\x20any\x20errors,\x20display\x20them\x20before\x20the\x20output\x20of\x20a\x20program.\x0afunction\x20HTTPTransport(enableVet)\x20{\x0a\x20\x20'use\x20strict';\x0a\x0a\x20\x20function\x20playback(output,\x20data)\x20{\x0a\x20\x20\x20\x20//\x20Backwards\x20compatibility:\x20default\x20values\x20do\x20not\x20affect\x20the\x20output.\x0a\x20\x20\x20\x20var\x20events\x20=\x20data.Events\x20||\x20[];\x0a\x20\x20\x20\x20var\x20errors\x20=\x20data.Errors\x20||\x20'';\x0a\x20\x20\x20\x20var\x20status\x20=\x20data.Status\x20||\x200;\x0a\x20\x20\x20\x20var\x20isTest\x20=\x20data.IsTest\x20||\x20false;\x0a\x20\x20\x20\x20var\x20testsFailed\x20=\x20data.TestsFailed\x20||\x200;\x0a\x0a\x20\x20\x20\x20var\x20timeout;\x0a\x20\x20\x20\x20output({\x20Kind:\x20'start'\x20});\x0a\x20\x20\x20\x20function\x20next()\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(!events\x20||\x20events.length\x20===\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(isTest)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(testsFailed\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20output({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Kind:\x20'system',\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Body:\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'\\n'\x20+\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20testsFailed\x20+\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'\x20test'\x20+\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(testsFailed\x20>\x201\x20?\x20's'\x20:\x20'')\x20+\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'\x20failed.',\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20output({\x20Kind:\x20'system',\x20Body:\x20'\\nAll\x20tests\x20passed.'\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(status\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20output({\x20Kind:\x20'end',\x20Body:\x20'status\x20'\x20+\x20status\x20+\x20'.'\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(errors\x20!==\x20'')\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20errors\x20are\x20displayed\x20only\x20in\x20the\x20case\x20of\x20timeout.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20output({\x20Kind:\x20'end',\x20Body:\x20errors\x20+\x20'.'\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20output({\x20Kind:\x20'end'\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20var\x20e\x20=\x20events.shift();\x0a\x20\x20\x20\x20\x20\x20if\x20(e.Delay\x20===\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20output({\x20Kind:\x20e.Kind,\x20Body:\x20e.Message\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20next();\x0a\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20timeout\x20=\x20setTimeout(function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20output({\x20Kind:\x20e.Kind,\x20Body:\x20e.Message\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20next();\x0a\x20\x20\x20\x20\x20\x20},\x20e.Delay\x20/\x201000000);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20next();\x0a\x20\x20\x20\x20return\x20{\x0a\x20\x20\x20\x20\x20\x20Stop:\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearTimeout(timeout);\x0a\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20};\x0a\x20\x20}\x0a\x0a\x20\x20function\x20error(output,\x20msg)\x20{\x0a\x20\x20\x20\x20output({\x20Kind:\x20'start'\x20});\x0a\x20\x20\x20\x20output({\x20Kind:\x20'stderr',\x20Body:\x20msg\x20});\x0a\x20\x20\x20\x20output({\x20Kind:\x20'end'\x20});\x0a\x20\x20}\x0a\x0a\x20\x20function\x20buildFailed(output,\x20msg)\x20{\x0a\x20\x20\x20\x20output({\x20Kind:\x20'start'\x20});\x0a\x20\x20\x20\x20output({\x20Kind:\x20'stderr',\x20Body:\x20msg\x20});\x0a\x20\x20\x20\x20output({\x20Kind:\x20'system',\x20Body:\x20'\\nGo\x20build\x20failed.'\x20});\x0a\x20\x20}\x0a\x0a\x20\x20var\x20seq\x20=\x200;\x0a\x20\x20return\x20{\x0a\x20\x20\x20\x20Run:\x20function(body,\x20output,\x20options)\x20{\x0a\x20\x20\x20\x20\x20\x20seq++;\x0a\x20\x20\x20\x20\x20\x20var\x20cur\x20=\x20seq;\x0a\x20\x20\x20\x20\x20\x20var\x20playing;\x0a\x20\x20\x20\x20\x20\x20$.ajax('/compile',\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20type:\x20'POST',\x0a\x20\x20\x20\x20\x20\x20\x20\x20data:\x20{\x20version:\x202,\x20body:\x20body\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20dataType:\x20'json',\x0a\x20\x20\x20\x20\x20\x20\x20\x20success:\x20function(data)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(seq\x20!=\x20cur)\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!data)\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(playing\x20!=\x20null)\x20playing.Stop();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(data.Errors)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(data.Errors\x20===\x20'process\x20took\x20too\x20long')\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Playback\x20the\x20output\x20that\x20was\x20captured\x20before\x20the\x20timeout.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20playing\x20=\x20playback(output,\x20data);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20buildFailed(output,\x20data.Errors);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!enableVet)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20playing\x20=\x20playback(output,\x20data);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20$.ajax('/vet',\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20data:\x20{\x20body:\x20body\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20'POST',\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20dataType:\x20'json',\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20success:\x20function(dataVet)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(dataVet.Errors)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!data.Events)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20data.Events\x20=\x20[];\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20inject\x20errors\x20from\x20the\x20vet\x20as\x20the\x20first\x20events\x20in\x20the\x20output\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20data.Events.unshift({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Message:\x20'Go\x20vet\x20exited.\\n\\n',\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Kind:\x20'system',\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delay:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20data.Events.unshift({\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Message:\x20dataVet.Errors,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Kind:\x20'stderr',\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delay:\x200,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20playing\x20=\x20playback(output,\x20data);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20error:\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20playing\x20=\x20playback(output,\x20data);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20error:\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20error(output,\x20'Error\x20communicating\x20with\x20remote\x20server.');\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20\x20\x20return\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20Kill:\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(playing\x20!=\x20null)\x20playing.Stop();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20output({\x20Kind:\x20'end',\x20Body:\x20'killed'\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20},\x0a\x20\x20};\x0a}\x0a\x0afunction\x20SocketTransport()\x20{\x0a\x20\x20'use\x20strict';\x0a\x0a\x20\x20var\x20id\x20=\x200;\x0a\x20\x20var\x20outputs\x20=\x20{};\x0a\x20\x20var\x20started\x20=\x20{};\x0a\x20\x20var\x20websocket;\x0a\x20\x20if\x20(window.location.protocol\x20==\x20'http:')\x20{\x0a\x20\x20\x20\x20websocket\x20=\x20new\x20WebSocket('ws://'\x20+\x20window.location.host\x20+\x20'/socket');\x0a\x20\x20}\x20else\x20if\x20(window.location.protocol\x20==\x20'https:')\x20{\x0a\x20\x20\x20\x20websocket\x20=\x20new\x20WebSocket('wss://'\x20+\x20window.location.host\x20+\x20'/socket');\x0a\x20\x20}\x0a\x0a\x20\x20websocket.onclose\x20=\x20function()\x20{\x0a\x20\x20\x20\x20console.log('websocket\x20connection\x20closed');\x0a\x20\x20};\x0a\x0a\x20\x20websocket.onmessage\x20=\x20function(e)\x20{\x0a\x20\x20\x20\x20var\x20m\x20=\x20JSON.parse(e.data);\x0a\x20\x20\x20\x20var\x20output\x20=\x20outputs[m.Id];\x0a\x20\x20\x20\x20if\x20(output\x20===\x20null)\x20return;\x0a\x20\x20\x20\x20if\x20(!started[m.Id])\x20{\x0a\x20\x20\x20\x20\x20\x20output({\x20Kind:\x20'start'\x20});\x0a\x20\x20\x20\x20\x20\x20started[m.Id]\x20=\x20true;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20output({\x20Kind:\x20m.Kind,\x20Body:\x20m.Body\x20});\x0a\x20\x20};\x0a\x0a\x20\x20function\x20send(m)\x20{\x0a\x20\x20\x20\x20websocket.send(JSON.stringify(m));\x0a\x20\x20}\x0a\x0a\x20\x20return\x20{\x0a\x20\x20\x20\x20Run:\x20function(body,\x20output,\x20options)\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20thisID\x20=\x20id\x20+\x20'';\x0a\x20\x20\x20\x20\x20\x20id++;\x0a\x20\x20\x20\x20\x20\x20outputs[thisID]\x20=\x20output;\x0a\x20\x20\x20\x20\x20\x20send({\x20Id:\x20thisID,\x20Kind:\x20'run',\x20Body:\x20body,\x20Options:\x20options\x20});\x0a\x20\x20\x20\x20\x20\x20return\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20Kill:\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20send({\x20Id:\x20thisID,\x20Kind:\x20'kill'\x20});\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20},\x0a\x20\x20};\x0a}\x0a\x0afunction\x20PlaygroundOutput(el)\x20{\x0a\x20\x20'use\x20strict';\x0a\x0a\x20\x20return\x20function(write)\x20{\x0a\x20\x20\x20\x20if\x20(write.Kind\x20==\x20'start')\x20{\x0a\x20\x20\x20\x20\x20\x20el.innerHTML\x20=\x20'';\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20cl\x20=\x20'system';\x0a\x20\x20\x20\x20if\x20(write.Kind\x20==\x20'stdout'\x20||\x20write.Kind\x20==\x20'stderr')\x20cl\x20=\x20write.Kind;\x0a\x0a\x20\x20\x20\x20var\x20m\x20=\x20write.Body;\x0a\x20\x20\x20\x20if\x20(write.Kind\x20==\x20'end')\x20{\x0a\x20\x20\x20\x20\x20\x20m\x20=\x20'\\nProgram\x20exited'\x20+\x20(m\x20?\x20':\x20'\x20+\x20m\x20:\x20'.');\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(m.indexOf('IMAGE:')\x20===\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20TODO(adg):\x20buffer\x20all\x20writes\x20before\x20creating\x20image\x0a\x20\x20\x20\x20\x20\x20var\x20url\x20=\x20'data:image/png;base64,'\x20+\x20m.substr(6);\x0a\x20\x20\x20\x20\x20\x20var\x20img\x20=\x20document.createElement('img');\x0a\x20\x20\x20\x20\x20\x20img.src\x20=\x20url;\x0a\x20\x20\x20\x20\x20\x20el.appendChild(img);\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20//\x20^L\x20clears\x20the\x20screen.\x0a\x20\x20\x20\x20var\x20s\x20=\x20m.split('\\x0c');\x0a\x20\x20\x20\x20if\x20(s.length\x20>\x201)\x20{\x0a\x20\x20\x20\x20\x20\x20el.innerHTML\x20=\x20'';\x0a\x20\x20\x20\x20\x20\x20m\x20=\x20s.pop();\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20m\x20=\x20m.replace(/&/g,\x20'&amp;');\x0a\x20\x20\x20\x20m\x20=\x20m.replace(/</g,\x20'&lt;');\x0a\x20\x20\x20\x20m\x20=\x20m.replace(/>/g,\x20'&gt;');\x0a\x0a\x20\x20\x20\x20var\x20needScroll\x20=\x20el.scrollTop\x20+\x20el.offsetHeight\x20==\x20el.scrollHeight;\x0a\x0a\x20\x20\x20\x20var\x20span\x20=\x20document.createElement('span');\x0a\x20\x20\x20\x20span.className\x20=\x20cl;\x0a\x20\x20\x20\x20span.innerHTML\x20=\x20m;\x0a\x20\x20\x20\x20el.appendChild(span);\x0a\x0a\x20\x20\x20\x20if\x20(needScroll)\x20el.scrollTop\x20=\x20el.scrollHeight\x20-\x20el.offsetHeight;\x0a\x20\x20};\x0a}\x0a\x0a(function()\x20{\x0a\x20\x20function\x20lineHighlight(error)\x20{\x0a\x20\x20\x20\x20var\x20regex\x20=\x20/prog.go:([0-9]+)/g;\x0a\x20\x20\x20\x20var\x20r\x20=\x20regex.exec(error);\x0a\x20\x20\x20\x20while\x20(r)\x20{\x0a\x20\x20\x20\x20\x20\x20$('.lines\x20div')\x0a\x20\x20\x20\x20\x20\x20\x20\x20.eq(r[1]\x20-\x201)\x0a\x20\x20\x20\x20\x20\x20\x20\x20.addClass('lineerror');\x0a\x20\x20\x20\x20\x20\x20r\x20=\x20regex.exec(error);\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x20\x20function\x20highlightOutput(wrappedOutput)\x20{\x0a\x20\x20\x20\x20return\x20function(write)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(write.Body)\x20lineHighlight(write.Body);\x0a\x20\x20\x20\x20\x20\x20wrappedOutput(write);\x0a\x20\x20\x20\x20};\x0a\x20\x20}\x0a\x20\x20function\x20lineClear()\x20{\x0a\x20\x20\x20\x20$('.lineerror').removeClass('lineerror');\x0a\x20\x20}\x0a\x0a\x20\x20//\x20opts\x20is\x20an\x20object\x20with\x20these\x20keys\x0a\x20\x20//\x20\x20codeEl\x20-\x20code\x20editor\x20element\x0a\x20\x20//\x20\x20outputEl\x20-\x20program\x20output\x20element\x0a\x20\x20//\x20\x20runEl\x20-\x20run\x20button\x20element\x0a\x20\x20//\x20\x20fmtEl\x20-\x20fmt\x20button\x20element\x20(optional)\x0a\x20\x20//\x20\x20fmtImportEl\x20-\x20fmt\x20\"imports\"\x20checkbox\x20element\x20(optional)\x0a\x20\x20//\x20\x20shareEl\x20-\x20share\x20button\x20element\x20(optional)\x0a\x20\x20//\x20\x20shareURLEl\x20-\x20share\x20URL\x20text\x20input\x20element\x20(optional)\x0a\x20\x20//\x20\x20shareRedirect\x20-\x20base\x20URL\x20to\x20redirect\x20to\x20on\x20share\x20(optional)\x0a\x20\x20//\x20\x20toysEl\x20-\x20toys\x20select\x20element\x20(optional)\x0a\x20\x20//\x20\x20enableHistory\x20-\x20enable\x20using\x20HTML5\x20history\x20API\x20(optional)\x0a\x20\x20//\x20\x20transport\x20-\x20playground\x20transport\x20to\x20use\x20(default\x20is\x20HTTPTransport)\x0a\x20\x20//\x20\x20enableShortcuts\x20-\x20whether\x20to\x20enable\x20shortcuts\x20(Ctrl+S/Cmd+S\x20to\x20save)\x20(default\x20is\x20false)\x0a\x20\x20//\x20\x20enableVet\x20-\x20enable\x20running\x20vet\x20and\x20displaying\x20its\x20errors\x0a\x20\x20function\x20playground(opts)\x20{\x0a\x20\x20\x20\x20var\x20code\x20=\x20$(opts.codeEl);\x0a\x20\x20\x20\x20var\x20transport\x20=\x20opts['transport']\x20||\x20new\x20HTTPTransport(opts['enableVet']);\x0a\x20\x20\x20\x20var\x20running;\x0a\x0a\x20\x20\x20\x20//\x20autoindent\x20helpers.\x0a\x20\x20\x20\x20function\x20insertTabs(n)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20find\x20the\x20selection\x20start\x20and\x20end\x0a\x20\x20\x20\x20\x20\x20var\x20start\x20=\x20code[0].selectionStart;\x0a\x20\x20\x20\x20\x20\x20var\x20end\x20=\x20code[0].selectionEnd;\x0a\x20\x20\x20\x20\x20\x20//\x20split\x20the\x20textarea\x20content\x20into\x20two,\x20and\x20insert\x20n\x20tabs\x0a\x20\x20\x20\x20\x20\x20var\x20v\x20=\x20code[0].value;\x0a\x20\x20\x20\x20\x20\x20var\x20u\x20=\x20v.substr(0,\x20start);\x0a\x20\x20\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20n;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20u\x20+=\x20'\\t';\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20u\x20+=\x20v.substr(end);\x0a\x20\x20\x20\x20\x20\x20//\x20set\x20revised\x20content\x0a\x20\x20\x20\x20\x20\x20code[0].value\x20=\x20u;\x0a\x20\x20\x20\x20\x20\x20//\x20reset\x20caret\x20position\x20after\x20inserted\x20tabs\x0a\x20\x20\x20\x20\x20\x20code[0].selectionStart\x20=\x20start\x20+\x20n;\x0a\x20\x20\x20\x20\x20\x20code[0].selectionEnd\x20=\x20start\x20+\x20n;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20autoindent(el)\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20curpos\x20=\x20el.selectionStart;\x0a\x20\x20\x20\x20\x20\x20var\x20tabs\x20=\x200;\x0a\x20\x20\x20\x20\x20\x20while\x20(curpos\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20curpos--;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(el.value[curpos]\x20==\x20'\\t')\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tabs++;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(tabs\x20>\x200\x20||\x20el.value[curpos]\x20==\x20'\\n')\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20break;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20setTimeout(function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20insertTabs(tabs);\x0a\x20\x20\x20\x20\x20\x20},\x201);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20//\x20NOTE(cbro):\x20e\x20is\x20a\x20jQuery\x20event,\x20not\x20a\x20DOM\x20event.\x0a\x20\x20\x20\x20function\x20handleSaveShortcut(e)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(e.isDefaultPrevented())\x20return\x20false;\x0a\x20\x20\x20\x20\x20\x20if\x20(!e.metaKey\x20&&\x20!e.ctrlKey)\x20return\x20false;\x0a\x20\x20\x20\x20\x20\x20if\x20(e.key\x20!=\x20'S'\x20&&\x20e.key\x20!=\x20's')\x20return\x20false;\x0a\x0a\x20\x20\x20\x20\x20\x20e.preventDefault();\x0a\x0a\x20\x20\x20\x20\x20\x20//\x20Share\x20and\x20save\x0a\x20\x20\x20\x20\x20\x20share(function(url)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20window.location.href\x20=\x20url\x20+\x20'.go?download=true';\x0a\x20\x20\x20\x20\x20\x20});\x0a\x0a\x20\x20\x20\x20\x20\x20return\x20true;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20function\x20keyHandler(e)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(opts.enableShortcuts\x20&&\x20handleSaveShortcut(e))\x20return;\x0a\x0a\x20\x20\x20\x20\x20\x20if\x20(e.keyCode\x20==\x209\x20&&\x20!e.ctrlKey)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20tab\x20(but\x20not\x20ctrl-tab)\x0a\x20\x20\x20\x20\x20\x20\x20\x20insertTabs(1);\x0a\x20\x20\x20\x20\x20\x20\x20\x20e.preventDefault();\x0a\x20\x20\x20\x20\x20\x20\x20\x20return\x20false;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20if\x20(e.keyCode\x20==\x2013)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20enter\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(e.shiftKey)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20+shift\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20run();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20e.preventDefault();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20false;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(e.ctrlKey)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20+control\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fmt();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20e.preventDefault();\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20autoindent(e.target);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20return\x20true;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20code.unbind('keydown').bind('keydown',\x20keyHandler);\x0a\x20\x20\x20\x20var\x20outdiv\x20=\x20$(opts.outputEl).empty();\x0a\x20\x20\x20\x20var\x20output\x20=\x20$('<pre/>').appendTo(outdiv);\x0a\x0a\x20\x20\x20\x20function\x20body()\x20{\x0a\x20\x20\x20\x20\x20\x20return\x20$(opts.codeEl).val();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20setBody(text)\x20{\x0a\x20\x20\x20\x20\x20\x20$(opts.codeEl).val(text);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20origin(href)\x20{\x0a\x20\x20\x20\x20\x20\x20return\x20(''\x20+\x20href)\x0a\x20\x20\x20\x20\x20\x20\x20\x20.split('/')\x0a\x20\x20\x20\x20\x20\x20\x20\x20.slice(0,\x203)\x0a\x20\x20\x20\x20\x20\x20\x20\x20.join('/');\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20pushedEmpty\x20=\x20window.location.pathname\x20==\x20'/';\x0a\x20\x20\x20\x20function\x20inputChanged()\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(pushedEmpty)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20pushedEmpty\x20=\x20true;\x0a\x20\x20\x20\x20\x20\x20$(opts.shareURLEl).hide();\x0a\x20\x20\x20\x20\x20\x20window.history.pushState(null,\x20'',\x20'/');\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20popState(e)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(e\x20===\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20if\x20(e\x20&&\x20e.state\x20&&\x20e.state.code)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20setBody(e.state.code);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20var\x20rewriteHistory\x20=\x20false;\x0a\x20\x20\x20\x20if\x20(\x0a\x20\x20\x20\x20\x20\x20window.history\x20&&\x0a\x20\x20\x20\x20\x20\x20window.history.pushState\x20&&\x0a\x20\x20\x20\x20\x20\x20window.addEventListener\x20&&\x0a\x20\x20\x20\x20\x20\x20opts.enableHistory\x0a\x20\x20\x20\x20)\x20{\x0a\x20\x20\x20\x20\x20\x20rewriteHistory\x20=\x20true;\x0a\x20\x20\x20\x20\x20\x20code[0].addEventListener('input',\x20inputChanged);\x0a\x20\x20\x20\x20\x20\x20window.addEventListener('popstate',\x20popState);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20function\x20setError(error)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(running)\x20running.Kill();\x0a\x20\x20\x20\x20\x20\x20lineClear();\x0a\x20\x20\x20\x20\x20\x20lineHighlight(error);\x0a\x20\x20\x20\x20\x20\x20output\x0a\x20\x20\x20\x20\x20\x20\x20\x20.empty()\x0a\x20\x20\x20\x20\x20\x20\x20\x20.addClass('error')\x0a\x20\x20\x20\x20\x20\x20\x20\x20.text(error);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20loading()\x20{\x0a\x20\x20\x20\x20\x20\x20lineClear();\x0a\x20\x20\x20\x20\x20\x20if\x20(running)\x20running.Kill();\x0a\x20\x20\x20\x20\x20\x20output.removeClass('error').text('Waiting\x20for\x20remote\x20server...');\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20run()\x20{\x0a\x20\x20\x20\x20\x20\x20loading();\x0a\x20\x20\x20\x20\x20\x20running\x20=\x20transport.Run(\x0a\x20\x20\x20\x20\x20\x20\x20\x20body(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20highlightOutput(PlaygroundOutput(output[0]))\x0a\x20\x20\x20\x20\x20\x20);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20function\x20fmt()\x20{\x0a\x20\x20\x20\x20\x20\x20loading();\x0a\x20\x20\x20\x20\x20\x20var\x20data\x20=\x20{\x20body:\x20body()\x20};\x0a\x20\x20\x20\x20\x20\x20if\x20($(opts.fmtImportEl).is(':checked'))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20data['imports']\x20=\x20'true';\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20$.ajax('/fmt',\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20data:\x20data,\x0a\x20\x20\x20\x20\x20\x20\x20\x20type:\x20'POST',\x0a\x20\x20\x20\x20\x20\x20\x20\x20dataType:\x20'json',\x0a\x20\x20\x20\x20\x20\x20\x20\x20success:\x20function(data)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(data.Error)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setError(data.Error);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setBody(data.Body);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setError('');\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20shareURL;\x20//\x20jQuery\x20element\x20to\x20show\x20the\x20shared\x20URL.\x0a\x20\x20\x20\x20var\x20sharing\x20=\x20false;\x20//\x20true\x20if\x20there\x20is\x20a\x20pending\x20request.\x0a\x20\x20\x20\x20var\x20shareCallbacks\x20=\x20[];\x0a\x20\x20\x20\x20function\x20share(opt_callback)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(opt_callback)\x20shareCallbacks.push(opt_callback);\x0a\x0a\x20\x20\x20\x20\x20\x20if\x20(sharing)\x20return;\x0a\x20\x20\x20\x20\x20\x20sharing\x20=\x20true;\x0a\x0a\x20\x20\x20\x20\x20\x20var\x20sharingData\x20=\x20body();\x0a\x20\x20\x20\x20\x20\x20$.ajax('/share',\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20processData:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20data:\x20sharingData,\x0a\x20\x20\x20\x20\x20\x20\x20\x20type:\x20'POST',\x0a\x20\x20\x20\x20\x20\x20\x20\x20contentType:\x20'text/plain;\x20charset=utf-8',\x0a\x20\x20\x20\x20\x20\x20\x20\x20complete:\x20function(xhr)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20sharing\x20=\x20false;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(xhr.status\x20!=\x20200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20alert('Server\x20error;\x20try\x20again.');\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(opts.shareRedirect)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.location\x20=\x20opts.shareRedirect\x20+\x20xhr.responseText;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20var\x20path\x20=\x20'/p/'\x20+\x20xhr.responseText;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20var\x20url\x20=\x20origin(window.location)\x20+\x20path;\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20shareCallbacks.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20shareCallbacks[i](url);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20shareCallbacks\x20=\x20[];\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(shareURL)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20shareURL\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.show()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.val(url)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.focus()\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.select();\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(rewriteHistory)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20var\x20historyData\x20=\x20{\x20code:\x20sharingData\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.history.pushState(historyData,\x20'',\x20path);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20pushedEmpty\x20=\x20false;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20$(opts.runEl).click(run);\x0a\x20\x20\x20\x20$(opts.fmtEl).click(fmt);\x0a\x0a\x20\x20\x20\x20if\x20(\x0a\x20\x20\x20\x20\x20\x20opts.shareEl\x20!==\x20null\x20&&\x0a\x20\x20\x20\x20\x20\x20(opts.shareURLEl\x20!==\x20null\x20||\x20opts.shareRedirect\x20!==\x20null)\x0a\x20\x20\x20\x20)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(opts.shareURLEl)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20shareURL\x20=\x20$(opts.shareURLEl).hide();\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20$(opts.shareEl).click(function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20share();\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(opts.toysEl\x20!==\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20$(opts.toysEl).bind('change',\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20toy\x20=\x20$(this).val();\x0a\x20\x20\x20\x20\x20\x20\x20\x20$.ajax('/doc/play/'\x20+\x20toy,\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processData:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20'GET',\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20complete:\x20function(xhr)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(xhr.status\x20!=\x20200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20alert('Server\x20error;\x20try\x20again.');\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setBody(xhr.responseText);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20},\x0a\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x0a\x20\x20window.playground\x20=\x20playground;\x0a})();\x0a",
 
 	"search.html": "<!--\x0a\x09Copyright\x202009\x20The\x20Go\x20Authors.\x20All\x20rights\x20reserved.\x0a\x09Use\x20of\x20this\x20source\x20code\x20is\x20governed\x20by\x20a\x20BSD-style\x0a\x09license\x20that\x20can\x20be\x20found\x20in\x20the\x20LICENSE\x20file.\x0a-->\x0a\x0a{{\x20$colCount\x20:=\x20tocColCount\x20.}}\x0a{{/*\x20Generate\x20the\x20TOC\x20*/}}\x0a<nav\x20class=\"search-nav\"\x20style=\"column-count:\x20{{$colCount}}\"\x20role=\"navigation\">\x0a{{range\x20$key,\x20$val\x20:=\x20.Idents}}\x0a\x09{{if\x20$val}}\x0a\x09\x09<a\x20href=\"#{{$key.Name}}\">{{$key.Name}}</a>\x0a\x09\x09<br\x20/>\x0a\x09{{end}}\x0a{{end}}\x0a\x0a{{if\x20not\x20.Idents}}\x0a\x09{{with\x20.Pak}}\x0a\x09\x09<a\x20href=\"#Packages\">Package\x20{{html\x20$.Query}}</a>\x0a\x09\x09<br\x20/>\x0a\x09{{end}}\x0a{{end}}\x0a\x0a{{with\x20.Hit}}\x0a\x09{{with\x20.Decls}}\x0a\x09\x09<a\x20href=\"#Global\">Package-level\x20declarations</a>\x0a\x09\x09<br\x20/>\x0a\x09\x09{{range\x20.}}\x0a\x09\x09\x09{{$pkg_html\x20:=\x20pkgLink\x20.Pak.Path\x20|\x20html}}\x0a\x09\x09\x09<a\x20href=\"#Global_{{$pkg_html}}\"\x20class=\"indent\">package\x20{{html\x20.Pak.Name}}</a>\x0a\x09\x09\x09<br\x20/>\x0a\x09\x09{{end}}\x0a\x09{{end}}\x0a\x09{{with\x20.Others}}\x0a\x09\x09<a\x20href=\"#Local\">Local\x20declarations\x20and\x20uses</a>\x0a\x09\x09<br\x20/>\x0a\x09\x09{{range\x20.}}\x0a\x09\x09\x09{{$pkg_html\x20:=\x20pkgLink\x20.Pak.Path\x20|\x20html}}\x0a\x09\x09\x09<a\x20href=\"#Local_{{$pkg_html}}\"\x20class=\"indent\">package\x20{{html\x20.Pak.Name}}</a>\x0a\x09\x09\x09<br\x20/>\x0a\x09\x09{{end}}\x0a\x09{{end}}\x0a{{end}}\x0a\x0a{{with\x20.Textual}}\x0a\x09{{if\x20$.Complete}}\x0a\x09\x09<a\x20href=\"#Textual\">{{html\x20$.Found}}\x20textual\x20occurrences</a>\x0a\x09{{else}}\x0a\x09\x09<a\x20href=\"#Textual\">More\x20than\x20{{html\x20$.Found}}\x20textual\x20occurrences</a>\x0a\x09{{end}}\x0a{{end}}\x0a</nav>\x0a\x0a{{with\x20.Alert}}\x0a\x09<p>\x0a\x09<span\x20class=\"alert\"\x20style=\"font-size:120%\">{{html\x20.}}</span>\x0a\x09</p>\x0a{{end}}\x0a{{with\x20.Alt}}\x0a\x09<p>\x0a\x09<span\x20class=\"alert\"\x20style=\"font-size:120%\">Did\x20you\x20mean:\x20</span>\x0a\x09{{range\x20.Alts}}\x0a\x09\x09<a\x20href=\"search?q={{urlquery\x20.}}\"\x20style=\"font-size:120%\">{{html\x20.}}</a>\x0a\x09{{end}}\x0a\x09</p>\x0a{{end}}\x0a",
 
@@ -109,7 +109,7 @@
 
 	"searchtxt.html": "<!--\x0a\x09Copyright\x202009\x20The\x20Go\x20Authors.\x20All\x20rights\x20reserved.\x0a\x09Use\x20of\x20this\x20source\x20code\x20is\x20governed\x20by\x20a\x20BSD-style\x0a\x09license\x20that\x20can\x20be\x20found\x20in\x20the\x20LICENSE\x20file.\x0a-->\x0a{{$query_url\x20:=\x20urlquery\x20.Query}}\x0a{{with\x20.Textual}}\x0a\x09{{if\x20$.Complete}}\x0a\x09\x09<h2\x20id=\"Textual\">{{html\x20$.Found}}\x20textual\x20occurrences</h2>\x0a\x09{{else}}\x0a\x09\x09<h2\x20id=\"Textual\">More\x20than\x20{{html\x20$.Found}}\x20textual\x20occurrences</h2>\x0a\x09\x09<p>\x0a\x09\x09<span\x20class=\"alert\"\x20style=\"font-size:120%\">Not\x20all\x20files\x20or\x20lines\x20containing\x20\"{{html\x20$.Query}}\"\x20are\x20shown.</span>\x0a\x09\x09</p>\x0a\x09{{end}}\x0a\x09<p>\x0a\x09<table\x20class=\"layout\">\x0a\x09{{range\x20.}}\x0a\x09\x09{{$file\x20:=\x20.Filename}}\x0a\x09\x09<tr>\x0a\x09\x09<td\x20align=\"left\"\x20valign=\"top\">\x0a\x09\x09<a\x20href=\"{{queryLink\x20$file\x20$query_url\x200}}\">{{$file}}</a>:\x0a\x09\x09</td>\x0a\x09\x09<td\x20align=\"left\"\x20width=\"4\"></td>\x0a\x09\x09<th\x20align=\"left\"\x20valign=\"top\">{{len\x20.Lines}}</th>\x0a\x09\x09<td\x20align=\"left\"\x20width=\"4\"></td>\x0a\x09\x09<td\x20align=\"left\">\x0a\x09\x09{{range\x20.Lines}}\x0a\x09\x09\x09<a\x20href=\"{{queryLink\x20$file\x20$query_url\x20.}}\">{{html\x20.}}</a>\x0a\x09\x09{{end}}\x0a\x09\x09{{if\x20not\x20$.Complete}}\x0a\x09\x09\x09...\x0a\x09\x09{{end}}\x0a\x09\x09</td>\x0a\x09\x09</tr>\x0a\x09{{end}}\x0a\x09{{if\x20not\x20$.Complete}}\x0a\x09\x09<tr><td\x20align=\"left\">...</td></tr>\x0a\x09{{end}}\x0a\x09</table>\x0a\x09</p>\x0a{{end}}\x0a",
 
-	"style.css": "body\x20{\x0a\x20\x20margin:\x200;\x0a\x20\x20font-family:\x20Roboto,\x20Arial,\x20sans-serif;\x0a\x20\x20background-color:\x20#fff;\x0a\x20\x20line-height:\x201.3;\x0a\x20\x20text-align:\x20center;\x0a\x20\x20color:\x20#3e4042;\x0a}\x0atextarea\x20{\x0a\x20\x20/*\x20Inherit\x20text\x20color\x20from\x20body\x20avoiding\x20illegible\x20text\x20in\x20the\x20case\x20where\x20the\x0a\x20\x20\x20*\x20user\x20has\x20inverted\x20the\x20browsers\x20custom\x20text\x20and\x20background\x20colors.\x20*/\x0a\x20\x20color:\x20inherit;\x0a}\x0apre,\x0acode\x20{\x0a\x20\x20font-family:\x20Menlo,\x20monospace;\x0a\x20\x20font-size:\x200.875rem;\x0a}\x0apre\x20{\x0a\x20\x20line-height:\x201.4;\x0a\x20\x20overflow-x:\x20auto;\x0a}\x0apre\x20.comment\x20{\x0a\x20\x20color:\x20#006600;\x0a}\x0apre\x20.highlight,\x0apre\x20.highlight-comment,\x0apre\x20.selection-highlight,\x0apre\x20.selection-highlight-comment\x20{\x0a\x20\x20background:\x20#ffff00;\x0a}\x0apre\x20.selection,\x0apre\x20.selection-comment\x20{\x0a\x20\x20background:\x20#ff9632;\x0a}\x0apre\x20.ln\x20{\x0a\x20\x20color:\x20#999;\x0a\x20\x20background:\x20#efefef;\x0a}\x0a.ln\x20{\x0a\x20\x20user-select:\x20none;\x0a\x0a\x20\x20/*\x20Ensure\x208\x20characters\x20in\x20the\x20document\x20-\x20which\x20due\x20to\x20floating\x0a\x20\x20\x20*\x20point\x20rendering\x20issues,\x20might\x20have\x20a\x20width\x20of\x20less\x20than\x201\x20each\x20-\x20are\x208\x0a\x20\x20\x20*\x20characters\x20wide,\x20so\x20a\x20tab\x20in\x20the\x209th\x20position\x20indents\x20properly.\x20See\x0a\x20\x20\x20*\x20https://github.com/webcompat/web-bugs/issues/17530#issuecomment-402675091\x0a\x20\x20\x20*\x20for\x20more\x20information.\x20*/\x0a\x20\x20display:\x20inline-block;\x0a\x20\x20width:\x208ch;\x0a}\x0a\x0a.search-nav\x20{\x0a\x20\x20margin-left:\x201.25rem;\x0a\x20\x20font-size:\x200.875rem;\x0a\x20\x20column-gap:\x201.25rem;\x0a\x20\x20column-fill:\x20auto;\x0a\x20\x20column-width:\x2014rem;\x0a}\x0a\x0a.search-nav\x20.indent\x20{\x0a\x20\x20margin-left:\x201.25rem;\x0a}\x0a\x0aa,\x0a.exampleHeading\x20.text,\x0a.expandAll\x20{\x0a\x20\x20color:\x20#007d9c;\x0a\x20\x20text-decoration:\x20none;\x0a}\x0aa:hover,\x0a.exampleHeading\x20.text:hover,\x0a.expandAll:hover\x20{\x0a\x20\x20text-decoration:\x20underline;\x0a}\x0a.article\x20a\x20{\x0a\x20\x20text-decoration:\x20underline;\x0a}\x0a.article\x20.title\x20a\x20{\x0a\x20\x20text-decoration:\x20none;\x0a}\x0a\x0a.permalink\x20{\x0a\x20\x20display:\x20none;\x0a}\x0a:hover\x20>\x20.permalink\x20{\x0a\x20\x20display:\x20inline;\x0a}\x0a\x0ap,\x0ali\x20{\x0a\x20\x20max-width:\x2050rem;\x0a\x20\x20word-wrap:\x20break-word;\x0a}\x0ap,\x0apre,\x0aul,\x0aol\x20{\x0a\x20\x20margin:\x201.25rem;\x0a}\x0apre\x20{\x0a\x20\x20background:\x20#efefef;\x0a\x20\x20padding:\x200.625rem;\x0a\x20\x20border-radius:\x200.3125rem;\x0a}\x0a\x0ah1,\x0ah2,\x0ah3,\x0ah4\x20{\x0a\x20\x20margin:\x201.25rem\x200\x201.25rem;\x0a\x20\x20padding:\x200;\x0a\x20\x20color:\x20#202224;\x0a\x20\x20font-family:\x20'Work\x20Sans',\x20sans-serif;\x0a\x20\x20font-weight:\x20600;\x0a}\x0ah1\x20{\x0a\x20\x20font-size:\x201.75rem;\x0a\x20\x20line-height:\x201;\x0a}\x0ah1\x20.text-muted\x20{\x0a\x20\x20color:\x20#777;\x0a}\x0ah2\x20{\x0a\x20\x20font-size:\x201.25rem;\x0a\x20\x20background:\x20#e0ebf5;\x0a\x20\x20padding:\x200.5rem;\x0a\x20\x20line-height:\x201.25;\x0a\x20\x20font-weight:\x20normal;\x0a\x20\x20overflow-wrap:\x20break-word;\x0a}\x0ah2\x20a\x20{\x0a\x20\x20font-weight:\x20bold;\x0a}\x0ah3\x20{\x0a\x20\x20font-size:\x201.25rem;\x0a\x20\x20line-height:\x201.25;\x0a\x20\x20overflow-wrap:\x20break-word;\x0a}\x0ah3,\x0ah4\x20{\x0a\x20\x20margin:\x201.25rem\x200.3125rem;\x0a}\x0ah4\x20{\x0a\x20\x20font-size:\x201rem;\x0a}\x0a\x0ah2\x20>\x20span,\x0ah3\x20>\x20span\x20{\x0a\x20\x20float:\x20right;\x0a\x20\x20margin:\x200\x2025px\x200\x200;\x0a\x20\x20font-weight:\x20normal;\x0a\x20\x20color:\x20#5279c7;\x0a}\x0a\x0adl\x20{\x0a\x20\x20margin:\x201.25rem;\x0a}\x0add\x20{\x0a\x20\x20margin:\x200\x200\x200\x201.25rem;\x0a}\x0adl,\x0add\x20{\x0a\x20\x20font-size:\x200.875rem;\x0a}\x0adiv#nav\x20table\x20td\x20{\x0a\x20\x20vertical-align:\x20top;\x0a}\x0a\x0a.ModTable\x20{\x0a\x20\x20border-collapse:\x20collapse;\x0a\x20\x20margin:\x201.25rem;\x0a\x20\x20max-width:\x2050rem;\x0a}\x0a.ModTable\x20code\x20{\x0a\x20\x20white-space:\x20nowrap;\x0a}\x0a.ModTable\x20td,\x0a.ModTable\x20th\x20{\x0a\x20\x20border:\x201px\x20solid\x20#a9a9a9;\x0a\x20\x20padding:\x201rem;\x0a\x20\x20vertical-align:\x20top;\x0a}\x0a.ModTable\x20td\x20p\x20{\x0a\x20\x20margin:\x200\x200\x201rem\x200;\x0a}\x0a.ModTable\x20td\x20p:last-child\x20{\x0a\x20\x20margin-bottom:\x200;\x0a}\x0a\x0a#pkg-index\x20h3\x20{\x0a\x20\x20font-size:\x201rem;\x0a}\x0a.pkg-dir\x20{\x0a\x20\x20padding:\x200\x200.625rem;\x0a}\x0a.pkg-dir\x20table\x20{\x0a\x20\x20border-collapse:\x20collapse;\x0a\x20\x20border-spacing:\x200;\x0a}\x0a.pkg-name\x20{\x0a\x20\x20padding-right:\x200.625rem;\x0a}\x0a.alert\x20{\x0a\x20\x20color:\x20#aa0000;\x0a}\x0a\x0a#pkg-examples\x20h3\x20{\x0a\x20\x20float:\x20left;\x0a}\x0a\x0a#pkg-examples\x20dl\x20{\x0a\x20\x20clear:\x20both;\x0a}\x0a\x0a.expandAll\x20{\x0a\x20\x20cursor:\x20pointer;\x0a\x20\x20float:\x20left;\x0a\x20\x20margin:\x201.25rem\x200;\x0a}\x0a\x0a.Site\x20{\x0a\x20\x20display:\x20flex;\x0a\x20\x20flex-direction:\x20column;\x0a\x20\x20min-height:\x20100vh;\x0a}\x0a.Site-content\x20{\x0a\x20\x20flex:\x201;\x0a}\x0a#page\x20{\x0a\x20\x20width:\x20100%;\x0a}\x0a#page\x20>\x20.container,\x0a.Header-nav\x20{\x0a\x20\x20text-align:\x20left;\x0a\x20\x20margin-left:\x20auto;\x0a\x20\x20margin-right:\x20auto;\x0a\x20\x20padding:\x200\x201.25rem;\x0a}\x0a#page\x20>\x20.container,\x0a.Header-nav,\x0a.Footer\x20{\x0a\x20\x20max-width:\x2059.38rem;\x0a}\x0a#page.wide\x20>\x20.container,\x0a.Header-nav--wide,\x0a.Footer--wide\x20{\x0a\x20\x20max-width:\x20none;\x0a}\x0a\x0adiv#playground\x20.buttons\x20a\x20{\x0a\x20\x20background:\x20#375eab;\x0a\x20\x20border:\x200.0625rem\x20solid\x20#757575;\x0a\x20\x20color:\x20white;\x0a}\x0a\x0a/*\x20Style\x20download\x20button\x20on\x20doc/install\x20page\x20*/\x0aa#start\x20{\x0a\x20\x20\x20\x20background:\x20#E0EBF5;\x0a\x20\x20\x20\x20border:\x200.0625rem\x20solid\x20#375EAB;\x0a\x20\x20\x20\x20border-radius:\x200.3125rem;\x0a\x20\x20\x20\x20color:\x20#222;\x0a\x20\x20\x20\x20display:\x20block;\x0a\x20\x20\x20\x20padding:\x200.625rem;\x0a\x20\x20\x20\x20text-align:\x20center;\x0a\x20\x20\x20\x20text-decoration:\x20none;\x0a}\x0aa#start\x20.big\x20{\x0a\x20\x20\x20\x20display:\x20block;\x0a\x20\x20\x20\x20font-size:\x201.25rem;\x0a\x20\x20\x20\x20font-weight:\x20bold;\x0a}\x0aa#start\x20.desc\x20{\x0a\x20\x20\x20\x20display:\x20block;\x0a\x20\x20\x20\x20font-size:\x200.875rem;\x0a\x20\x20\x20\x20font-weight:\x20normal;\x0a\x20\x20\x20\x20margin-top:\x200.3125rem;\x0a}\x0a\x0a.download\x20{\x0a\x20\x20width:\x209.375rem;\x0a}\x0a\x0a::-webkit-input-placeholder\x20{\x0a\x20\x20color:\x20#7f7f7f;\x0a\x20\x20opacity:\x201;\x0a}\x0a::placeholder\x20{\x0a\x20\x20color:\x20#7f7f7f;\x0a\x20\x20opacity:\x201;\x0a}\x0a\x0a.Header\x20{\x0a\x20\x20align-items:\x20center;\x0a\x20\x20box-sizing:\x20border-box;\x0a\x20\x20display:\x20flex;\x0a\x20\x20font-size:\x200.875rem;\x0a\x20\x20justify-content:\x20space-between;\x0a\x20\x20padding:\x201.375rem\x200;\x0a}\x0a.Header.is-active\x20{\x0a\x20\x20background-color:\x20#f7f9fa;\x0a}\x0a.Header-logo\x20{\x0a\x20\x20height:\x202rem;\x0a\x20\x20width:\x205.125rem;\x0a}\x0a.Header-nav\x20{\x0a\x20\x20align-items:\x20center;\x0a\x20\x20display:\x20flex;\x0a\x20\x20flex-wrap:\x20wrap;\x0a\x20\x20justify-content:\x20space-between;\x0a\x20\x20width:\x20100%;\x0a}\x0a.Header-menuButton\x20{\x0a\x20\x20background-color:\x20transparent;\x0a\x20\x20border:\x20none;\x0a\x20\x20box-sizing:\x20content-box;\x0a\x20\x20cursor:\x20pointer;\x0a\x20\x20display:\x20inline-block;\x0a\x20\x20height:\x201.313rem;\x0a\x20\x20padding:\x200.375rem;\x0a\x20\x20position:\x20relative;\x0a\x20\x20vertical-align:\x20middle;\x0a\x20\x20width:\x201.313rem;\x0a}\x0a.Header-menuButtonInner\x20{\x0a\x20\x20position:\x20relative;\x0a}\x0a.Header-menuButton::after,\x0a.Header-menuButtonInner,\x0a.Header-menuButtonInner::before,\x0a.Header-menuButtonInner::after\x20{\x0a\x20\x20background-color:\x20#3e4042;\x0a\x20\x20height:\x200.1875rem;\x0a\x20\x20transition:\x20all\x20100ms\x20ease-in;\x0a}\x0a.Header-menuButton::after\x20{\x0a\x20\x20opacity:\x200;\x0a\x20\x20top:\x200.9375rem;\x0a}\x0a.Header-menuButton::after,\x0a.Header-menuButtonInner::before,\x0a.Header-menuButtonInner::after\x20{\x0a\x20\x20content:\x20'';\x0a\x20\x20display:\x20block;\x0a\x20\x20position:\x20absolute;\x0a\x20\x20width:\x201.313rem;\x0a}\x0a.Header-menuButtonInner::before\x20{\x0a\x20\x20top:\x20-0.375rem;\x0a}\x0a.Header-menuButtonInner::after\x20{\x0a\x20\x20bottom:\x20-0.375rem;\x0a}\x0a.Header.is-active\x20.Header-menuButton::after\x20{\x0a\x20\x20opacity:\x201;\x0a\x20\x20transform:\x20rotate(-45deg);\x0a}\x0a.Header.is-active\x20.Header-menuButton\x20.Header-menuButtonInner\x20{\x0a\x20\x20transform:\x20rotate(45deg);\x0a}\x0a.Header.is-active\x20.Header-menuButton\x20.Header-menuButtonInner::before,\x0a.Header.is-active\x20.Header-menuButton\x20.Header-menuButtonInner::after\x20{\x0a\x20\x20background-color:\x20transparent;\x0a}\x0a.Header-menu\x20{\x0a\x20\x20align-items:\x20center;\x0a\x20\x20display:\x20none;\x0a\x20\x20flex-direction:\x20column;\x0a\x20\x20list-style:\x20none;\x0a\x20\x20margin:\x200;\x0a\x20\x20padding:\x200;\x0a\x20\x20width:\x20100%;\x0a}\x0a.Header.is-active\x20.Header-menu\x20{\x0a\x20\x20display:\x20flex;\x0a}\x0a.Header-menuItem:first-of-type\x20{\x0a\x20\x20/*\x20Offset\x20the\x20padding\x20of\x20the\x20inner\x20link,\x20maintaining\x20its\x20click\x20target\x20size,\x0a\x20\x20\x20\x20\x20while\x20still\x20placing\x20the\x20item\x20as\x20if\x20it\x20had\x20no\x20top\x20margin\x20or\x20padding.\x20*/\x0a\x20\x20margin-top:\x20-0.5rem;\x0a}\x0a.Header-menuItem\x20{\x0a\x20\x20display:\x20inline-flex;\x0a}\x0a.Header-menuItem,\x0a.Header-menuItem\x20a:link,\x0a.Header-menuItem\x20a:visited,\x0a.Header-menuItem--search,\x0a.HeaderSearch\x20{\x0a\x20\x20width:\x20100%;\x0a}\x0a.Header-menuItem,\x0a.Header-menuItem\x20a:link,\x0a.Header-menuItem\x20a:visited\x20{\x0a\x20\x20color:\x20#3e4042;\x0a\x20\x20text-align:\x20center;\x0a}\x0a.Header-menuItem\x20a:link,\x0a.Header-menuItem\x20a:visited\x20{\x0a\x20\x20padding:\x200.5rem\x200;\x0a}\x0a.Header-menuItem--search\x20{\x0a\x20\x20margin-top:\x200.5rem;\x0a}\x0a.HeaderSearch,\x0a.HeaderSearch-label\x20{\x0a\x20\x20display:\x20inline-block;\x0a\x20\x20position:\x20relative;\x0a}\x0a.HeaderSearch\x20{\x0a\x20\x20border:\x200.0625rem\x20solid\x20#979797;\x0a\x20\x20border-radius:\x200.1875rem;\x0a\x20\x20display:\x20inline-flex;\x0a\x20\x20overflow:\x20hidden;\x0a\x20\x20position:\x20relative;\x0a}\x0a.HeaderSearch-input\x20{\x0a\x20\x20-webkit-appearance:\x20none;\x0a\x20\x20border:\x20none;\x0a\x20\x20border-radius:\x200;\x0a\x20\x20box-sizing:\x20border-box;\x0a\x20\x20display:\x20block;\x0a\x20\x20flex:\x201;\x0a\x20\x20font:\x20inherit;\x0a\x20\x20font-size:\x2016px;\x20/*\x20Prevents\x20automatic\x20zoom\x20on\x20mobile\x20devices\x20*/\x0a\x20\x20margin:\x200;\x0a\x20\x20padding:\x200.5rem;\x0a}\x0a.HeaderSearch-input::-webkit-search-decoration\x20{\x0a\x20\x20-webkit-appearance:\x20none;\x0a}\x0a.HeaderSearch-input::-moz-ui-invalid\x20{\x0a\x20\x20box-shadow:\x20unset;\x0a}\x0a.HeaderSearch-submit\x20{\x0a\x20\x20background-color:\x20#fff;\x0a\x20\x20border:\x20none;\x0a\x20\x20box-sizing:\x20border-box;\x0a\x20\x20cursor:\x20pointer;\x0a\x20\x20margin:\x200;\x0a\x20\x20padding:\x200.125rem\x200.5rem\x200\x200.55rem;\x0a\x20\x20transition:\x20background-color\x20200ms;\x0a}\x0a.HeaderSearch:focus-within\x20.HeaderSearch-submit\x20{\x0a\x20\x20background-color:\x20#e5f6fb;\x0a}\x0a.HeaderSearch-icon\x20{\x0a\x20\x20fill:\x20#757575;\x0a\x20\x20transition:\x20fill\x20200ms;\x0a}\x0a.HeaderSearch:focus-within\x20.HeaderSearch-icon\x20{\x0a\x20\x20fill:\x20#007d9c;\x0a}\x0a@media\x20only\x20screen\x20and\x20(min-width:\x2056rem)\x20{\x0a\x20\x20.Header\x20{\x0a\x20\x20\x20\x20height:\x205.125rem;\x0a\x20\x20}\x0a\x20\x20.Header.is-active\x20{\x0a\x20\x20\x20\x20background-color:\x20#fff;\x0a\x20\x20}\x0a\x20\x20.Header.is-active\x20.Header-menu\x20{\x0a\x20\x20\x20\x20display:\x20block;\x0a\x20\x20}\x0a\x20\x20.Header-menuButton\x20{\x0a\x20\x20\x20\x20display:\x20none;\x0a\x20\x20}\x0a\x20\x20.Header-menu\x20{\x0a\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20flex-direction:\x20row;\x0a\x20\x20\x20\x20width:\x20auto;\x0a\x20\x20}\x0a\x20\x20.Header-menuItem:first-of-type\x20{\x0a\x20\x20\x20\x20margin-top:\x200;\x0a\x20\x20}\x0a\x20\x20.Header-menuItem,\x0a\x20\x20.Header-menuItem\x20a:link,\x0a\x20\x20.Header-menuItem\x20a:visited\x20{\x0a\x20\x20\x20\x20width:\x20auto;\x0a\x20\x20}\x0a\x20\x20.Header-menuItem\x20a:link,\x0a\x20\x20.Header-menuItem\x20a:visited\x20{\x0a\x20\x20\x20\x20padding:\x202rem\x201.5rem;\x0a\x20\x20}\x0a\x20\x20.Header-menuItem\x20a:hover,\x0a\x20\x20.Header-menuItem\x20a:focus\x20{\x0a\x20\x20\x20\x20text-decoration:\x20underline;\x0a\x20\x20}\x0a\x20\x20.Header-menuItem--search,\x0a\x20\x20.HeaderSearch\x20{\x0a\x20\x20\x20\x20width:\x208.75rem;\x0a\x20\x20}\x0a\x20\x20.Header-menuItem--search\x20{\x0a\x20\x20\x20\x20margin-left:\x201.5rem;\x0a\x20\x20\x20\x20margin-top:\x200;\x0a\x20\x20}\x0a\x20\x20.HeaderSearch-input\x20{\x0a\x20\x20\x20\x20min-width:\x205.625rem;\x0a\x20\x20}\x0a\x20\x20.HeaderSearch-submit\x20{\x0a\x20\x20\x20\x20padding:\x200.125rem\x200.5rem\x200;\x0a\x20\x20}\x0a}\x0a@media\x20only\x20screen\x20and\x20(min-width:\x2057.5rem)\x20{\x0a\x20\x20.Header\x20{\x0a\x20\x20\x20\x20font-size:\x201rem;\x0a\x20\x20}\x0a}\x0a\x0a.Button,\x0a.Button:link,\x0a.Button:visited\x20{\x0a\x20\x20align-items:\x20center;\x0a\x20\x20background-color:\x20#f7f9fa;\x0a\x20\x20border:\x20none;\x0a\x20\x20border-radius:\x200.1875rem;\x0a\x20\x20box-shadow:\x200\x202px\x205px\x20rgba(0,\x200,\x200,\x200.2);\x0a\x20\x20box-sizing:\x20border-box;\x0a\x20\x20color:\x20#007d9c;\x0a\x20\x20cursor:\x20pointer;\x0a\x20\x20display:\x20inline-flex;\x0a\x20\x20font:\x20bold\x200.875rem\x20Roboto,\x20sans-serif;\x0a\x20\x20height:\x202.375rem;\x0a\x20\x20padding:\x200\x200.625rem;\x0a\x20\x20justify-content:\x20center;\x0a\x20\x20min-width:\x204.063rem;\x0a\x20\x20text-decoration:\x20none;\x0a}\x0a.Button:active\x20{\x0a\x20\x20box-shadow:\x200\x201px\x203px\x20rgba(0,\x200,\x200,\x200.2);\x0a}\x0a.Button--primary,\x0a.Button--primary:link,\x0a.Button--primary:visited\x20{\x0a\x20\x20border:\x200.0625rem\x20solid\x20#00add8;\x0a}\x0a.Button--big,\x0a.Button--big:link,\x0a.Button--big:visited\x20{\x0a\x20\x20background-color:\x20#7fd5ea;\x0a\x20\x20border-radius:\x200.3125rem;\x0a\x20\x20color:\x20#202224;\x0a\x20\x20font-size:\x201.5rem;\x0a\x20\x20height:\x204rem;\x0a\x20\x20justify-content:\x20center;\x0a}\x0a\x0a.HomeContainer\x20{\x0a\x20\x20align-items:\x20top;\x0a\x20\x20display:\x20flex;\x0a\x20\x20flex-wrap:\x20wrap;\x0a\x20\x20justify-content:\x20space-between;\x0a}\x0a.HomeContainer\x20*\x20{\x0a\x20\x20box-sizing:\x20border-box;\x0a}\x0a\x0a.HomeSection\x20{\x0a\x20\x20flex:\x200\x200\x20100%;\x0a\x20\x20margin-bottom:\x202.5rem;\x0a\x20\x20padding:\x200\x201rem;\x0a}\x0a.HomeSection-header\x20{\x0a\x20\x20background:\x20none;\x0a\x20\x20color:\x20#202224;\x0a\x20\x20margin:\x200\x200\x200.625rem\x200;\x0a\x20\x20padding:\x200;\x0a\x20\x20font-weight:\x20bold;\x0a}\x0a\x0a.Hero-header\x20{\x0a\x20\x20font:\x201.5rem\x20Roboto,\x20sans-serif;\x0a\x20\x20line-height:\x20inherit;\x0a\x20\x20margin:\x200\x200\x201.875rem;\x0a}\x0a.Hero-gopher\x20{\x0a\x20\x20background:\x20url('/lib/godoc/images/home-gopher.png')\x20no-repeat;\x0a\x20\x20background-position:\x20center\x20top;\x0a\x20\x20display:\x20block;\x0a\x20\x20height:\x209.688rem;\x0a\x20\x20max-height:\x20200px;\x20/*\x20Setting\x20in\x20px\x20to\x20prevent\x20the\x20gopher\x20from\x20blowing\x20up\x20in\x20very\x20high\x20default\x20font-sizes\x20*/\x0a}\x0a.HeroDownloadButton,\x0a.Hero-description\x20{\x0a\x20\x20text-align:\x20center;\x0a}\x0a.HeroDownloadButton,\x0a.HeroDownloadButton:link,\x0a.HeroDownloadButton:visited\x20{\x0a\x20\x20display:\x20flex;\x0a\x20\x20margin-bottom:\x200.5rem;\x0a}\x0a.HeroDownloadButton-image\x20{\x0a\x20\x20height:\x202rem;\x0a\x20\x20margin-right:\x202rem;\x0a\x20\x20width:\x202rem;\x0a}\x0a.Hero-description\x20{\x0a\x20\x20color:\x20#616161;\x0a\x20\x20font-size:\x200.875rem;\x0a\x20\x20margin:\x200;\x0a}\x0a@media\x20only\x20screen\x20and\x20(min-width:\x2057.1875rem)\x20{\x0a\x20\x20.HomeSection\x20{\x0a\x20\x20\x20\x20flex:\x200\x200\x2026.875rem;\x0a\x20\x20\x20\x20padding:\x200;\x0a\x20\x20}\x0a\x20\x20.Hero,\x0a\x20\x20.Playground\x20{\x0a\x20\x20\x20\x20margin-top:\x201rem;\x0a\x20\x20}\x0a}\x0a\x0a.Playground-headerContainer\x20{\x0a\x20\x20align-items:\x20baseline;\x0a\x20\x20display:\x20flex;\x0a\x20\x20justify-content:\x20space-between;\x0a}\x0a.Playground-popout\x20{\x0a\x20\x20background:\x20url('/lib/godoc/images/play-link.svg')\x20no-repeat;\x0a\x20\x20background-position:\x20right\x20center;\x0a\x20\x20cursor:\x20pointer;\x0a\x20\x20display:\x20block;\x0a\x20\x20font-size:\x201rem;\x0a\x20\x20padding:\x200\x201.688rem;\x0a}\x0a.Playground-input,\x0a.Playground-output\x20{\x0a\x20\x20padding:\x200;\x0a\x20\x20margin:\x200;\x0a\x20\x20font-family:\x20Menlo,\x20monospace;\x0a\x20\x20font-size:\x200.875rem;\x0a}\x0a.Playground-inputContainer\x20{\x0a\x20\x20border-top-left-radius:\x200.3125rem;\x0a\x20\x20border-top-right-radius:\x200.3125rem;\x0a\x20\x20overflow:\x20hidden;\x0a\x20\x20height:\x2011rem;\x0a}\x0a.Playground-input\x20{\x0a\x20\x20width:\x20100%;\x0a\x20\x20height:\x20100%;\x0a\x20\x20border:\x20none;\x0a\x20\x20outline:\x20none;\x0a\x20\x20resize:\x20none;\x0a\x20\x20padding:\x200.625rem;\x0a}\x0a.Playground-outputContainer\x20{\x0a\x20\x20border-bottom-right-radius:\x200.3125rem;\x0a\x20\x20border-bottom-left-radius:\x200.3125rem;\x0a\x20\x20border-top:\x20none\x20!important;\x0a\x20\x20padding:\x200.625rem;\x0a\x20\x20height:\x205rem;\x0a\x20\x20margin-bottom:\x201rem;\x0a\x20\x20overflow:\x20auto;\x0a}\x0a.Playground-output\x20{\x0a\x20\x20padding:\x200;\x0a\x20\x20border-radius:\x200;\x0a}\x0a.Playground-inputContainer,\x0a.Playground-input,\x0a.Playground-outputContainer,\x0a.Playground-output\x20{\x0a\x20\x20background:\x20#f7f9fa;\x0a\x20\x20color:\x20#202224;\x0a}\x0a.Playground-inputContainer,\x0a.Playground-outputContainer\x20{\x0a\x20\x20border:\x200.0625rem\x20solid\x20#c0c2c3;\x0a}\x0a.Playground-controls\x20{\x0a\x20\x20display:\x20flex;\x0a\x20\x20flex-wrap:\x20wrap;\x0a}\x0a.Playground-buttons\x20{\x0a\x20\x20display:\x20flex;\x0a\x20\x20flex:\x201;\x0a\x20\x20flex-wrap:\x20nowrap;\x0a\x20\x20justify-content:\x20space-between;\x0a}\x0a.Playground-selectExample\x20{\x0a\x20\x20background-color:\x20white;\x0a\x20\x20border-radius:\x203px;\x0a\x20\x20border:\x200.0625rem\x20solid\x20#979797;\x0a\x20\x20color:\x20inherit;\x0a\x20\x20font-family:\x20inherit;\x0a\x20\x20font-size:\x2016px;\x20/*\x20Prevents\x20automatic\x20zoom\x20on\x20mobile\x20devices\x20*/\x0a\x20\x20height:\x202.375rem;\x0a\x20\x20margin:\x200\x200\x200.5rem\x200;\x0a\x20\x20width:\x20100%;\x0a}\x0a.Playground-secondaryButtons\x20{\x0a\x20\x20white-space:\x20nowrap;\x0a}\x0a.Playground-secondaryButtons\x20.Button:not(:first-child)\x20{\x0a\x20\x20margin-left:\x200.4375rem;\x0a}\x0a@media\x20only\x20screen\x20and\x20(min-width:\x2027.8125rem)\x20{\x0a\x20\x20.Playground-outputContainer\x20{\x0a\x20\x20\x20\x20margin-bottom:\x201.688rem;\x0a\x20\x20}\x0a\x20\x20.Playground-controls\x20{\x0a\x20\x20\x20\x20flex-wrap:\x20nowrap;\x0a\x20\x20}\x0a\x20\x20.Playground-selectExample\x20{\x0a\x20\x20\x20\x20margin:\x200\x200.4375rem\x200\x200;\x0a\x20\x20\x20\x20width:\x20auto;\x0a\x20\x20}\x0a}\x0a\x0a.Blog-title\x20{\x0a\x20\x20display:\x20block;\x0a\x20\x20font-size:\x201.25rem;\x0a\x20\x20font-weight:\x20normal;\x0a\x20\x20margin:\x200;\x0a}\x0a.Blog-title,\x0a.Blog-extract,\x0a.Blog-when\x20{\x0a\x20\x20margin-bottom:\x200.625rem;\x0a}\x0a.Blog-when\x20{\x0a\x20\x20color:\x20#666;\x0a\x20\x20font-size:\x200.875rem;\x0a}\x0a.Blog-footer\x20{\x0a\x20\x20text-align:\x20right;\x0a}\x0a\x0a@supports\x20(--c:\x200)\x20{\x0a\x20\x20[style*='--aspect-ratio-padding:']\x20{\x0a\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20overflow:\x20hidden;\x0a\x20\x20\x20\x20padding-top:\x20var(--aspect-ratio-padding);\x0a\x20\x20}\x0a\x20\x20[style*='--aspect-ratio-padding:']\x20>\x20*\x20{\x0a\x20\x20\x20\x20position:\x20absolute;\x0a\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20left:\x200;\x0a\x20\x20\x20\x20width:\x20100%;\x0a\x20\x20\x20\x20height:\x20100%;\x0a\x20\x20}\x0a}\x0a\x0a.Footer\x20{\x0a\x20\x20margin:\x202rem\x20auto\x200;\x0a\x20\x20padding:\x201rem\x201.25rem;\x0a\x20\x20position:\x20relative;\x0a\x20\x20text-align:\x20right;\x0a}\x0a.Footer-gopher\x20{\x0a\x20\x20bottom:\x200;\x0a\x20\x20left:\x201.25rem;\x0a\x20\x20position:\x20absolute;\x0a\x20\x20width:\x205rem;\x0a}\x0a.Footer-links\x20{\x0a\x20\x20flex:\x201;\x0a\x20\x20list-style:\x20none;\x0a\x20\x20margin:\x200;\x0a\x20\x20padding:\x200;\x0a}\x0a.Footer-link\x20{\x0a\x20\x20font-size:\x200.875rem;\x0a\x20\x20white-space:\x20nowrap;\x0a}\x0a.Footer-link\x20+\x20.Footer-link\x20{\x0a\x20\x20margin-top:\x200.5rem;\x0a}\x0a.Footer-supportedBy\x20{\x0a\x20\x20color:\x20#6e7072;\x0a\x20\x20display:\x20inline-block;\x0a\x20\x20font:\x200.875rem\x20'Product\x20Sans',\x20'Roboto',\x20'sans-serif';\x0a\x20\x20margin-top:\x201rem;\x0a}\x0a.Footer-supportedBy:hover\x20{\x0a\x20\x20text-decoration:\x20none;\x0a}\x0a@media\x20only\x20screen\x20and\x20(min-width:\x2050rem)\x20{\x0a\x20\x20.Footer\x20{\x0a\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20margin:\x205rem\x20auto\x200;\x0a\x20\x20}\x0a\x20\x20.Footer-links\x20{\x0a\x20\x20\x20\x20padding-left:\x206.25rem;\x0a\x20\x20\x20\x20text-align:\x20left;\x0a\x20\x20}\x0a\x20\x20.Footer-link\x20{\x0a\x20\x20\x20\x20display:\x20inline;\x0a\x20\x20}\x0a\x20\x20.Footer-link\x20+\x20.Footer-link\x20{\x0a\x20\x20\x20\x20border-left:\x200.0625rem\x20solid\x20#3e4042;\x0a\x20\x20\x20\x20margin-left:\x200.75rem;\x0a\x20\x20\x20\x20padding-left:\x200.75rem;\x0a\x20\x20}\x0a\x20\x20.Footer-supportedBy\x20{\x0a\x20\x20\x20\x20margin-top:\x200;\x0a\x20\x20}\x0a}\x0a\x0a.toggleButton\x20{\x0a\x20\x20cursor:\x20pointer;\x0a}\x0a.toggle\x20>\x20.collapsed\x20{\x0a\x20\x20display:\x20block;\x0a}\x0a.toggle\x20>\x20.expanded\x20{\x0a\x20\x20display:\x20none;\x0a}\x0a.toggleVisible\x20>\x20.collapsed\x20{\x0a\x20\x20display:\x20none;\x0a}\x0a.toggleVisible\x20>\x20.expanded\x20{\x0a\x20\x20display:\x20block;\x0a}\x0a\x0atable.codetable\x20{\x0a\x20\x20margin-left:\x20auto;\x0a\x20\x20margin-right:\x20auto;\x0a\x20\x20border-style:\x20none;\x0a}\x0atable.codetable\x20td\x20{\x0a\x20\x20padding-right:\x200.625rem;\x0a}\x0ahr\x20{\x0a\x20\x20border-style:\x20none;\x0a\x20\x20border-top:\x200.0625rem\x20solid\x20black;\x0a}\x0a\x0aimg.gopher\x20{\x0a\x20\x20float:\x20right;\x0a\x20\x20margin-left:\x200.625rem;\x0a\x20\x20margin-bottom:\x200.625rem;\x0a\x20\x20z-index:\x20-1;\x0a}\x0ah2\x20{\x0a\x20\x20clear:\x20right;\x0a}\x0a\x0adiv.play\x20{\x0a\x20\x20padding:\x200\x201.25rem\x202.5rem\x201.25rem;\x0a}\x0adiv.play\x20pre,\x0adiv.play\x20textarea,\x0adiv.play\x20.lines\x20{\x0a\x20\x20padding:\x200;\x0a\x20\x20margin:\x200;\x0a\x20\x20font-family:\x20Menlo,\x20monospace;\x0a\x20\x20font-size:\x200.875rem;\x0a}\x0adiv.play\x20.input\x20{\x0a\x20\x20padding:\x200.625rem;\x0a\x20\x20margin-top:\x200.625rem;\x0a\x0a\x20\x20border-top-left-radius:\x200.3125rem;\x0a\x20\x20border-top-right-radius:\x200.3125rem;\x0a\x0a\x20\x20overflow:\x20hidden;\x0a}\x0adiv.play\x20.input\x20textarea\x20{\x0a\x20\x20width:\x20100%;\x0a\x20\x20height:\x20100%;\x0a\x20\x20border:\x20none;\x0a\x20\x20outline:\x20none;\x0a\x20\x20resize:\x20none;\x0a\x0a\x20\x20overflow:\x20hidden;\x0a}\x0adiv#playground\x20.input\x20textarea\x20{\x0a\x20\x20overflow:\x20auto;\x0a\x20\x20resize:\x20auto;\x0a}\x0adiv.play\x20.output\x20{\x0a\x20\x20border-top:\x20none\x20!important;\x0a\x0a\x20\x20padding:\x200.625rem;\x0a\x20\x20max-height:\x2012.5rem;\x0a\x20\x20overflow:\x20auto;\x0a\x0a\x20\x20border-bottom-right-radius:\x200.3125rem;\x0a\x20\x20border-bottom-left-radius:\x200.3125rem;\x0a}\x0adiv.play\x20.output\x20pre\x20{\x0a\x20\x20padding:\x200;\x0a\x20\x20border-radius:\x200;\x0a}\x0adiv.play\x20.input,\x0adiv.play\x20.input\x20textarea,\x0adiv.play\x20.output,\x0adiv.play\x20.output\x20pre\x20{\x0a\x20\x20background:\x20#f7f9fa;\x0a\x20\x20color:\x20#202224;\x0a}\x0adiv.play\x20.input,\x0adiv.play\x20.output\x20{\x0a\x20\x20border:\x200.0625rem\x20solid\x20#c0c2c3;\x0a}\x0adiv.play\x20.buttons\x20{\x0a\x20\x20float:\x20right;\x0a\x20\x20padding:\x200.625rem\x200;\x0a\x20\x20text-align:\x20right;\x0a}\x0adiv.play\x20.buttons\x20.Button\x20{\x0a\x20\x20margin-left:\x200.3125rem;\x0a}\x0a.output\x20.stderr\x20{\x0a\x20\x20color:\x20#933;\x0a}\x0a.output\x20.system\x20{\x0a\x20\x20color:\x20#999;\x0a}\x0a\x0a/*\x20drop-down\x20playground\x20*/\x0adiv#playground\x20{\x0a\x20\x20/*\x20start\x20hidden;\x20revealed\x20by\x20javascript\x20*/\x0a\x20\x20display:\x20none;\x0a}\x0adiv#playground\x20{\x0a\x20\x20position:\x20absolute;\x0a\x20\x20top:\x203.938rem;\x0a\x20\x20right:\x201.25rem;\x0a\x20\x20padding:\x200\x200.625rem\x200.625rem\x200.625rem;\x0a\x20\x20z-index:\x201;\x0a\x20\x20text-align:\x20left;\x0a\x20\x20background:\x20#e0ebf5;\x0a\x0a\x20\x20border:\x200.0625rem\x20solid\x20#b0bbc5;\x0a\x20\x20border-top:\x20none;\x0a\x0a\x20\x20border-bottom-left-radius:\x200.3125rem;\x0a\x20\x20border-bottom-right-radius:\x200.3125rem;\x0a}\x0adiv#playground\x20.code\x20{\x0a\x20\x20width:\x2032.5rem;\x0a\x20\x20height:\x2012.5rem;\x0a}\x0adiv#playground\x20.output\x20{\x0a\x20\x20height:\x206.25rem;\x0a}\x0a\x0a/*\x20Inline\x20runnable\x20snippets\x20(play.js/initPlayground)\x20*/\x0a#content\x20.code\x20pre,\x0a#content\x20.playground\x20pre,\x0a#content\x20.output\x20pre\x20{\x0a\x20\x20margin:\x200;\x0a\x20\x20padding:\x200;\x0a\x20\x20background:\x20none;\x0a\x20\x20border:\x20none;\x0a\x20\x20outline:\x200\x20solid\x20transparent;\x0a\x20\x20overflow:\x20auto;\x0a}\x0a#content\x20.playground\x20.number,\x0a#content\x20.code\x20.number\x20{\x0a\x20\x20color:\x20#999;\x0a}\x0a#content\x20.code,\x0a#content\x20.playground,\x0a#content\x20.output\x20{\x0a\x20\x20width:\x20auto;\x0a\x20\x20margin:\x201.25rem;\x0a\x20\x20padding:\x200.625rem;\x0a\x20\x20border-radius:\x200.3125rem;\x0a}\x0a#content\x20.code,\x0a#content\x20.playground\x20{\x0a\x20\x20background:\x20#e9e9e9;\x0a}\x0a#content\x20.output\x20{\x0a\x20\x20background:\x20#202020;\x0a}\x0a#content\x20.output\x20.stdout,\x0a#content\x20.output\x20pre\x20{\x0a\x20\x20color:\x20#e6e6e6;\x0a}\x0a#content\x20.output\x20.stderr,\x0a#content\x20.output\x20.error\x20{\x0a\x20\x20color:\x20rgb(244,\x2074,\x2063);\x0a}\x0a#content\x20.output\x20.system,\x0a#content\x20.output\x20.exit\x20{\x0a\x20\x20color:\x20rgb(255,\x20209,\x2077);\x0a}\x0a#content\x20.buttons\x20{\x0a\x20\x20position:\x20relative;\x0a\x20\x20float:\x20right;\x0a\x20\x20top:\x20-3.125rem;\x0a\x20\x20right:\x201.875rem;\x0a}\x0a#content\x20.output\x20.buttons\x20{\x0a\x20\x20top:\x20-3.75rem;\x0a\x20\x20right:\x200;\x0a\x20\x20height:\x200;\x0a}\x0a#content\x20.buttons\x20.kill\x20{\x0a\x20\x20display:\x20none;\x0a\x20\x20visibility:\x20hidden;\x0a}\x0aa.error\x20{\x0a\x20\x20font-weight:\x20bold;\x0a\x20\x20color:\x20white;\x0a\x20\x20background-color:\x20darkred;\x0a\x20\x20border-bottom-left-radius:\x200.25rem;\x0a\x20\x20border-bottom-right-radius:\x200.25rem;\x0a\x20\x20border-top-left-radius:\x200.25rem;\x0a\x20\x20border-top-right-radius:\x200.25rem;\x0a\x20\x20padding:\x200.125rem\x200.25rem\x200.125rem\x200.25rem;\x20/*\x20TRBL\x20*/\x0a}\x0a\x0a.downloading\x20{\x0a\x20\x20background:\x20#f9f9be;\x0a\x20\x20padding:\x200.625rem;\x0a\x20\x20text-align:\x20center;\x0a\x20\x20border-radius:\x200.3125rem;\x0a}\x0a\x0a@media\x20(max-width:\x2043.75em)\x20{\x0a\x20\x20body\x20{\x0a\x20\x20\x20\x20font-size:\x200.9375rem;\x0a\x20\x20}\x0a\x0a\x20\x20div#playground\x20{\x0a\x20\x20\x20\x20left:\x200;\x0a\x20\x20\x20\x20right:\x200;\x0a\x20\x20}\x0a\x0a\x20\x20pre,\x0a\x20\x20code\x20{\x0a\x20\x20\x20\x20font-size:\x200.866rem;\x0a\x20\x20}\x0a\x0a\x20\x20#page\x20>\x20.container,\x0a\x20\x20.Header-nav\x20{\x0a\x20\x20\x20\x20padding:\x200\x200.625rem;\x0a\x20\x20}\x0a\x0a\x20\x20p,\x0a\x20\x20pre,\x0a\x20\x20ul,\x0a\x20\x20ol\x20{\x0a\x20\x20\x20\x20margin:\x200.625rem;\x0a\x20\x20}\x0a\x0a\x20\x20.pkg-synopsis\x20{\x0a\x20\x20\x20\x20display:\x20none;\x0a\x20\x20}\x0a\x0a\x20\x20img.gopher\x20{\x0a\x20\x20\x20\x20display:\x20none;\x0a\x20\x20}\x0a}\x0a\x0a@media\x20print\x20{\x0a\x20\x20pre\x20{\x0a\x20\x20\x20\x20background:\x20#fff;\x0a\x20\x20\x20\x20border:\x200.0625rem\x20solid\x20#bbb;\x0a\x20\x20\x20\x20white-space:\x20pre-wrap;\x0a\x20\x20\x20\x20page-break-inside:\x20avoid;\x0a\x20\x20}\x0a}\x0a",
+	"style.css": "body\x20{\x0a\x20\x20margin:\x200;\x0a\x20\x20font-family:\x20Roboto,\x20Arial,\x20sans-serif;\x0a\x20\x20background-color:\x20#fff;\x0a\x20\x20line-height:\x201.3;\x0a\x20\x20text-align:\x20center;\x0a\x20\x20color:\x20#3e4042;\x0a}\x0atextarea\x20{\x0a\x20\x20/*\x20Inherit\x20text\x20color\x20from\x20body\x20avoiding\x20illegible\x20text\x20in\x20the\x20case\x20where\x20the\x0a\x20\x20\x20*\x20user\x20has\x20inverted\x20the\x20browsers\x20custom\x20text\x20and\x20background\x20colors.\x20*/\x0a\x20\x20color:\x20inherit;\x0a}\x0apre,\x0acode\x20{\x0a\x20\x20font-family:\x20Menlo,\x20monospace;\x0a\x20\x20font-size:\x200.875rem;\x0a}\x0apre\x20{\x0a\x20\x20line-height:\x201.4;\x0a\x20\x20overflow-x:\x20auto;\x0a}\x0apre\x20.comment\x20{\x0a\x20\x20color:\x20#006600;\x0a}\x0apre\x20.highlight,\x0apre\x20.highlight-comment,\x0apre\x20.selection-highlight,\x0apre\x20.selection-highlight-comment\x20{\x0a\x20\x20background:\x20#ffff00;\x0a}\x0apre\x20.selection,\x0apre\x20.selection-comment\x20{\x0a\x20\x20background:\x20#ff9632;\x0a}\x0apre\x20.ln\x20{\x0a\x20\x20color:\x20#999;\x0a\x20\x20background:\x20#efefef;\x0a}\x0a.ln\x20{\x0a\x20\x20user-select:\x20none;\x0a\x0a\x20\x20/*\x20Ensure\x208\x20characters\x20in\x20the\x20document\x20-\x20which\x20due\x20to\x20floating\x0a\x20\x20\x20*\x20point\x20rendering\x20issues,\x20might\x20have\x20a\x20width\x20of\x20less\x20than\x201\x20each\x20-\x20are\x208\x0a\x20\x20\x20*\x20characters\x20wide,\x20so\x20a\x20tab\x20in\x20the\x209th\x20position\x20indents\x20properly.\x20See\x0a\x20\x20\x20*\x20https://github.com/webcompat/web-bugs/issues/17530#issuecomment-402675091\x0a\x20\x20\x20*\x20for\x20more\x20information.\x20*/\x0a\x20\x20display:\x20inline-block;\x0a\x20\x20width:\x208ch;\x0a}\x0a\x0a.search-nav\x20{\x0a\x20\x20margin-left:\x201.25rem;\x0a\x20\x20font-size:\x200.875rem;\x0a\x20\x20column-gap:\x201.25rem;\x0a\x20\x20column-fill:\x20auto;\x0a\x20\x20column-width:\x2014rem;\x0a}\x0a\x0a.search-nav\x20.indent\x20{\x0a\x20\x20margin-left:\x201.25rem;\x0a}\x0a\x0aa,\x0a.exampleHeading\x20.text,\x0a.expandAll\x20{\x0a\x20\x20color:\x20#007d9c;\x0a\x20\x20text-decoration:\x20none;\x0a}\x0aa:hover,\x0a.exampleHeading\x20.text:hover,\x0a.expandAll:hover\x20{\x0a\x20\x20text-decoration:\x20underline;\x0a}\x0a.article\x20a\x20{\x0a\x20\x20text-decoration:\x20underline;\x0a}\x0a.article\x20.title\x20a\x20{\x0a\x20\x20text-decoration:\x20none;\x0a}\x0a\x0a.permalink\x20{\x0a\x20\x20display:\x20none;\x0a}\x0a:hover\x20>\x20.permalink\x20{\x0a\x20\x20display:\x20inline;\x0a}\x0a\x0ap,\x0ali\x20{\x0a\x20\x20max-width:\x2050rem;\x0a\x20\x20word-wrap:\x20break-word;\x0a}\x0ap,\x0apre,\x0aul,\x0aol\x20{\x0a\x20\x20margin:\x201.25rem;\x0a}\x0apre\x20{\x0a\x20\x20background:\x20#efefef;\x0a\x20\x20padding:\x200.625rem;\x0a\x20\x20border-radius:\x200.3125rem;\x0a}\x0a\x0ah1,\x0ah2,\x0ah3,\x0ah4\x20{\x0a\x20\x20margin:\x201.25rem\x200\x201.25rem;\x0a\x20\x20padding:\x200;\x0a\x20\x20color:\x20#202224;\x0a\x20\x20font-family:\x20'Work\x20Sans',\x20sans-serif;\x0a\x20\x20font-weight:\x20600;\x0a}\x0ah1\x20{\x0a\x20\x20font-size:\x201.75rem;\x0a\x20\x20line-height:\x201;\x0a}\x0ah1\x20.text-muted\x20{\x0a\x20\x20color:\x20#777;\x0a}\x0ah2\x20{\x0a\x20\x20font-size:\x201.25rem;\x0a\x20\x20background:\x20#e0ebf5;\x0a\x20\x20padding:\x200.5rem;\x0a\x20\x20line-height:\x201.25;\x0a\x20\x20font-weight:\x20normal;\x0a\x20\x20overflow-wrap:\x20break-word;\x0a}\x0ah2\x20a\x20{\x0a\x20\x20font-weight:\x20bold;\x0a}\x0ah3\x20{\x0a\x20\x20font-size:\x201.25rem;\x0a\x20\x20line-height:\x201.25;\x0a\x20\x20overflow-wrap:\x20break-word;\x0a}\x0ah3,\x0ah4\x20{\x0a\x20\x20margin:\x201.25rem\x200.3125rem;\x0a}\x0ah4\x20{\x0a\x20\x20font-size:\x201rem;\x0a}\x0a\x0ah2\x20>\x20span,\x0ah3\x20>\x20span\x20{\x0a\x20\x20float:\x20right;\x0a\x20\x20margin:\x200\x2025px\x200\x200;\x0a\x20\x20font-weight:\x20normal;\x0a\x20\x20color:\x20#5279c7;\x0a}\x0a\x0adl\x20{\x0a\x20\x20margin:\x201.25rem;\x0a}\x0add\x20{\x0a\x20\x20margin:\x200\x200\x200\x201.25rem;\x0a}\x0adl,\x0add\x20{\x0a\x20\x20font-size:\x200.875rem;\x0a}\x0adiv#nav\x20table\x20td\x20{\x0a\x20\x20vertical-align:\x20top;\x0a}\x0a\x0a.ModTable\x20{\x0a\x20\x20border-collapse:\x20collapse;\x0a\x20\x20margin:\x201.25rem;\x0a\x20\x20max-width:\x2050rem;\x0a}\x0a.ModTable\x20code\x20{\x0a\x20\x20white-space:\x20nowrap;\x0a}\x0a.ModTable\x20td,\x0a.ModTable\x20th\x20{\x0a\x20\x20border:\x201px\x20solid\x20#a9a9a9;\x0a\x20\x20padding:\x201rem;\x0a\x20\x20vertical-align:\x20top;\x0a}\x0a.ModTable\x20td\x20p\x20{\x0a\x20\x20margin:\x200\x200\x201rem\x200;\x0a}\x0a.ModTable\x20td\x20p:last-child\x20{\x0a\x20\x20margin-bottom:\x200;\x0a}\x0a\x0a#pkg-index\x20h3\x20{\x0a\x20\x20font-size:\x201rem;\x0a}\x0a.pkg-dir\x20{\x0a\x20\x20padding:\x200\x200.625rem;\x0a}\x0a.pkg-dir\x20table\x20{\x0a\x20\x20border-collapse:\x20collapse;\x0a\x20\x20border-spacing:\x200;\x0a}\x0a.pkg-name\x20{\x0a\x20\x20padding-right:\x200.625rem;\x0a}\x0a.alert\x20{\x0a\x20\x20color:\x20#aa0000;\x0a}\x0a\x0a#pkg-examples\x20h3\x20{\x0a\x20\x20float:\x20left;\x0a}\x0a\x0a#pkg-examples\x20dl\x20{\x0a\x20\x20clear:\x20both;\x0a}\x0a\x0a.expandAll\x20{\x0a\x20\x20cursor:\x20pointer;\x0a\x20\x20float:\x20left;\x0a\x20\x20margin:\x201.25rem\x200;\x0a}\x0a\x0a.Site\x20{\x0a\x20\x20display:\x20flex;\x0a\x20\x20flex-direction:\x20column;\x0a\x20\x20min-height:\x20100vh;\x0a}\x0a.Site-content\x20{\x0a\x20\x20flex:\x201;\x0a}\x0a#page\x20{\x0a\x20\x20width:\x20100%;\x0a}\x0a#page\x20>\x20.container,\x0a.Header-nav\x20{\x0a\x20\x20text-align:\x20left;\x0a\x20\x20margin-left:\x20auto;\x0a\x20\x20margin-right:\x20auto;\x0a\x20\x20padding:\x200\x201.25rem;\x0a}\x0a#page\x20>\x20.container,\x0a.Header-nav,\x0a.Footer\x20{\x0a\x20\x20max-width:\x2059.38rem;\x0a}\x0a#page.wide\x20>\x20.container,\x0a.Header-nav--wide,\x0a.Footer--wide\x20{\x0a\x20\x20max-width:\x20none;\x0a}\x0a\x0adiv#playground\x20.buttons\x20a\x20{\x0a\x20\x20background:\x20#375eab;\x0a\x20\x20border:\x200.0625rem\x20solid\x20#757575;\x0a\x20\x20color:\x20white;\x0a}\x0a\x0a/*\x20Style\x20download\x20button\x20on\x20doc/install\x20page\x20*/\x0aa#start\x20{\x0a\x20\x20background:\x20#e0ebf5;\x0a\x20\x20border:\x200.0625rem\x20solid\x20#375eab;\x0a\x20\x20border-radius:\x200.3125rem;\x0a\x20\x20color:\x20#222;\x0a\x20\x20display:\x20block;\x0a\x20\x20padding:\x200.625rem;\x0a\x20\x20text-align:\x20center;\x0a\x20\x20text-decoration:\x20none;\x0a}\x0aa#start\x20.big\x20{\x0a\x20\x20display:\x20block;\x0a\x20\x20font-size:\x201.25rem;\x0a\x20\x20font-weight:\x20bold;\x0a}\x0aa#start\x20.desc\x20{\x0a\x20\x20display:\x20block;\x0a\x20\x20font-size:\x200.875rem;\x0a\x20\x20font-weight:\x20normal;\x0a\x20\x20margin-top:\x200.3125rem;\x0a}\x0a\x0a.download\x20{\x0a\x20\x20width:\x209.375rem;\x0a}\x0a\x0a::-webkit-input-placeholder\x20{\x0a\x20\x20color:\x20#7f7f7f;\x0a\x20\x20opacity:\x201;\x0a}\x0a::placeholder\x20{\x0a\x20\x20color:\x20#7f7f7f;\x0a\x20\x20opacity:\x201;\x0a}\x0a\x0a.Header\x20{\x0a\x20\x20align-items:\x20center;\x0a\x20\x20box-sizing:\x20border-box;\x0a\x20\x20display:\x20flex;\x0a\x20\x20font-size:\x200.875rem;\x0a\x20\x20justify-content:\x20space-between;\x0a\x20\x20padding:\x201.375rem\x200;\x0a}\x0a.Header.is-active\x20{\x0a\x20\x20background-color:\x20#f7f9fa;\x0a}\x0a.Header-logo\x20{\x0a\x20\x20height:\x202rem;\x0a\x20\x20width:\x205.125rem;\x0a}\x0a.Header-nav\x20{\x0a\x20\x20align-items:\x20center;\x0a\x20\x20display:\x20flex;\x0a\x20\x20flex-wrap:\x20wrap;\x0a\x20\x20justify-content:\x20space-between;\x0a\x20\x20width:\x20100%;\x0a}\x0a.Header-menuButton\x20{\x0a\x20\x20background-color:\x20transparent;\x0a\x20\x20border:\x20none;\x0a\x20\x20box-sizing:\x20content-box;\x0a\x20\x20cursor:\x20pointer;\x0a\x20\x20display:\x20inline-block;\x0a\x20\x20height:\x201.313rem;\x0a\x20\x20padding:\x200.375rem;\x0a\x20\x20position:\x20relative;\x0a\x20\x20vertical-align:\x20middle;\x0a\x20\x20width:\x201.313rem;\x0a}\x0a.Header-menuButtonInner\x20{\x0a\x20\x20position:\x20relative;\x0a}\x0a.Header-menuButton::after,\x0a.Header-menuButtonInner,\x0a.Header-menuButtonInner::before,\x0a.Header-menuButtonInner::after\x20{\x0a\x20\x20background-color:\x20#3e4042;\x0a\x20\x20height:\x200.1875rem;\x0a\x20\x20transition:\x20all\x20100ms\x20ease-in;\x0a}\x0a.Header-menuButton::after\x20{\x0a\x20\x20opacity:\x200;\x0a\x20\x20top:\x200.9375rem;\x0a}\x0a.Header-menuButton::after,\x0a.Header-menuButtonInner::before,\x0a.Header-menuButtonInner::after\x20{\x0a\x20\x20content:\x20'';\x0a\x20\x20display:\x20block;\x0a\x20\x20position:\x20absolute;\x0a\x20\x20width:\x201.313rem;\x0a}\x0a.Header-menuButtonInner::before\x20{\x0a\x20\x20top:\x20-0.375rem;\x0a}\x0a.Header-menuButtonInner::after\x20{\x0a\x20\x20bottom:\x20-0.375rem;\x0a}\x0a.Header.is-active\x20.Header-menuButton::after\x20{\x0a\x20\x20opacity:\x201;\x0a\x20\x20transform:\x20rotate(-45deg);\x0a}\x0a.Header.is-active\x20.Header-menuButton\x20.Header-menuButtonInner\x20{\x0a\x20\x20transform:\x20rotate(45deg);\x0a}\x0a.Header.is-active\x20.Header-menuButton\x20.Header-menuButtonInner::before,\x0a.Header.is-active\x20.Header-menuButton\x20.Header-menuButtonInner::after\x20{\x0a\x20\x20background-color:\x20transparent;\x0a}\x0a.Header-menu\x20{\x0a\x20\x20align-items:\x20center;\x0a\x20\x20display:\x20none;\x0a\x20\x20flex-direction:\x20column;\x0a\x20\x20list-style:\x20none;\x0a\x20\x20margin:\x200;\x0a\x20\x20padding:\x200;\x0a\x20\x20width:\x20100%;\x0a}\x0a.Header.is-active\x20.Header-menu\x20{\x0a\x20\x20display:\x20flex;\x0a}\x0a.Header-menuItem:first-of-type\x20{\x0a\x20\x20/*\x20Offset\x20the\x20padding\x20of\x20the\x20inner\x20link,\x20maintaining\x20its\x20click\x20target\x20size,\x0a\x20\x20\x20\x20\x20while\x20still\x20placing\x20the\x20item\x20as\x20if\x20it\x20had\x20no\x20top\x20margin\x20or\x20padding.\x20*/\x0a\x20\x20margin-top:\x20-0.5rem;\x0a}\x0a.Header-menuItem\x20{\x0a\x20\x20display:\x20inline-flex;\x0a}\x0a.Header-menuItem,\x0a.Header-menuItem\x20a:link,\x0a.Header-menuItem\x20a:visited,\x0a.Header-menuItem--search,\x0a.HeaderSearch\x20{\x0a\x20\x20width:\x20100%;\x0a}\x0a.Header-menuItem,\x0a.Header-menuItem\x20a:link,\x0a.Header-menuItem\x20a:visited\x20{\x0a\x20\x20color:\x20#3e4042;\x0a\x20\x20text-align:\x20center;\x0a}\x0a.Header-menuItem\x20a:link,\x0a.Header-menuItem\x20a:visited\x20{\x0a\x20\x20padding:\x200.5rem\x200;\x0a}\x0a.Header-menuItem--search\x20{\x0a\x20\x20margin-top:\x200.5rem;\x0a}\x0a.HeaderSearch,\x0a.HeaderSearch-label\x20{\x0a\x20\x20display:\x20inline-block;\x0a\x20\x20position:\x20relative;\x0a}\x0a.HeaderSearch\x20{\x0a\x20\x20border:\x200.0625rem\x20solid\x20#979797;\x0a\x20\x20border-radius:\x200.1875rem;\x0a\x20\x20display:\x20inline-flex;\x0a\x20\x20overflow:\x20hidden;\x0a\x20\x20position:\x20relative;\x0a}\x0a.HeaderSearch-input\x20{\x0a\x20\x20-webkit-appearance:\x20none;\x0a\x20\x20border:\x20none;\x0a\x20\x20border-radius:\x200;\x0a\x20\x20box-sizing:\x20border-box;\x0a\x20\x20display:\x20block;\x0a\x20\x20flex:\x201;\x0a\x20\x20font:\x20inherit;\x0a\x20\x20font-size:\x2016px;\x20/*\x20Prevents\x20automatic\x20zoom\x20on\x20mobile\x20devices\x20*/\x0a\x20\x20margin:\x200;\x0a\x20\x20padding:\x200.5rem;\x0a}\x0a.HeaderSearch-input::-webkit-search-decoration\x20{\x0a\x20\x20-webkit-appearance:\x20none;\x0a}\x0a.HeaderSearch-input::-moz-ui-invalid\x20{\x0a\x20\x20box-shadow:\x20unset;\x0a}\x0a.HeaderSearch-submit\x20{\x0a\x20\x20background-color:\x20#fff;\x0a\x20\x20border:\x20none;\x0a\x20\x20box-sizing:\x20border-box;\x0a\x20\x20cursor:\x20pointer;\x0a\x20\x20margin:\x200;\x0a\x20\x20padding:\x200.125rem\x200.5rem\x200\x200.55rem;\x0a\x20\x20transition:\x20background-color\x20200ms;\x0a}\x0a.HeaderSearch:focus-within\x20.HeaderSearch-submit\x20{\x0a\x20\x20background-color:\x20#e5f6fb;\x0a}\x0a.HeaderSearch-icon\x20{\x0a\x20\x20fill:\x20#757575;\x0a\x20\x20transition:\x20fill\x20200ms;\x0a}\x0a.HeaderSearch:focus-within\x20.HeaderSearch-icon\x20{\x0a\x20\x20fill:\x20#007d9c;\x0a}\x0a@media\x20only\x20screen\x20and\x20(min-width:\x2056rem)\x20{\x0a\x20\x20.Header\x20{\x0a\x20\x20\x20\x20height:\x205.125rem;\x0a\x20\x20}\x0a\x20\x20.Header.is-active\x20{\x0a\x20\x20\x20\x20background-color:\x20#fff;\x0a\x20\x20}\x0a\x20\x20.Header.is-active\x20.Header-menu\x20{\x0a\x20\x20\x20\x20display:\x20block;\x0a\x20\x20}\x0a\x20\x20.Header-menuButton\x20{\x0a\x20\x20\x20\x20display:\x20none;\x0a\x20\x20}\x0a\x20\x20.Header-menu\x20{\x0a\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20flex-direction:\x20row;\x0a\x20\x20\x20\x20width:\x20auto;\x0a\x20\x20}\x0a\x20\x20.Header-menuItem:first-of-type\x20{\x0a\x20\x20\x20\x20margin-top:\x200;\x0a\x20\x20}\x0a\x20\x20.Header-menuItem,\x0a\x20\x20.Header-menuItem\x20a:link,\x0a\x20\x20.Header-menuItem\x20a:visited\x20{\x0a\x20\x20\x20\x20width:\x20auto;\x0a\x20\x20}\x0a\x20\x20.Header-menuItem\x20a:link,\x0a\x20\x20.Header-menuItem\x20a:visited\x20{\x0a\x20\x20\x20\x20padding:\x202rem\x201.5rem;\x0a\x20\x20}\x0a\x20\x20.Header-menuItem\x20a:hover,\x0a\x20\x20.Header-menuItem\x20a:focus\x20{\x0a\x20\x20\x20\x20text-decoration:\x20underline;\x0a\x20\x20}\x0a\x20\x20.Header-menuItem--search,\x0a\x20\x20.HeaderSearch\x20{\x0a\x20\x20\x20\x20width:\x208.75rem;\x0a\x20\x20}\x0a\x20\x20.Header-menuItem--search\x20{\x0a\x20\x20\x20\x20margin-left:\x201.5rem;\x0a\x20\x20\x20\x20margin-top:\x200;\x0a\x20\x20}\x0a\x20\x20.HeaderSearch-input\x20{\x0a\x20\x20\x20\x20min-width:\x205.625rem;\x0a\x20\x20}\x0a\x20\x20.HeaderSearch-submit\x20{\x0a\x20\x20\x20\x20padding:\x200.125rem\x200.5rem\x200;\x0a\x20\x20}\x0a}\x0a@media\x20only\x20screen\x20and\x20(min-width:\x2057.5rem)\x20{\x0a\x20\x20.Header\x20{\x0a\x20\x20\x20\x20font-size:\x201rem;\x0a\x20\x20}\x0a}\x0a\x0a.Button,\x0a.Button:link,\x0a.Button:visited\x20{\x0a\x20\x20align-items:\x20center;\x0a\x20\x20background-color:\x20#f7f9fa;\x0a\x20\x20border:\x20none;\x0a\x20\x20border-radius:\x200.1875rem;\x0a\x20\x20box-shadow:\x200\x202px\x205px\x20rgba(0,\x200,\x200,\x200.2);\x0a\x20\x20box-sizing:\x20border-box;\x0a\x20\x20color:\x20#007d9c;\x0a\x20\x20cursor:\x20pointer;\x0a\x20\x20display:\x20inline-flex;\x0a\x20\x20font:\x20bold\x200.875rem\x20Roboto,\x20sans-serif;\x0a\x20\x20height:\x202.375rem;\x0a\x20\x20padding:\x200\x200.625rem;\x0a\x20\x20justify-content:\x20center;\x0a\x20\x20min-width:\x204.063rem;\x0a\x20\x20text-decoration:\x20none;\x0a}\x0a.Button:active\x20{\x0a\x20\x20box-shadow:\x200\x201px\x203px\x20rgba(0,\x200,\x200,\x200.2);\x0a}\x0a.Button--primary,\x0a.Button--primary:link,\x0a.Button--primary:visited\x20{\x0a\x20\x20border:\x200.0625rem\x20solid\x20#00add8;\x0a}\x0a.Button--big,\x0a.Button--big:link,\x0a.Button--big:visited\x20{\x0a\x20\x20background-color:\x20#7fd5ea;\x0a\x20\x20border-radius:\x200.3125rem;\x0a\x20\x20color:\x20#202224;\x0a\x20\x20font-size:\x201.5rem;\x0a\x20\x20height:\x204rem;\x0a\x20\x20justify-content:\x20center;\x0a}\x0a\x0a.HomeContainer\x20{\x0a\x20\x20align-items:\x20top;\x0a\x20\x20display:\x20flex;\x0a\x20\x20flex-wrap:\x20wrap;\x0a\x20\x20justify-content:\x20space-between;\x0a}\x0a.HomeContainer\x20*\x20{\x0a\x20\x20box-sizing:\x20border-box;\x0a}\x0a\x0a.HomeSection\x20{\x0a\x20\x20flex:\x200\x200\x20100%;\x0a\x20\x20margin-bottom:\x202.5rem;\x0a\x20\x20padding:\x200\x201rem;\x0a}\x0a.HomeSection-header\x20{\x0a\x20\x20background:\x20none;\x0a\x20\x20color:\x20#202224;\x0a\x20\x20margin:\x200\x200\x200.625rem\x200;\x0a\x20\x20padding:\x200;\x0a\x20\x20font-weight:\x20bold;\x0a}\x0a\x0a.Hero-header\x20{\x0a\x20\x20font:\x201.5rem\x20Roboto,\x20sans-serif;\x0a\x20\x20line-height:\x20inherit;\x0a\x20\x20margin:\x200\x200\x201.875rem;\x0a}\x0a.Hero-gopher\x20{\x0a\x20\x20background:\x20url('/lib/godoc/images/home-gopher.png')\x20no-repeat;\x0a\x20\x20background-position:\x20center\x20top;\x0a\x20\x20display:\x20block;\x0a\x20\x20height:\x209.688rem;\x0a\x20\x20max-height:\x20200px;\x20/*\x20Setting\x20in\x20px\x20to\x20prevent\x20the\x20gopher\x20from\x20blowing\x20up\x20in\x20very\x20high\x20default\x20font-sizes\x20*/\x0a}\x0a.HeroDownloadButton,\x0a.Hero-description\x20{\x0a\x20\x20text-align:\x20center;\x0a}\x0a.HeroDownloadButton,\x0a.HeroDownloadButton:link,\x0a.HeroDownloadButton:visited\x20{\x0a\x20\x20display:\x20flex;\x0a\x20\x20margin-bottom:\x200.5rem;\x0a}\x0a.HeroDownloadButton-image\x20{\x0a\x20\x20height:\x202rem;\x0a\x20\x20margin-right:\x202rem;\x0a\x20\x20width:\x202rem;\x0a}\x0a.Hero-description\x20{\x0a\x20\x20color:\x20#616161;\x0a\x20\x20font-size:\x200.875rem;\x0a\x20\x20margin:\x200;\x0a}\x0a@media\x20only\x20screen\x20and\x20(min-width:\x2057.1875rem)\x20{\x0a\x20\x20.HomeSection\x20{\x0a\x20\x20\x20\x20flex:\x200\x200\x2026.875rem;\x0a\x20\x20\x20\x20padding:\x200;\x0a\x20\x20}\x0a\x20\x20.Hero,\x0a\x20\x20.Playground\x20{\x0a\x20\x20\x20\x20margin-top:\x201rem;\x0a\x20\x20}\x0a}\x0a\x0a.Playground-headerContainer\x20{\x0a\x20\x20align-items:\x20baseline;\x0a\x20\x20display:\x20flex;\x0a\x20\x20justify-content:\x20space-between;\x0a}\x0a.Playground-popout\x20{\x0a\x20\x20background:\x20url('/lib/godoc/images/play-link.svg')\x20no-repeat;\x0a\x20\x20background-position:\x20right\x20center;\x0a\x20\x20cursor:\x20pointer;\x0a\x20\x20display:\x20block;\x0a\x20\x20font-size:\x201rem;\x0a\x20\x20padding:\x200\x201.688rem;\x0a}\x0a.Playground-input,\x0a.Playground-output\x20{\x0a\x20\x20padding:\x200;\x0a\x20\x20margin:\x200;\x0a\x20\x20font-family:\x20Menlo,\x20monospace;\x0a\x20\x20font-size:\x200.875rem;\x0a}\x0a.Playground-inputContainer\x20{\x0a\x20\x20border-top-left-radius:\x200.3125rem;\x0a\x20\x20border-top-right-radius:\x200.3125rem;\x0a\x20\x20overflow:\x20hidden;\x0a\x20\x20height:\x2011rem;\x0a}\x0a.Playground-input\x20{\x0a\x20\x20width:\x20100%;\x0a\x20\x20height:\x20100%;\x0a\x20\x20border:\x20none;\x0a\x20\x20outline:\x20none;\x0a\x20\x20resize:\x20none;\x0a\x20\x20padding:\x200.625rem;\x0a}\x0a.Playground-outputContainer\x20{\x0a\x20\x20border-bottom-right-radius:\x200.3125rem;\x0a\x20\x20border-bottom-left-radius:\x200.3125rem;\x0a\x20\x20border-top:\x20none\x20!important;\x0a\x20\x20padding:\x200.625rem;\x0a\x20\x20height:\x205rem;\x0a\x20\x20margin-bottom:\x201rem;\x0a\x20\x20overflow:\x20auto;\x0a}\x0a.Playground-output\x20{\x0a\x20\x20padding:\x200;\x0a\x20\x20border-radius:\x200;\x0a}\x0a.Playground-inputContainer,\x0a.Playground-input,\x0a.Playground-outputContainer,\x0a.Playground-output\x20{\x0a\x20\x20background:\x20#f7f9fa;\x0a\x20\x20color:\x20#202224;\x0a}\x0a.Playground-inputContainer,\x0a.Playground-outputContainer\x20{\x0a\x20\x20border:\x200.0625rem\x20solid\x20#c0c2c3;\x0a}\x0a.Playground-controls\x20{\x0a\x20\x20display:\x20flex;\x0a\x20\x20flex-wrap:\x20wrap;\x0a}\x0a.Playground-buttons\x20{\x0a\x20\x20display:\x20flex;\x0a\x20\x20flex:\x201;\x0a\x20\x20flex-wrap:\x20nowrap;\x0a\x20\x20justify-content:\x20space-between;\x0a}\x0a.Playground-selectExample\x20{\x0a\x20\x20background-color:\x20white;\x0a\x20\x20border-radius:\x203px;\x0a\x20\x20border:\x200.0625rem\x20solid\x20#979797;\x0a\x20\x20color:\x20inherit;\x0a\x20\x20font-family:\x20inherit;\x0a\x20\x20font-size:\x2016px;\x20/*\x20Prevents\x20automatic\x20zoom\x20on\x20mobile\x20devices\x20*/\x0a\x20\x20height:\x202.375rem;\x0a\x20\x20margin:\x200\x200\x200.5rem\x200;\x0a\x20\x20width:\x20100%;\x0a}\x0a.Playground-secondaryButtons\x20{\x0a\x20\x20white-space:\x20nowrap;\x0a}\x0a.Playground-secondaryButtons\x20.Button:not(:first-child)\x20{\x0a\x20\x20margin-left:\x200.4375rem;\x0a}\x0a@media\x20only\x20screen\x20and\x20(min-width:\x2027.8125rem)\x20{\x0a\x20\x20.Playground-outputContainer\x20{\x0a\x20\x20\x20\x20margin-bottom:\x201.688rem;\x0a\x20\x20}\x0a\x20\x20.Playground-controls\x20{\x0a\x20\x20\x20\x20flex-wrap:\x20nowrap;\x0a\x20\x20}\x0a\x20\x20.Playground-selectExample\x20{\x0a\x20\x20\x20\x20margin:\x200\x200.4375rem\x200\x200;\x0a\x20\x20\x20\x20width:\x20auto;\x0a\x20\x20}\x0a}\x0a\x0a.Blog-title\x20{\x0a\x20\x20display:\x20block;\x0a\x20\x20font-size:\x201.25rem;\x0a\x20\x20font-weight:\x20normal;\x0a\x20\x20margin:\x200;\x0a}\x0a.Blog-title,\x0a.Blog-extract,\x0a.Blog-when\x20{\x0a\x20\x20margin-bottom:\x200.625rem;\x0a}\x0a.Blog-when\x20{\x0a\x20\x20color:\x20#666;\x0a\x20\x20font-size:\x200.875rem;\x0a}\x0a.Blog-footer\x20{\x0a\x20\x20text-align:\x20right;\x0a}\x0a\x0a@supports\x20(--c:\x200)\x20{\x0a\x20\x20[style*='--aspect-ratio-padding:']\x20{\x0a\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20overflow:\x20hidden;\x0a\x20\x20\x20\x20padding-top:\x20var(--aspect-ratio-padding);\x0a\x20\x20}\x0a\x20\x20[style*='--aspect-ratio-padding:']\x20>\x20*\x20{\x0a\x20\x20\x20\x20position:\x20absolute;\x0a\x20\x20\x20\x20top:\x200;\x0a\x20\x20\x20\x20left:\x200;\x0a\x20\x20\x20\x20width:\x20100%;\x0a\x20\x20\x20\x20height:\x20100%;\x0a\x20\x20}\x0a}\x0a\x0a.Footer\x20{\x0a\x20\x20margin:\x202rem\x20auto\x200;\x0a\x20\x20padding:\x201rem\x201.25rem;\x0a\x20\x20position:\x20relative;\x0a\x20\x20text-align:\x20right;\x0a}\x0a.Footer-gopher\x20{\x0a\x20\x20bottom:\x200;\x0a\x20\x20left:\x201.25rem;\x0a\x20\x20position:\x20absolute;\x0a\x20\x20width:\x205rem;\x0a}\x0a.Footer-links\x20{\x0a\x20\x20flex:\x201;\x0a\x20\x20list-style:\x20none;\x0a\x20\x20margin:\x200;\x0a\x20\x20padding:\x200;\x0a}\x0a.Footer-link\x20{\x0a\x20\x20font-size:\x200.875rem;\x0a\x20\x20white-space:\x20nowrap;\x0a}\x0a.Footer-link\x20+\x20.Footer-link\x20{\x0a\x20\x20margin-top:\x200.5rem;\x0a}\x0a.Footer-supportedBy\x20{\x0a\x20\x20color:\x20#6e7072;\x0a\x20\x20display:\x20inline-block;\x0a\x20\x20font:\x200.875rem\x20'Product\x20Sans',\x20'Roboto',\x20'sans-serif';\x0a\x20\x20margin-top:\x201rem;\x0a}\x0a.Footer-supportedBy:hover\x20{\x0a\x20\x20text-decoration:\x20none;\x0a}\x0a@media\x20only\x20screen\x20and\x20(min-width:\x2050rem)\x20{\x0a\x20\x20.Footer\x20{\x0a\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20margin:\x205rem\x20auto\x200;\x0a\x20\x20}\x0a\x20\x20.Footer-links\x20{\x0a\x20\x20\x20\x20padding-left:\x206.25rem;\x0a\x20\x20\x20\x20text-align:\x20left;\x0a\x20\x20}\x0a\x20\x20.Footer-link\x20{\x0a\x20\x20\x20\x20display:\x20inline;\x0a\x20\x20}\x0a\x20\x20.Footer-link\x20+\x20.Footer-link\x20{\x0a\x20\x20\x20\x20border-left:\x200.0625rem\x20solid\x20#3e4042;\x0a\x20\x20\x20\x20margin-left:\x200.75rem;\x0a\x20\x20\x20\x20padding-left:\x200.75rem;\x0a\x20\x20}\x0a\x20\x20.Footer-supportedBy\x20{\x0a\x20\x20\x20\x20margin-top:\x200;\x0a\x20\x20}\x0a}\x0a\x0a.toggleButton\x20{\x0a\x20\x20cursor:\x20pointer;\x0a}\x0a.toggle\x20>\x20.collapsed\x20{\x0a\x20\x20display:\x20block;\x0a}\x0a.toggle\x20>\x20.expanded\x20{\x0a\x20\x20display:\x20none;\x0a}\x0a.toggleVisible\x20>\x20.collapsed\x20{\x0a\x20\x20display:\x20none;\x0a}\x0a.toggleVisible\x20>\x20.expanded\x20{\x0a\x20\x20display:\x20block;\x0a}\x0a\x0atable.codetable\x20{\x0a\x20\x20margin-left:\x20auto;\x0a\x20\x20margin-right:\x20auto;\x0a\x20\x20border-style:\x20none;\x0a}\x0atable.codetable\x20td\x20{\x0a\x20\x20padding-right:\x200.625rem;\x0a}\x0ahr\x20{\x0a\x20\x20border-style:\x20none;\x0a\x20\x20border-top:\x200.0625rem\x20solid\x20black;\x0a}\x0a\x0aimg.gopher\x20{\x0a\x20\x20float:\x20right;\x0a\x20\x20margin-left:\x200.625rem;\x0a\x20\x20margin-bottom:\x200.625rem;\x0a\x20\x20z-index:\x20-1;\x0a}\x0ah2\x20{\x0a\x20\x20clear:\x20right;\x0a}\x0a\x0adiv.play\x20{\x0a\x20\x20padding:\x200\x201.25rem\x202.5rem\x201.25rem;\x0a}\x0adiv.play\x20pre,\x0adiv.play\x20textarea,\x0adiv.play\x20.lines\x20{\x0a\x20\x20padding:\x200;\x0a\x20\x20margin:\x200;\x0a\x20\x20font-family:\x20Menlo,\x20monospace;\x0a\x20\x20font-size:\x200.875rem;\x0a}\x0adiv.play\x20.input\x20{\x0a\x20\x20padding:\x200.625rem;\x0a\x20\x20margin-top:\x200.625rem;\x0a\x0a\x20\x20border-top-left-radius:\x200.3125rem;\x0a\x20\x20border-top-right-radius:\x200.3125rem;\x0a\x0a\x20\x20overflow:\x20hidden;\x0a}\x0adiv.play\x20.input\x20textarea\x20{\x0a\x20\x20width:\x20100%;\x0a\x20\x20height:\x20100%;\x0a\x20\x20border:\x20none;\x0a\x20\x20outline:\x20none;\x0a\x20\x20resize:\x20none;\x0a\x0a\x20\x20overflow:\x20hidden;\x0a}\x0adiv#playground\x20.input\x20textarea\x20{\x0a\x20\x20overflow:\x20auto;\x0a\x20\x20resize:\x20auto;\x0a}\x0adiv.play\x20.output\x20{\x0a\x20\x20border-top:\x20none\x20!important;\x0a\x0a\x20\x20padding:\x200.625rem;\x0a\x20\x20max-height:\x2012.5rem;\x0a\x20\x20overflow:\x20auto;\x0a\x0a\x20\x20border-bottom-right-radius:\x200.3125rem;\x0a\x20\x20border-bottom-left-radius:\x200.3125rem;\x0a}\x0adiv.play\x20.output\x20pre\x20{\x0a\x20\x20padding:\x200;\x0a\x20\x20border-radius:\x200;\x0a}\x0adiv.play\x20.input,\x0adiv.play\x20.input\x20textarea,\x0adiv.play\x20.output,\x0adiv.play\x20.output\x20pre\x20{\x0a\x20\x20background:\x20#f7f9fa;\x0a\x20\x20color:\x20#202224;\x0a}\x0adiv.play\x20.input,\x0adiv.play\x20.output\x20{\x0a\x20\x20border:\x200.0625rem\x20solid\x20#c0c2c3;\x0a}\x0adiv.play\x20.buttons\x20{\x0a\x20\x20float:\x20right;\x0a\x20\x20padding:\x200.625rem\x200;\x0a\x20\x20text-align:\x20right;\x0a}\x0adiv.play\x20.buttons\x20.Button\x20{\x0a\x20\x20margin-left:\x200.3125rem;\x0a}\x0a.output\x20.stderr\x20{\x0a\x20\x20color:\x20#933;\x0a}\x0a.output\x20.system\x20{\x0a\x20\x20color:\x20#999;\x0a}\x0a\x0a/*\x20drop-down\x20playground\x20*/\x0adiv#playground\x20{\x0a\x20\x20/*\x20start\x20hidden;\x20revealed\x20by\x20javascript\x20*/\x0a\x20\x20display:\x20none;\x0a}\x0adiv#playground\x20{\x0a\x20\x20position:\x20absolute;\x0a\x20\x20top:\x203.938rem;\x0a\x20\x20right:\x201.25rem;\x0a\x20\x20padding:\x200\x200.625rem\x200.625rem\x200.625rem;\x0a\x20\x20z-index:\x201;\x0a\x20\x20text-align:\x20left;\x0a\x20\x20background:\x20#e0ebf5;\x0a\x0a\x20\x20border:\x200.0625rem\x20solid\x20#b0bbc5;\x0a\x20\x20border-top:\x20none;\x0a\x0a\x20\x20border-bottom-left-radius:\x200.3125rem;\x0a\x20\x20border-bottom-right-radius:\x200.3125rem;\x0a}\x0adiv#playground\x20.code\x20{\x0a\x20\x20width:\x2032.5rem;\x0a\x20\x20height:\x2012.5rem;\x0a}\x0adiv#playground\x20.output\x20{\x0a\x20\x20height:\x206.25rem;\x0a}\x0a\x0a/*\x20Inline\x20runnable\x20snippets\x20(play.js/initPlayground)\x20*/\x0a#content\x20.code\x20pre,\x0a#content\x20.playground\x20pre,\x0a#content\x20.output\x20pre\x20{\x0a\x20\x20margin:\x200;\x0a\x20\x20padding:\x200;\x0a\x20\x20background:\x20none;\x0a\x20\x20border:\x20none;\x0a\x20\x20outline:\x200\x20solid\x20transparent;\x0a\x20\x20overflow:\x20auto;\x0a}\x0a#content\x20.playground\x20.number,\x0a#content\x20.code\x20.number\x20{\x0a\x20\x20color:\x20#999;\x0a}\x0a#content\x20.code,\x0a#content\x20.playground,\x0a#content\x20.output\x20{\x0a\x20\x20width:\x20auto;\x0a\x20\x20margin:\x201.25rem;\x0a\x20\x20padding:\x200.625rem;\x0a\x20\x20border-radius:\x200.3125rem;\x0a}\x0a#content\x20.code,\x0a#content\x20.playground\x20{\x0a\x20\x20background:\x20#e9e9e9;\x0a}\x0a#content\x20.output\x20{\x0a\x20\x20background:\x20#202020;\x0a}\x0a#content\x20.output\x20.stdout,\x0a#content\x20.output\x20pre\x20{\x0a\x20\x20color:\x20#e6e6e6;\x0a}\x0a#content\x20.output\x20.stderr,\x0a#content\x20.output\x20.error\x20{\x0a\x20\x20color:\x20rgb(244,\x2074,\x2063);\x0a}\x0a#content\x20.output\x20.system,\x0a#content\x20.output\x20.exit\x20{\x0a\x20\x20color:\x20rgb(255,\x20209,\x2077);\x0a}\x0a#content\x20.buttons\x20{\x0a\x20\x20position:\x20relative;\x0a\x20\x20float:\x20right;\x0a\x20\x20top:\x20-3.125rem;\x0a\x20\x20right:\x201.875rem;\x0a}\x0a#content\x20.output\x20.buttons\x20{\x0a\x20\x20top:\x20-3.75rem;\x0a\x20\x20right:\x200;\x0a\x20\x20height:\x200;\x0a}\x0a#content\x20.buttons\x20.kill\x20{\x0a\x20\x20display:\x20none;\x0a\x20\x20visibility:\x20hidden;\x0a}\x0aa.error\x20{\x0a\x20\x20font-weight:\x20bold;\x0a\x20\x20color:\x20white;\x0a\x20\x20background-color:\x20darkred;\x0a\x20\x20border-bottom-left-radius:\x200.25rem;\x0a\x20\x20border-bottom-right-radius:\x200.25rem;\x0a\x20\x20border-top-left-radius:\x200.25rem;\x0a\x20\x20border-top-right-radius:\x200.25rem;\x0a\x20\x20padding:\x200.125rem\x200.25rem\x200.125rem\x200.25rem;\x20/*\x20TRBL\x20*/\x0a}\x0a\x0a.downloading\x20{\x0a\x20\x20background:\x20#f9f9be;\x0a\x20\x20padding:\x200.625rem;\x0a\x20\x20text-align:\x20center;\x0a\x20\x20border-radius:\x200.3125rem;\x0a}\x0a\x0a@media\x20(max-width:\x2043.75em)\x20{\x0a\x20\x20body\x20{\x0a\x20\x20\x20\x20font-size:\x200.9375rem;\x0a\x20\x20}\x0a\x0a\x20\x20div#playground\x20{\x0a\x20\x20\x20\x20left:\x200;\x0a\x20\x20\x20\x20right:\x200;\x0a\x20\x20}\x0a\x0a\x20\x20pre,\x0a\x20\x20code\x20{\x0a\x20\x20\x20\x20font-size:\x200.866rem;\x0a\x20\x20}\x0a\x0a\x20\x20#page\x20>\x20.container,\x0a\x20\x20.Header-nav\x20{\x0a\x20\x20\x20\x20padding:\x200\x200.625rem;\x0a\x20\x20}\x0a\x0a\x20\x20p,\x0a\x20\x20pre,\x0a\x20\x20ul,\x0a\x20\x20ol\x20{\x0a\x20\x20\x20\x20margin:\x200.625rem;\x0a\x20\x20}\x0a\x0a\x20\x20.pkg-synopsis\x20{\x0a\x20\x20\x20\x20display:\x20none;\x0a\x20\x20}\x0a\x0a\x20\x20img.gopher\x20{\x0a\x20\x20\x20\x20display:\x20none;\x0a\x20\x20}\x0a}\x0a\x0a@media\x20print\x20{\x0a\x20\x20pre\x20{\x0a\x20\x20\x20\x20background:\x20#fff;\x0a\x20\x20\x20\x20border:\x200.0625rem\x20solid\x20#bbb;\x0a\x20\x20\x20\x20white-space:\x20pre-wrap;\x0a\x20\x20\x20\x20page-break-inside:\x20avoid;\x0a\x20\x20}\x0a}\x0a",
 
 	"doc/mod.html": "<!--{\x0a\x20\x20\"Title\":\x20\"Go\x20Modules\x20Reference\",\x0a\x20\x20\"Subtitle\":\x20\"Version\x20of\x20Feb\x205,\x202019\",\x0a\x20\x20\"Path\":\x20\"/ref/mod\"\x0a}-->\x0a<!--\x20TODO(jayconrod):\x20change\x20anchors\x20to\x20header\x20id\x20attributes\x20either\x20during\x0amarkdown\x20rendering\x20or\x20as\x20HTML\x20postprocessing\x20step.\x20-->\x0a<!--\x20TODO(jayconrod):\x20use\x20<dfn>\x20tags\x20where\x20meaningful.\x0aCurrently,\x20*term*\x20is\x20used\x20instead,\x20which\x20renders\x20to\x20<em>term</em>.\x20-->\x0a<p><a\x20id=\"introduction\"></a></p>\x0a<h2>Introduction</h2>\x0a<p><a\x20id=\"modules-overview\"></a></p>\x0a<h2>Modules,\x20packages,\x20and\x20versions</h2>\x0a<p>A\x20<a\x20href=\"#glos-module\"><em>module</em></a>\x20is\x20a\x20collection\x20of\x20packages\x20that\x20are\x20released,\x0aversioned,\x20and\x20distributed\x20together.\x20A\x20module\x20is\x20identified\x20by\x20a\x20<a\x20href=\"#glos-module-path\"><em>module\x0apath</em></a>,\x20which\x20is\x20declared\x20in\x20a\x20<a\x20href=\"#go.mod-files\"><code>go.mod</code>\x0afile</a>,\x20together\x20with\x20information\x20about\x20the\x20module's\x0adependencies.\x20The\x20<a\x20href=\"#glos-module-root-directory\"><em>module\x20root\x20directory</em></a>\x20is\x20the\x0adirectory\x20that\x20contains\x20the\x20<code>go.mod</code>\x20file.\x20The\x20<a\x20href=\"#glos-main-module\"><em>main\x0amodule</em></a>\x20is\x20the\x20module\x20containing\x20the\x20directory\x20where\x20the\x0a<code>go</code>\x20command\x20is\x20invoked.</p>\x0a<p>Each\x20<a\x20href=\"#glos-package\"><em>package</em></a>\x20within\x20a\x20module\x20is\x20a\x20collection\x20of\x20source\x20files\x0ain\x20the\x20same\x20directory\x20that\x20are\x20compiled\x20together.\x20A\x20<a\x20href=\"#glos-package-path\"><em>package\x0apath</em></a>\x20is\x20the\x20module\x20path\x20joined\x20with\x20the\x20subdirectory\x0acontaining\x20the\x20package\x20(relative\x20to\x20the\x20module\x20root).\x20For\x20example,\x20the\x20module\x0a<code>&quot;golang.org/x/net&quot;</code>\x20contains\x20a\x20package\x20in\x20the\x20directory\x20<code>&quot;html&quot;</code>.\x20That\x0apackage's\x20path\x20is\x20<code>&quot;golang.org/x/net/html&quot;</code>.</p>\x0a<p><a\x20id=\"module-path\"></a></p>\x0a<h3>Module\x20paths</h3>\x0a<p>A\x20<a\x20href=\"#glos-module-path\"><em>module\x20path</em></a>\x20is\x20the\x20canonical\x20name\x20for\x20a\x20module,\x0adeclared\x20with\x20the\x20<a\x20href=\"#go.mod-module\"><code>module</code>\x20directive</a>\x20in\x20the\x20module's\x0a<a\x20href=\"#glos-go.mod-file\"><code>go.mod</code>\x20file</a>.\x20A\x20module's\x20path\x20is\x20the\x20prefix\x20for\x20package\x0apaths\x20within\x20the\x20module.</p>\x0a<p>A\x20module\x20path\x20should\x20describe\x20both\x20what\x20the\x20module\x20does\x20and\x20where\x20to\x20find\x20it.\x0aTypically,\x20a\x20module\x20path\x20consists\x20of\x20a\x20repository\x20root\x20path,\x20a\x20subdirectory\x0awithin\x20the\x20repository\x20(usually\x20empty),\x20and\x20a\x20major\x20version\x20suffix\x20(for\x20major\x0aversion\x202\x20or\x20higher).</p>\x0a<ul>\x0a<li>The\x20repository\x20root\x20path\x20is\x20part\x20of\x20a\x20URL\x20that\x20corresponds\x20to\x20a\x20version\x0acontrol\x20repository.\x20For\x20example,\x20<code>golang.org/x/net</code>.\x20See\x20<a\x20href=\"#custom-import-paths\">Custom\x20import\x0apaths</a>\x20for\x20details\x20on\x20how\x20paths\x20are\x20resolved\x20to\x0arepositories.</li>\x0a<li>If\x20the\x20module\x20is\x20in\x20a\x20subdirectory\x20of\x20the\x20version\x20control\x20repository,\x20the\x0asubdirectory\x20should\x20be\x20part\x20of\x20the\x20module\x20path\x20(but\x20not\x20the\x20repository\x20root\x0apath).\x20For\x20example,\x20the\x20module\x20<code>golang.org/x/tools/gopls</code>\x20is\x20in\x20the\x20<code>/gopls</code>\x0asubdirectory\x20of\x20the\x20repository\x20<code>golang.org/x/tools</code>.</li>\x0a<li>If\x20the\x20module\x20is\x20released\x20at\x20major\x20version\x202\x20or\x20higher,\x20the\x20module\x20path\x20must\x0aend\x20with\x20a\x20<a\x20href=\"#major-version-suffixes\">major\x20version\x20suffix</a>\x20like\x0a<code>/v2</code>.\x20This\x20may\x20or\x20may\x20not\x20be\x20part\x20of\x20the\x20subdirectory\x20name.\x20For\x20example,\x20the\x0amodule\x20with\x20path\x20<code>golang.org/x/repo/sub/v2</code>\x20could\x20be\x20in\x20the\x20<code>/sub</code>\x20or\x0a<code>/sub/v2</code>\x20subdirectory\x20of\x20the\x20repository\x20<code>golang.org/x/repo</code>.</li>\x0a</ul>\x0a<p>If\x20a\x20module\x20might\x20be\x20depended\x20on\x20by\x20other\x20modules,\x20these\x20rules\x20must\x20be\x20followed\x0aso\x20that\x20the\x20<code>go</code>\x20command\x20can\x20find\x20and\x20download\x20the\x20module.\x20There\x20are\x20also\x0aseveral\x20<a\x20href=\"#go.mod-ident\">lexical\x20restrictions</a>\x20on\x20characters\x20allowed\x20in\x0amodule\x20paths.</p>\x0a<p><a\x20id=\"versions\"></a></p>\x0a<h3>Versions</h3>\x0a<p>A\x20<a\x20href=\"#glos-version\"><em>version</em></a>\x20identifies\x20an\x20immutable\x20snapshot\x20of\x20a\x20module,\x20which\x0amay\x20be\x20either\x20a\x20<a\x20href=\"#glos-release-version\">release</a>\x20or\x20a\x0a<a\x20href=\"#glos-pre-release-version\">pre-release</a>.\x20Each\x20version\x20starts\x20with\x20the\x20letter\x0a<code>v</code>,\x20followed\x20by\x20a\x20semantic\x20version.\x20See\x20<a\x20href=\"https://semver.org/spec/v2.0.0.html\">Semantic\x20Versioning\x0a2.0.0</a>\x20for\x20details\x20on\x20how\x20versions\x20are\x0aformatted,\x20interpreted,\x20and\x20compared.</p>\x0a<p>To\x20summarize,\x20a\x20semantic\x20version\x20consists\x20of\x20three\x20non-negative\x20integers\x20(the\x0amajor,\x20minor,\x20and\x20patch\x20versions,\x20from\x20left\x20to\x20right)\x20separated\x20by\x20dots.\x20The\x0apatch\x20version\x20may\x20be\x20followed\x20by\x20an\x20optional\x20pre-release\x20string\x20starting\x20with\x20a\x0ahyphen.\x20The\x20pre-release\x20string\x20or\x20patch\x20version\x20may\x20be\x20followed\x20by\x20a\x20build\x0ametadata\x20string\x20starting\x20with\x20a\x20plus.\x20For\x20example,\x20<code>v0.0.0</code>,\x20<code>v1.12.134</code>,\x0a<code>v8.0.5-pre</code>,\x20and\x20<code>v2.0.9+meta</code>\x20are\x20valid\x20versions.</p>\x0a<p>Each\x20part\x20of\x20a\x20version\x20indicates\x20whether\x20the\x20version\x20is\x20stable\x20and\x20whether\x20it\x20is\x0acompatible\x20with\x20previous\x20versions.</p>\x0a<ul>\x0a<li>The\x20<a\x20href=\"#glos-major-version\">major\x20version</a>\x20must\x20be\x20incremented\x20and\x20the\x20minor\x0aand\x20patch\x20versions\x20must\x20be\x20set\x20to\x20zero\x20after\x20a\x20backwards\x20incompatible\x20change\x0ais\x20made\x20to\x20the\x20module's\x20public\x20interface\x20or\x20documented\x20functionality,\x20for\x0aexample,\x20after\x20a\x20package\x20is\x20removed.</li>\x0a<li>The\x20<a\x20href=\"#glos-minor-version\">minor\x20version</a>\x20must\x20be\x20incremented\x20and\x20the\x20patch\x0aversion\x20set\x20to\x20zero\x20after\x20a\x20backwards\x20compatible\x20change,\x20for\x20example,\x20after\x20a\x0anew\x20function\x20is\x20added.</li>\x0a<li>The\x20<a\x20href=\"#glos-patch-version\">patch\x20version</a>\x20must\x20be\x20incremented\x20after\x20a\x20change\x0athat\x20does\x20not\x20affect\x20the\x20module's\x20public\x20interface,\x20such\x20as\x20a\x20bug\x20fix\x20or\x0aoptimization.</li>\x0a<li>The\x20pre-release\x20suffix\x20indicates\x20a\x20version\x20is\x20a\x0a<a\x20href=\"#glos-pre-release-version\">pre-release</a>.\x20Pre-release\x20versions\x20sort\x20before\x0athe\x20corresponding\x20release\x20versions.\x20For\x20example,\x20<code>v1.2.3-pre</code>\x20comes\x20before\x0a<code>v1.2.3</code>.</li>\x0a<li>The\x20build\x20metadata\x20suffix\x20is\x20ignored\x20for\x20the\x20purpose\x20of\x20comparing\x20versions.\x0aTags\x20with\x20build\x20metadata\x20are\x20ignored\x20in\x20version\x20control\x20repositories,\x20but\x0abuild\x20metadata\x20is\x20preserved\x20in\x20versions\x20specified\x20in\x20<code>go.mod</code>\x20files.\x20The\x0asuffix\x20<code>+incompatible</code>\x20denotes\x20a\x20version\x20released\x20before\x20migrating\x20to\x20modules\x0aversion\x20major\x20version\x202\x20or\x20later\x20(see\x20<a\x20href=\"#non-module-compat\">Compatibility\x20with\x20non-module\x0arepositories</a>.</li>\x0a</ul>\x0a<p>A\x20version\x20is\x20considered\x20unstable\x20if\x20its\x20major\x20version\x20is\x200\x20or\x20it\x20has\x20a\x0apre-release\x20suffix.\x20Unstable\x20versions\x20are\x20not\x20subject\x20to\x20compatibility\x0arequirements.\x20For\x20example,\x20<code>v0.2.0</code>\x20may\x20not\x20be\x20compatible\x20with\x20<code>v0.1.0</code>,\x20and\x0a<code>v1.5.0-beta</code>\x20may\x20not\x20be\x20compatible\x20with\x20<code>v1.5.0</code>.</p>\x0a<p>Go\x20may\x20access\x20modules\x20in\x20version\x20control\x20systems\x20using\x20tags,\x20branches,\x20or\x0arevisions\x20that\x20don't\x20follow\x20these\x20conventions.\x20However,\x20within\x20the\x20main\x20module,\x0athe\x20<code>go</code>\x20command\x20will\x20automatically\x20convert\x20revision\x20names\x20that\x20don't\x20follow\x0athis\x20standard\x20into\x20canonical\x20versions.\x20The\x20<code>go</code>\x20command\x20will\x20also\x20remove\x20build\x0ametadata\x20suffixes\x20(except\x20for\x20<code>+incompatible</code>)\x20as\x20part\x20of\x20this\x20process.\x20This\x20may\x0aresult\x20in\x20a\x20<a\x20href=\"#glos-pseudo-version\"><em>pseudo-version</em></a>,\x20a\x20pre-release\x20version\x20that\x0aencodes\x20a\x20revision\x20identifier\x20(such\x20as\x20a\x20Git\x20commit\x20hash)\x20and\x20a\x20timestamp\x20from\x20a\x0aversion\x20control\x20system.\x20For\x20example,\x20the\x20command\x20<code>go\x20get\x20-d\x20golang.org/x/net@daa7c041</code>\x20will\x20convert\x20the\x20commit\x20hash\x20<code>daa7c041</code>\x20into\x20the\x0apseudo-version\x20<code>v0.0.0-20191109021931-daa7c04131f5</code>.\x20Canonical\x20versions\x20are\x0arequired\x20outside\x20the\x20main\x20module,\x20and\x20the\x20<code>go</code>\x20command\x20will\x20report\x20an\x20error\x20if\x20a\x0anon-canonical\x20version\x20like\x20<code>master</code>\x20appears\x20in\x20a\x20<code>go.mod</code>\x20file.</p>\x0a<p><a\x20id=\"major-version-suffixes\"></a></p>\x0a<h3>Major\x20version\x20suffixes</h3>\x0a<p>Starting\x20with\x20major\x20version\x202,\x20module\x20paths\x20must\x20have\x20a\x20<a\x20href=\"#glos-major-version-suffix\"><em>major\x20version\x0asuffix</em></a>\x20like\x20<code>/v2</code>\x20that\x20matches\x20the\x20major\x0aversion.\x20For\x20example,\x20if\x20a\x20module\x20has\x20the\x20path\x20<code>example.com/mod</code>\x20at\x20<code>v1.0.0</code>,\x20it\x0amust\x20have\x20the\x20path\x20<code>example.com/mod/v2</code>\x20at\x20version\x20<code>v2.0.0</code>.</p>\x0a<p>Major\x20version\x20suffixes\x20implement\x20the\x20<a\x20href=\"https://research.swtch.com/vgo-import\"><em>import\x20compatibility\x0arule</em></a>:</p>\x0a<blockquote>\x0a<p>If\x20an\x20old\x20package\x20and\x20a\x20new\x20package\x20have\x20the\x20same\x20import\x20path,\x0athe\x20new\x20package\x20must\x20be\x20backwards\x20compatible\x20with\x20the\x20old\x20package.</p>\x0a</blockquote>\x0a<p>By\x20definition,\x20packages\x20in\x20a\x20new\x20major\x20version\x20of\x20a\x20module\x20are\x20not\x20backwards\x0acompatible\x20with\x20the\x20corresponding\x20packages\x20in\x20the\x20previous\x20major\x20version.\x0aConsequently,\x20starting\x20with\x20<code>v2</code>,\x20packages\x20need\x20new\x20import\x20paths.\x20This\x20is\x0aaccomplished\x20by\x20adding\x20a\x20major\x20version\x20suffix\x20to\x20the\x20module\x20path.\x20Since\x20the\x0amodule\x20path\x20is\x20a\x20prefix\x20of\x20the\x20import\x20path\x20for\x20each\x20package\x20within\x20the\x20module,\x0aadding\x20the\x20major\x20version\x20suffix\x20to\x20the\x20module\x20path\x20provides\x20a\x20distinct\x20import\x0apath\x20for\x20each\x20incompatible\x20version.</p>\x0a<p>Major\x20version\x20suffixes\x20are\x20not\x20allowed\x20at\x20major\x20versions\x20<code>v0</code>\x20or\x20<code>v1</code>.\x20There\x20is\x0ano\x20need\x20to\x20change\x20the\x20module\x20path\x20between\x20<code>v0</code>\x20and\x20<code>v1</code>\x20because\x20<code>v0</code>\x20versions\x0aare\x20unstable\x20and\x20have\x20no\x20compatibility\x20guarantee.\x20Additionally,\x20for\x20most\x0amodules,\x20<code>v1</code>\x20is\x20backwards\x20compatible\x20with\x20the\x20last\x20<code>v0</code>\x20version;\x20a\x20<code>v1</code>\x20version\x0aacts\x20as\x20a\x20commitment\x20to\x20compatibility,\x20rather\x20than\x20an\x20indication\x20of\x0aincompatible\x20changes\x20compared\x20with\x20<code>v0</code>.</p>\x0a<p>As\x20a\x20special\x20case,\x20modules\x20paths\x20starting\x20with\x20<code>gopkg.in/</code>\x20must\x20always\x20have\x20a\x0amajor\x20version\x20suffix,\x20even\x20at\x20<code>v0</code>\x20and\x20<code>v1</code>.\x20The\x20suffix\x20must\x20start\x20with\x20a\x20dot\x0arather\x20than\x20a\x20slash\x20(for\x20example,\x20<code>gopkg.in/yaml.v2</code>).</p>\x0a<p>Major\x20version\x20suffixes\x20let\x20multiple\x20major\x20versions\x20of\x20a\x20module\x20coexist\x20in\x20the\x0asame\x20build.\x20This\x20may\x20be\x20necessary\x20due\x20to\x20a\x20<a\x20href=\"https://research.swtch.com/vgo-import#dependency_story\">diamond\x20dependency\x0aproblem</a>.\x20Ordinarily,\x20if\x0aa\x20module\x20is\x20required\x20at\x20two\x20different\x20versions\x20by\x20transitive\x20dependencies,\x20the\x0ahigher\x20version\x20will\x20be\x20used.\x20However,\x20if\x20the\x20two\x20versions\x20are\x20incompatible,\x0aneither\x20version\x20will\x20satisfy\x20all\x20clients.\x20Since\x20incompatible\x20versions\x20must\x20have\x0adifferent\x20major\x20version\x20numbers,\x20they\x20must\x20also\x20have\x20different\x20module\x20paths\x20due\x0ato\x20major\x20version\x20suffixes.\x20This\x20resolves\x20the\x20conflict:\x20modules\x20with\x20distinct\x0asuffixes\x20are\x20treated\x20as\x20separate\x20modules,\x20and\x20their\x20packages\xe2\x80\x94even\x20packages\x20in\x0asame\x20subdirectory\x20relative\x20to\x20their\x20module\x20roots\xe2\x80\x94are\x20distinct.</p>\x0a<p>Many\x20Go\x20projects\x20released\x20versions\x20at\x20<code>v2</code>\x20or\x20higher\x20without\x20using\x20a\x20major\x0aversion\x20suffix\x20before\x20migrating\x20to\x20modules\x20(perhaps\x20before\x20modules\x20were\x20even\x0aintroduced).\x20These\x20versions\x20are\x20annotated\x20with\x20a\x20<code>+incompatible</code>\x20build\x20tag\x20(for\x0aexample,\x20<code>v2.0.0+incompatible</code>).\x20See\x20<a\x20href=\"#non-module-compat\">Compatibility\x20with\x20non-module\x0arepositories</a>\x20for\x20more\x20information.</p>\x0a<p><a\x20id=\"resolve-pkg-mod\"></a></p>\x0a<h3>Resolving\x20a\x20package\x20to\x20a\x20module</h3>\x0a<p>When\x20the\x20<code>go</code>\x20command\x20loads\x20a\x20package\x20using\x20a\x20<a\x20href=\"#glos-package-path\">package\x0apath</a>,\x20it\x20needs\x20to\x20determine\x20which\x20module\x20provides\x20the\x0apackage.</p>\x0a<p>The\x20<code>go</code>\x20command\x20starts\x20by\x20searching\x20the\x20<a\x20href=\"#glos-build-list\">build\x20list</a>\x20for\x0amodules\x20with\x20paths\x20that\x20are\x20prefixes\x20of\x20the\x20package\x20path.\x20For\x20example,\x20if\x20the\x0apackage\x20<code>example.com/a/b</code>\x20is\x20imported,\x20and\x20the\x20module\x20<code>example.com/a</code>\x20is\x20in\x20the\x0abuild\x20list,\x20the\x20<code>go</code>\x20command\x20will\x20check\x20whether\x20<code>example.com/a</code>\x20contains\x20the\x0apackage,\x20in\x20the\x20directory\x20<code>b</code>.\x20At\x20least\x20one\x20file\x20with\x20the\x20<code>.go</code>\x20extension\x20must\x0abe\x20present\x20in\x20a\x20directory\x20for\x20it\x20to\x20be\x20considered\x20a\x20package.\x20<a\x20href=\"/pkg/go/build/#hdr-Build_Constraints\">Build\x0aconstraints</a>\x20are\x20not\x20applied\x20for\x20this\x0apurpose.\x20If\x20exactly\x20one\x20module\x20in\x20the\x20build\x20list\x20provides\x20the\x20package,\x20that\x0amodule\x20is\x20used.\x20If\x20two\x20or\x20more\x20modules\x20provide\x20the\x20package,\x20an\x20error\x20is\x0areported.\x20If\x20no\x20modules\x20provide\x20the\x20package,\x20the\x20<code>go</code>\x20command\x20will\x20attempt\x20to\x0afind\x20a\x20new\x20module\x20(unless\x20the\x20flags\x20<code>-mod=readonly</code>\x20or\x20<code>-mod=vendor</code>\x20are\x20used,\x0ain\x20which\x20case,\x20an\x20error\x20is\x20reported).</p>\x0a<!--\x20NOTE(golang.org/issue/27899):\x20the\x20go\x20command\x20reports\x20an\x20error\x20when\x20two\x0aor\x20more\x20modules\x20provide\x20a\x20package\x20with\x20the\x20same\x20path\x20as\x20above.\x20In\x20the\x20future,\x0awe\x20may\x20try\x20to\x20upgrade\x20one\x20(or\x20all)\x20of\x20the\x20colliding\x20modules.\x0a-->\x0a<p>When\x20the\x20<code>go</code>\x20command\x20looks\x20up\x20a\x20new\x20module\x20for\x20a\x20package\x20path,\x20it\x20checks\x20the\x0a<code>GOPROXY</code>\x20environment\x20variable,\x20which\x20is\x20a\x20comma-separated\x20list\x20of\x20proxy\x20URLs\x20or\x0athe\x20keywords\x20<code>direct</code>\x20or\x20<code>off</code>.\x20A\x20proxy\x20URL\x20indicates\x20the\x20<code>go</code>\x20command\x20should\x0acontact\x20a\x20<a\x20href=\"#glos-module-proxy\">module\x20proxy</a>\x20using\x20the\x20<a\x20href=\"#goproxy-protocol\"><code>GOPROXY</code>\x0aprotocol</a>.\x20<code>direct</code>\x20indicates\x20that\x20the\x20<code>go</code>\x20command\x20should\x0a<a\x20href=\"#communicating-with-vcs\">communicate\x20with\x20a\x20version\x20control\x20system</a>.\x20<code>off</code>\x0aindicates\x20that\x20no\x20communication\x20should\x20be\x20attempted.\x20The\x20<code>GOPRIVATE</code>\x20and\x0a<code>GONOPROXY</code>\x20<a\x20href=\"#environment-variables\">environment\x20variables</a>\x20can\x20also\x20be\x20used\x20to\x0acontrol\x20this\x20behavior.</p>\x0a<p>For\x20each\x20entry\x20in\x20the\x20<code>GOPROXY</code>\x20list,\x20the\x20<code>go</code>\x20command\x20requests\x20the\x20latest\x0aversion\x20of\x20each\x20module\x20path\x20that\x20might\x20provide\x20the\x20package\x20(that\x20is,\x20each\x20prefix\x0aof\x20the\x20package\x20path).\x20For\x20each\x20successfully\x20requested\x20module\x20path,\x20the\x20<code>go</code>\x0acommand\x20will\x20download\x20the\x20module\x20at\x20the\x20latest\x20version\x20and\x20check\x20whether\x20the\x0amodule\x20contains\x20the\x20requested\x20package.\x20If\x20one\x20or\x20more\x20modules\x20contain\x20the\x0arequested\x20package,\x20the\x20module\x20with\x20the\x20longest\x20path\x20is\x20used.\x20If\x20one\x20or\x20more\x0amodules\x20are\x20found\x20but\x20none\x20contain\x20the\x20requested\x20package,\x20an\x20error\x20is\x0areported.\x20If\x20no\x20modules\x20are\x20found,\x20the\x20<code>go</code>\x20command\x20tries\x20the\x20next\x20entry\x20in\x20the\x0a<code>GOPROXY</code>\x20list.\x20If\x20no\x20entries\x20are\x20left,\x20an\x20error\x20is\x20reported.</p>\x0a<p>For\x20example,\x20suppose\x20the\x20<code>go</code>\x20command\x20is\x20looking\x20for\x20a\x20module\x20that\x20provides\x20the\x0apackage\x20<code>golang.org/x/net/html</code>,\x20and\x20<code>GOPROXY</code>\x20is\x20set\x20to\x0a<code>https://corp.example.com,https://proxy.golang.org</code>.\x20The\x20<code>go</code>\x20command\x20may\x20make\x0athe\x20following\x20requests:</p>\x0a<ul>\x0a<li>To\x20<code>https://corp.example.com/</code>\x20(in\x20parallel):\x0a<ul>\x0a<li>Request\x20for\x20latest\x20version\x20of\x20<code>golang.org/x/net/html</code></li>\x0a<li>Request\x20for\x20latest\x20version\x20of\x20<code>golang.org/x/net</code></li>\x0a<li>Request\x20for\x20latest\x20version\x20of\x20<code>golang.org/x</code></li>\x0a<li>Request\x20for\x20latest\x20version\x20of\x20<code>golang.org</code></li>\x0a</ul>\x0a</li>\x0a<li>To\x20<code>https://proxy.golang.org/</code>,\x20if\x20all\x20requests\x20to\x20<code>https://corp.example.com/</code>\x0ahave\x20failed\x20with\x20404\x20or\x20410:\x0a<ul>\x0a<li>Request\x20for\x20latest\x20version\x20of\x20<code>golang.org/x/net/html</code></li>\x0a<li>Request\x20for\x20latest\x20version\x20of\x20<code>golang.org/x/net</code></li>\x0a<li>Request\x20for\x20latest\x20version\x20of\x20<code>golang.org/x</code></li>\x0a<li>Request\x20for\x20latest\x20version\x20of\x20<code>golang.org</code></li>\x0a</ul>\x0a</li>\x0a</ul>\x0a<p>After\x20a\x20suitable\x20module\x20has\x20been\x20found,\x20the\x20<code>go</code>\x20command\x20will\x20add\x20a\x20new\x0a<a\x20href=\"#go.mod-require\">requirement</a>\x20with\x20the\x20new\x20module's\x20path\x20and\x20version\x20to\x20the\x0amain\x20module's\x20<code>go.mod</code>\x20file.\x20This\x20ensures\x20that\x20when\x20the\x20same\x20package\x20is\x20loaded\x0ain\x20the\x20future,\x20the\x20same\x20module\x20will\x20be\x20used\x20at\x20the\x20same\x20version.\x20If\x20the\x20resolved\x0apackage\x20is\x20not\x20imported\x20by\x20a\x20package\x20in\x20the\x20main\x20module,\x20the\x20new\x20requirement\x0awill\x20have\x20an\x20<code>//\x20indirect</code>\x20comment.</p>\x0a<p><a\x20id=\"go.mod-files\"></a></p>\x0a<h2><code>go.mod</code>\x20files</h2>\x0a<p>A\x20module\x20is\x20defined\x20by\x20a\x20UTF-8\x20encoded\x20text\x20file\x20named\x20<code>go.mod</code>\x20in\x20its\x20root\x0adirectory.\x20The\x20<code>go.mod</code>\x20file\x20is\x20line-oriented.\x20Each\x20line\x20holds\x20a\x20single\x0adirective,\x20made\x20up\x20of\x20a\x20keyword\x20followed\x20by\x20arguments.\x20For\x20example:</p>\x0a<pre><code>module\x20example.com/my/thing\x0a\x0ago\x201.12\x0a\x0arequire\x20example.com/other/thing\x20v1.0.2\x0arequire\x20example.com/new/thing/v2\x20v2.3.4\x0aexclude\x20example.com/old/thing\x20v1.2.3\x0areplace\x20example.com/bad/thing\x20v1.4.5\x20=&gt;\x20example.com/good/thing\x20v1.4.5\x0a</code></pre>\x0a<p>The\x20leading\x20keyword\x20can\x20be\x20factored\x20out\x20of\x20adjacent\x20lines\x20to\x20create\x20a\x20block,\x0alike\x20in\x20Go\x20imports.</p>\x0a<pre><code>require\x20(\x0a\x20\x20\x20\x20example.com/new/thing/v2\x20v2.3.4\x0a\x20\x20\x20\x20example.com/old/thing\x20v1.2.3\x0a)\x0a</code></pre>\x0a<p>The\x20<code>go.mod</code>\x20file\x20is\x20designed\x20to\x20be\x20human\x20readable\x20and\x20machine\x20writable.\x20The\x0a<code>go</code>\x20command\x20provides\x20several\x20subcommands\x20that\x20change\x20<code>go.mod</code>\x20files.\x20For\x0aexample,\x20<a\x20href=\"#go-get\"><code>go\x20get</code></a>\x20can\x20upgrade\x20or\x20downgrade\x20specific\x20dependencies.\x0aCommands\x20that\x20load\x20the\x20module\x20graph\x20will\x20<a\x20href=\"#go.mod-updates\">automatically\x20update</a>\x0a<code>go.mod</code>\x20when\x20needed.\x20<a\x20href=\"#go-mod-tidy\"><code>go\x20mod\x20edit</code></a>\x20can\x20perform\x20low-level\x20edits.\x0aThe\x0a<a\x20href=\"https://pkg.go.dev/golang.org/x/mod/modfile?tab=doc\"><code>golang.org/x/mod/modfile</code></a>\x0apackage\x20can\x20be\x20used\x20by\x20Go\x20programs\x20to\x20make\x20the\x20same\x20changes\x20programmatically.</p>\x0a<p><a\x20id=\"go.mod-lexical\"></a></p>\x0a<h3>Lexical\x20elements</h3>\x0a<p>When\x20a\x20<code>go.mod</code>\x20file\x20is\x20parsed,\x20its\x20content\x20is\x20broken\x20into\x20a\x20sequence\x20of\x20tokens.\x0aThere\x20are\x20several\x20kinds\x20of\x20tokens:\x20whitespace,\x20comments,\x20punctuation,\x0akeywords,\x20identifiers,\x20and\x20strings.</p>\x0a<p><em>White\x20space</em>\x20consists\x20of\x20spaces\x20(U+0020),\x20tabs\x20(U+0009),\x20carriage\x20returns\x0a(U+000D),\x20and\x20newlines\x20(U+000A).\x20White\x20space\x20characters\x20other\x20than\x20newlines\x20have\x0ano\x20effect\x20except\x20to\x20separate\x20tokens\x20that\x20would\x20otherwise\x20be\x20combined.\x20Newlines\x0aare\x20significant\x20tokens.</p>\x0a<p><em>Comments</em>\x20start\x20with\x20<code>//</code>\x20and\x20run\x20to\x20the\x20end\x20of\x20a\x20line.\x20<code>/*\x20*/</code>\x20comments\x20are\x0anot\x20allowed.</p>\x0a<p><em>Punctuation</em>\x20tokens\x20include\x20<code>(</code>,\x20<code>)</code>,\x20and\x20<code>=&gt;</code>.</p>\x0a<p><em>Keywords</em>\x20distinguish\x20different\x20kinds\x20of\x20directives\x20in\x20a\x20<code>go.mod</code>\x20file.\x20Allowed\x0akeywords\x20are\x20<code>module</code>,\x20<code>go</code>,\x20<code>require</code>,\x20<code>replace</code>,\x20and\x20<code>exclude</code>.</p>\x0a<p><em>Identifiers</em>\x20are\x20sequences\x20of\x20non-whitespace\x20characters,\x20such\x20as\x20module\x20paths\x0aor\x20semantic\x20versions.</p>\x0a<p><em>Strings</em>\x20are\x20quoted\x20sequences\x20of\x20characters.\x20There\x20are\x20two\x20kinds\x20of\x20strings:\x0ainterpreted\x20strings\x20beginning\x20and\x20ending\x20with\x20quotation\x20marks\x20(<code>&quot;</code>,\x20U+0022)\x20and\x0araw\x20strings\x20beginning\x20and\x20ending\x20with\x20grave\x20accents\x20(<code>&lt;</code>,\x0aU+0060).\x20Interpreted\x20strings\x20may\x20contain\x20escape\x20sequences\x20consisting\x20of\x20a\x0abackslash\x20(<code>\\</code>,\x20U+005C)\x20followed\x20by\x20another\x20character.\x20An\x20escaped\x20quotation\x0amark\x20(<code>\\&quot;</code>)\x20does\x20not\x20terminate\x20an\x20interpreted\x20string.\x20The\x20unquoted\x20value\x0aof\x20an\x20interpreted\x20string\x20is\x20the\x20sequence\x20of\x20characters\x20between\x20quotation\x0amarks\x20with\x20each\x20escape\x20sequence\x20replaced\x20by\x20the\x20character\x20following\x20the\x0abackslash\x20(for\x20example,\x20<code>\\&quot;</code>\x20is\x20replaced\x20by\x20<code>&quot;</code>,\x20<code>\\n</code>\x20is\x20replaced\x20by\x20<code>n</code>).\x0aIn\x20contrast,\x20the\x20unquoted\x20value\x20of\x20a\x20raw\x20string\x20is\x20simply\x20the\x20sequence\x20of\x0acharacters\x20between\x20grave\x20accents;\x20backslashes\x20have\x20no\x20special\x20meaning\x20within\x0araw\x20strings.</p>\x0a<p>Identifiers\x20and\x20strings\x20are\x20interchangeable\x20in\x20the\x20<code>go.mod</code>\x20grammar.</p>\x0a<p><a\x20id=\"go.mod-ident\"></a></p>\x0a<h3>Module\x20paths\x20and\x20versions</h3>\x0a<p>Most\x20identifiers\x20and\x20strings\x20in\x20a\x20<code>go.mod</code>\x20file\x20are\x20either\x20module\x20paths\x20or\x0aversions.</p>\x0a<p>A\x20module\x20path\x20must\x20satisfy\x20the\x20following\x20requirements:</p>\x0a<ul>\x0a<li>The\x20path\x20must\x20consist\x20of\x20one\x20or\x20more\x20path\x20elements\x20separated\x20by\x20slashes\x0a(<code>/</code>,\x20U+002F).\x20It\x20must\x20not\x20begin\x20or\x20end\x20with\x20a\x20slash.</li>\x0a<li>Each\x20path\x20element\x20is\x20a\x20non-empty\x20string\x20made\x20of\x20up\x20ASCII\x20letters,\x20ASCII\x0adigits,\x20and\x20limited\x20ASCII\x20punctuation\x20(<code>+</code>,\x20<code>-</code>,\x20<code>.</code>,\x20<code>_</code>,\x20and\x20<code>~</code>).</li>\x0a<li>A\x20path\x20element\x20may\x20not\x20begin\x20or\x20end\x20with\x20a\x20dot\x20(<code>.</code>,\x20U+002E).</li>\x0a<li>The\x20element\x20prefix\x20up\x20to\x20the\x20first\x20dot\x20must\x20not\x20be\x20a\x20reserved\x20file\x20name\x20on\x0aWindows,\x20regardless\x20of\x20case\x20(<code>CON</code>,\x20<code>com1</code>,\x20<code>NuL</code>,\x20and\x20so\x20on).</li>\x0a</ul>\x0a<p>If\x20the\x20module\x20path\x20appears\x20in\x20a\x20<code>require</code>\x20directive\x20and\x20is\x20not\x20replaced,\x20or\x0aif\x20the\x20module\x20paths\x20appears\x20on\x20the\x20right\x20side\x20of\x20a\x20<code>replace</code>\x20directive,\x0athe\x20<code>go</code>\x20command\x20may\x20need\x20to\x20download\x20modules\x20with\x20that\x20path,\x20and\x20some\x0aadditional\x20requirements\x20must\x20be\x20satisfied.</p>\x0a<ul>\x0a<li>The\x20leading\x20path\x20element\x20(up\x20to\x20the\x20first\x20slash,\x20if\x20any),\x20by\x20convention\x20a\x0adomain\x20name,\x20must\x20contain\x20only\x20lower-case\x20ASCII\x20letters,\x20ASCII\x20digits,\x20dots\x0a(<code>.</code>,\x20U+002E),\x20and\x20dashes\x20(<code>-</code>,\x20U+002D);\x20it\x20must\x20contain\x20at\x20least\x20one\x20dot\x20and\x0acannot\x20start\x20with\x20a\x20dash.</li>\x0a<li>For\x20a\x20final\x20path\x20element\x20of\x20the\x20form\x20<code>/vN</code>\x20where\x20<code>N</code>\x20looks\x20numeric\x20(ASCII\x0adigits\x20and\x20dots),\x20<code>N</code>\x20must\x20not\x20begin\x20with\x20a\x20leading\x20zero,\x20must\x20not\x20be\x20<code>/v1</code>,\x0aand\x20must\x20not\x20contain\x20any\x20dots.\x0a<ul>\x0a<li>For\x20paths\x20beginning\x20with\x20<code>gopkg.in/</code>,\x20this\x20requirement\x20is\x20replaced\x20by\x20a\x0arequirement\x20that\x20the\x20path\x20follow\x20the\x20<a\x20href=\"https://gopkg.in\">gopkg.in</a>\x20service's\x0aconventions.</li>\x0a</ul>\x0a</li>\x0a</ul>\x0a<p>Versions\x20in\x20<code>go.mod</code>\x20files\x20may\x20be\x20<a\x20href=\"#glos-canonical-version\">canonical</a>\x20or\x0anon-canonical.</p>\x0a<p>A\x20canonical\x20version\x20starts\x20with\x20the\x20letter\x20<code>v</code>,\x20followed\x20by\x20a\x20semantic\x20version\x0afollowing\x20the\x20<a\x20href=\"https://semver.org/spec/v2.0.0.html\">Semantic\x20Versioning\x202.0.0</a>\x0aspecification.\x20See\x20<a\x20href=\"#versions\">Versions</a>\x20for\x20more\x20information.</p>\x0a<p>Most\x20other\x20identifiers\x20and\x20strings\x20may\x20be\x20used\x20as\x20non-canonical\x20versions,\x20though\x0athere\x20are\x20some\x20restrictions\x20to\x20avoid\x20problems\x20with\x20file\x20systems,\x20repositories,\x0aand\x20<a\x20href=\"#glos-module-proxy\">module\x20proxies</a>.\x20Non-canonical\x20versions\x20are\x20only\x0aallowed\x20in\x20the\x20main\x20module's\x20<code>go.mod</code>\x20file.\x20The\x20<code>go</code>\x20command\x20will\x20attempt\x20to\x0areplace\x20each\x20non-canonical\x20version\x20with\x20an\x20equivalent\x20canonical\x20version\x20when\x20it\x0aautomatically\x20<a\x20href=\"#go.mod-updates\">updates</a>\x20the\x20<code>go.mod</code>\x20file.</p>\x0a<p>In\x20places\x20where\x20a\x20module\x20path\x20is\x20associated\x20with\x20a\x20verison\x20(as\x20in\x20<code>require</code>,\x0a<code>replace</code>,\x20and\x20<code>exclude</code>\x20directives),\x20the\x20final\x20path\x20element\x20must\x20be\x20consistent\x0awith\x20the\x20version.\x20See\x20<a\x20href=\"#major-version-suffixes\">Major\x20version\x20suffixes</a>.</p>\x0a<p><a\x20id=\"go.mod-grammar\"></a></p>\x0a<h3>Grammar</h3>\x0a<p><code>go.mod</code>\x20syntax\x20is\x20specified\x20below\x20using\x20Extended\x20Backus-Naur\x20Form\x20(EBNF).\x0aSee\x20the\x20<a\x20href=\"/ref/spec#Notation\">Notation\x20section\x20in\x20the\x20Go\x20Language\x20Specificiation</a>\x0afor\x20details\x20on\x20EBNF\x20syntax.</p>\x0a<pre><code>GoMod\x20=\x20{\x20Directive\x20}\x20.\x0aDirective\x20=\x20ModuleDirective\x20|\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GoDirective\x20|\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20RequireDirective\x20|\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ExcludeDirective\x20|\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ReplaceDirective\x20.\x0a</code></pre>\x0a<p>Newlines,\x20identifiers,\x20and\x20strings\x20are\x20denoted\x20with\x20<code>newline</code>,\x20<code>ident</code>,\x20and\x0a<code>string</code>,\x20respectively.</p>\x0a<p>Module\x20paths\x20and\x20versions\x20are\x20denoted\x20with\x20<code>ModulePath</code>\x20and\x20<code>Version</code>.</p>\x0a<pre><code>ModulePath\x20=\x20ident\x20|\x20string\x20.\x20/*\x20see\x20restrictions\x20above\x20*/\x0aVersion\x20=\x20ident\x20|\x20string\x20.\x20\x20\x20\x20/*\x20see\x20restrictions\x20above\x20*/\x0a</code></pre>\x0a<p><a\x20id=\"go.mod-module\"></a></p>\x0a<h3><code>module</code>\x20directive</h3>\x0a<p>A\x20<code>module</code>\x20directive\x20defines\x20the\x20main\x20module's\x20<a\x20href=\"#glos-module-path\">path</a>.\x20A\x0a<code>go.mod</code>\x20file\x20must\x20contain\x20exactly\x20one\x20<code>module</code>\x20directive.</p>\x0a<pre><code>ModuleDirective\x20=\x20&quot;module&quot;\x20(\x20ModulePath\x20|\x20&quot;(&quot;\x20newline\x20ModulePath\x20newline\x20&quot;)&quot;\x20newline\x20.\x0a</code></pre>\x0a<p>Example:</p>\x0a<pre><code>module\x20golang.org/x/net\x0a</code></pre>\x0a<p><a\x20id=\"go.mod-go\"></a></p>\x0a<h3><code>go</code>\x20directive</h3>\x0a<p>A\x20<code>go</code>\x20directive\x20sets\x20the\x20expected\x20language\x20version\x20for\x20the\x20module.\x20The\x0aversion\x20must\x20be\x20a\x20valid\x20Go\x20release\x20version:\x20a\x20positive\x20integer\x20followed\x20by\x20a\x20dot\x0aand\x20a\x20non-negative\x20integer\x20(for\x20example,\x20<code>1.9</code>,\x20<code>1.14</code>).</p>\x0a<p>The\x20language\x20version\x20determines\x20which\x20language\x20features\x20are\x20available\x20when\x0acompiling\x20packages\x20in\x20the\x20module.\x20Language\x20features\x20present\x20in\x20that\x20version\x0awill\x20be\x20available\x20for\x20use.\x20Language\x20features\x20removed\x20in\x20earlier\x20versions,\x0aor\x20added\x20in\x20later\x20versions,\x20will\x20not\x20be\x20available.\x20The\x20language\x20version\x20does\x20not\x0aaffect\x20build\x20tags,\x20which\x20are\x20determined\x20by\x20the\x20Go\x20release\x20being\x20used.</p>\x0a<p>The\x20language\x20version\x20is\x20also\x20used\x20to\x20enable\x20features\x20in\x20the\x20<code>go</code>\x20command.\x20For\x0aexample,\x20automatic\x20<a\x20href=\"#vendoring\">vendoring</a>\x20may\x20be\x20enabled\x20with\x20a\x20<code>go</code>\x20version\x20of\x0a<code>1.14</code>\x20or\x20higher.</p>\x0a<p>A\x20<code>go.mod</code>\x20file\x20may\x20contain\x20at\x20most\x20one\x20<code>go</code>\x20directive.\x20Most\x20commands\x20will\x20add\x20a\x0a<code>go</code>\x20directive\x20with\x20the\x20current\x20Go\x20version\x20if\x20one\x20is\x20not\x20present.</p>\x0a<pre><code>GoDirective\x20=\x20&quot;go&quot;\x20GoVersion\x20newline\x20.\x0aGoVersion\x20=\x20string\x20|\x20ident\x20.\x20\x20/*\x20valid\x20release\x20version;\x20see\x20above\x20*/\x0a</code></pre>\x0a<p>Example:</p>\x0a<pre><code>go\x201.14\x0a</code></pre>\x0a<p><a\x20id=\"go.mod-require\"></a></p>\x0a<h3><code>require</code>\x20directive</h3>\x0a<p>A\x20<code>require</code>\x20directive\x20declares\x20a\x20minimum\x20required\x20version\x20of\x20a\x20given\x20module\x0adependency.\x20For\x20each\x20required\x20module\x20version,\x20the\x20<code>go</code>\x20command\x20loads\x20the\x0a<code>go.mod</code>\x20file\x20for\x20that\x20version\x20and\x20incorporates\x20the\x20requirements\x20from\x20that\x0afile.\x20Once\x20all\x20requirements\x20have\x20been\x20loaded,\x20the\x20<code>go</code>\x20command\x20resolves\x20them\x0ausing\x20<a\x20href=\"#minimal-version-selection\">minimal\x20version\x20selection\x20(MVS)</a>\x20to\x20produce\x0athe\x20<a\x20href=\"#glos-build-list\">build\x20list</a>.</p>\x0a<p>The\x20<code>go</code>\x20command\x20automatically\x20adds\x20<code>//\x20indirect</code>\x20comments\x20for\x20some\x0arequirements.\x20An\x20<code>//\x20indirect</code>\x20comment\x20indicates\x20that\x20no\x20package\x20from\x20the\x0arequired\x20module\x20is\x20directly\x20imported\x20by\x20any\x20package\x20in\x20the\x20main\x20module.\x0aThe\x20<code>go</code>\x20command\x20adds\x20an\x20indirect\x20requirement\x20when\x20the\x20selected\x20version\x20of\x20a\x0amodule\x20is\x20higher\x20than\x20what\x20is\x20already\x20implied\x20(transitively)\x20by\x20the\x20main\x0amodule's\x20other\x20dependencies.\x20That\x20may\x20occur\x20because\x20of\x20an\x20explicit\x20upgrade\x0a(<code>go\x20get\x20-u</code>),\x20removal\x20of\x20some\x20other\x20dependency\x20that\x20previously\x20imposed\x20the\x0arequirement\x20(<code>go\x20mod\x20tidy</code>),\x20or\x20a\x20dependency\x20that\x20imports\x20a\x20package\x20without\x0aa\x20corresponding\x20requirement\x20in\x20its\x20own\x20<code>go.mod</code>\x20file\x20(such\x20as\x20a\x20dependency\x0athat\x20lacks\x20a\x20<code>go.mod</code>\x20file\x20altogether).</p>\x0a<pre><code>RequireDirective\x20=\x20&quot;require&quot;\x20(\x20RequireSpec\x20|\x20&quot;(&quot;\x20newline\x20{\x20RequireSpec\x20}\x20&quot;)&quot;\x20newline\x20)\x20.\x0aRequireSpec\x20=\x20ModulePath\x20Version\x20newline\x20.\x0a</code></pre>\x0a<p>Example:</p>\x0a<pre><code>require\x20golang.org/x/net\x20v1.2.3\x0a\x0arequire\x20(\x0a\x20\x20\x20\x20golang.org/x/crypto\x20v1.4.5\x20//\x20indirect\x0a\x20\x20\x20\x20golang.org/x/text\x20v1.6.7\x0a)\x0a</code></pre>\x0a<p><a\x20id=\"go.mod-exclude\"></a></p>\x0a<h3><code>exclude</code>\x20directive</h3>\x0a<p>An\x20<code>exclude</code>\x20directive\x20prevents\x20a\x20module\x20version\x20from\x20being\x20loaded\x20by\x20the\x20<code>go</code>\x0acommand.\x20If\x20an\x20excluded\x20version\x20is\x20referenced\x20by\x20a\x20<code>require</code>\x20directive\x20in\x20a\x0a<code>go.mod</code>\x20file,\x20the\x20<code>go</code>\x20command\x20will\x20list\x20available\x20versions\x20for\x20the\x20module\x20(as\x0ashown\x20with\x20<code>go\x20list\x20-m\x20-versions</code>)\x20and\x20will\x20load\x20the\x20next\x20higher\x20non-excluded\x0aversion\x20instead.\x20Both\x20release\x20and\x20pre-release\x20versions\x20are\x20considered\x20for\x20this\x0apurpose,\x20but\x20pseudo-versions\x20are\x20not.\x20If\x20there\x20are\x20no\x20higher\x20versions,\x0athe\x20<code>go</code>\x20command\x20will\x20report\x20an\x20error.\x20Note\x20that\x20this\x20<a\x20href=\"https://golang.org/issue/36465\">may\x0achange</a>\x20in\x20Go\x201.15.</p>\x0a<!--\x20TODO(golang.org/issue/36465):\x20update\x20after\x20change\x20-->\x0a<p><code>exclude</code>\x20directives\x20only\x20apply\x20in\x20the\x20main\x20module's\x20<code>go.mod</code>\x20file\x20and\x20are\x0aignored\x20in\x20other\x20modules.\x20See\x20<a\x20href=\"#minimal-version-selection\">Minimal\x20version\x0aselection</a>\x20for\x20details.</p>\x0a<pre><code>ExcludeDirective\x20=\x20&quot;exclude&quot;\x20(\x20ExcludeSpec\x20|\x20&quot;(&quot;\x20newline\x20{\x20ExcludeSpec\x20}\x20&quot;)&quot;\x20)\x20.\x0aExcludeSpec\x20=\x20ModulePath\x20Version\x20newline\x20.\x0a</code></pre>\x0a<p>Example:</p>\x0a<pre><code>exclude\x20golang.org/x/net\x20v1.2.3\x0a\x0aexclude\x20(\x0a\x20\x20\x20\x20golang.org/x/crypto\x20v1.4.5\x0a\x20\x20\x20\x20golang.org/x/text\x20v1.6.7\x0a)\x0a</code></pre>\x0a<p><a\x20id=\"go.mod-replace\"></a></p>\x0a<h3><code>replace</code>\x20directive</h3>\x0a<p>A\x20<code>replace</code>\x20directive\x20replaces\x20the\x20contents\x20of\x20a\x20specific\x20version\x20of\x20a\x20module,\x0aor\x20all\x20versions\x20of\x20a\x20module,\x20with\x20contents\x20found\x20elsewhere.\x20The\x20replacement\x0amay\x20be\x20specified\x20with\x20either\x20another\x20module\x20path\x20and\x20version,\x20or\x20a\x0aplatform-specific\x20file\x20path.</p>\x0a<p>If\x20a\x20version\x20is\x20present\x20on\x20the\x20left\x20side\x20of\x20the\x20arrow\x20(<code>=&gt;</code>),\x20only\x20that\x20specific\x0aversion\x20of\x20the\x20module\x20is\x20replaced;\x20other\x20versions\x20will\x20be\x20accessed\x20normally.\x0aIf\x20the\x20left\x20version\x20is\x20omitted,\x20all\x20versions\x20of\x20the\x20module\x20are\x20replaced.</p>\x0a<p>If\x20the\x20path\x20on\x20the\x20right\x20side\x20of\x20the\x20arrow\x20is\x20an\x20absolute\x20or\x20relative\x20path\x0a(beginning\x20with\x20<code>./</code>\x20or\x20<code>../</code>),\x20it\x20is\x20interpreted\x20as\x20the\x20local\x20file\x20path\x20to\x20the\x0areplacement\x20module\x20root\x20directory,\x20which\x20must\x20contain\x20a\x20<code>go.mod</code>\x20file.\x20The\x0areplacement\x20version\x20must\x20be\x20omitted\x20in\x20this\x20case.</p>\x0a<p>If\x20the\x20path\x20on\x20the\x20right\x20side\x20is\x20not\x20a\x20local\x20path,\x20it\x20must\x20be\x20a\x20valid\x20module\x0apath.\x20In\x20this\x20case,\x20a\x20version\x20is\x20required.\x20The\x20same\x20module\x20version\x20must\x20not\x0aalso\x20appear\x20in\x20the\x20build\x20list.</p>\x0a<p>Regardless\x20of\x20whether\x20a\x20replacement\x20is\x20specified\x20with\x20a\x20local\x20path\x20or\x20module\x0apath,\x20if\x20the\x20replacement\x20module\x20has\x20a\x20<code>go.mod</code>\x20file,\x20its\x20<code>module</code>\x20directive\x0amust\x20match\x20the\x20module\x20path\x20it\x20replaces.</p>\x0a<p><code>replace</code>\x20directives\x20only\x20apply\x20in\x20the\x20main\x20module's\x20<code>go.mod</code>\x20file\x0aand\x20are\x20ignored\x20in\x20other\x20modules.\x20See\x20<a\x20href=\"#minimal-version-selection\">Minimal\x20version\x0aselection</a>\x20for\x20details.</p>\x0a<pre><code>ReplaceDirective\x20=\x20&quot;replace&quot;\x20(\x20ReplaceSpec\x20|\x20&quot;(&quot;\x20newline\x20{\x20ReplaceSpec\x20}\x20&quot;)&quot;\x20newline\x20&quot;)&quot;\x20)\x20.\x0aReplaceSpec\x20=\x20ModulePath\x20[\x20Version\x20]\x20&quot;=&gt;&quot;\x20FilePath\x20newline\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20|\x20ModulePath\x20[\x20Version\x20]\x20&quot;=&gt;&quot;\x20ModulePath\x20Version\x20newline\x20.\x0aFilePath\x20=\x20/*\x20platform-specific\x20relative\x20or\x20absolute\x20file\x20path\x20*/\x0a</code></pre>\x0a<p>Example:</p>\x0a<pre><code>replace\x20golang.org/x/net\x20v1.2.3\x20=&gt;\x20example.com/fork/net\x20v1.4.5\x0a\x0areplace\x20(\x0a\x20\x20\x20\x20golang.org/x/net\x20v1.2.3\x20=&gt;\x20example.com/fork/net\x20v1.4.5\x0a\x20\x20\x20\x20golang.org/x/net\x20=&gt;\x20example.com/fork/net\x20v1.4.5\x0a\x20\x20\x20\x20golang.org/x/net\x20v1.2.3\x20=&gt;\x20./fork/net\x0a\x20\x20\x20\x20golang.org/x/net\x20=&gt;\x20./fork/net\x0a)\x0a</code></pre>\x0a<p><a\x20id=\"go.mod-updates\"></a></p>\x0a<h3>Automatic\x20updates</h3>\x0a<p>The\x20<code>go</code>\x20command\x20automatically\x20updates\x20<code>go.mod</code>\x20when\x20it\x20uses\x20the\x20module\x20graph\x20if\x0asome\x20information\x20is\x20missing\x20or\x20<code>go.mod</code>\x20doesn't\x20accurately\x20reflect\x20reality.\x20\x20For\x0aexample,\x20consider\x20this\x20<code>go.mod</code>\x20file:</p>\x0a<pre><code>module\x20example.com/M\x0a\x0arequire\x20(\x0a\x20\x20\x20\x20example.com/A\x20v1\x0a\x20\x20\x20\x20example.com/B\x20v1.0.0\x0a\x20\x20\x20\x20example.com/C\x20v1.0.0\x0a\x20\x20\x20\x20example.com/D\x20v1.2.3\x0a\x20\x20\x20\x20example.com/E\x20dev\x0a)\x0a\x0aexclude\x20example.com/D\x20v1.2.3\x0a</code></pre>\x0a<p>The\x20update\x20rewrites\x20non-canonical\x20version\x20identifiers\x20to\x0a<a\x20href=\"#glos-canonical-version\">canonical</a>\x20semver\x20form,\x20so\x20<code>example.com/A</code>'s\x20<code>v1</code>\x0abecomes\x20<code>v1.0.0</code>,\x20and\x20<code>example.com/E</code>'s\x20<code>dev</code>\x20becomes\x20the\x20pseudo-version\x20for\x20the\x0alatest\x20commit\x20on\x20the\x20<code>dev</code>\x20branch,\x20perhaps\x20<code>v0.0.0-20180523231146-b3f5c0f6e5f1</code>.</p>\x0a<p>The\x20update\x20modifies\x20requirements\x20to\x20respect\x20exclusions,\x20so\x20the\x20requirement\x20on\x0athe\x20excluded\x20<code>example.com/D\x20v1.2.3</code>\x20is\x20updated\x20to\x20use\x20the\x20next\x20available\x20version\x0aof\x20<code>example.com/D</code>,\x20perhaps\x20<code>v1.2.4</code>\x20or\x20<code>v1.3.0</code>.</p>\x0a<p>The\x20update\x20removes\x20redundant\x20or\x20misleading\x20requirements.\x20For\x20example,\x20if\x0a<code>example.com/A\x20v1.0.0</code>\x20itself\x20requires\x20<code>example.com/B\x20v1.2.0</code>\x20and\x20<code>example.com/C\x20v1.0.0</code>,\x20then\x20<code>go.mod</code>'s\x20requirement\x20of\x20<code>example.com/B\x20v1.0.0</code>\x20is\x20misleading\x0a(superseded\x20by\x20<code>example.com/A</code>'s\x20need\x20for\x20<code>v1.2.0</code>),\x20and\x20its\x20requirement\x20of\x0a<code>example.com/C\x20v1.0.0</code>\x20is\x20redundant\x20(implied\x20by\x20<code>example.com/A</code>'s\x20need\x20for\x20the\x0asame\x20version),\x20so\x20both\x20will\x20be\x20removed.\x20If\x20the\x20main\x20module\x20contains\x20packages\x0athat\x20directly\x20import\x20packages\x20from\x20<code>example.com/B</code>\x20or\x20<code>example.com/C</code>,\x20then\x20the\x0arequirements\x20will\x20be\x20kept\x20but\x20updated\x20to\x20the\x20actual\x20versions\x20being\x20used.</p>\x0a<p>Finally,\x20the\x20update\x20reformats\x20the\x20<code>go.mod</code>\x20in\x20a\x20canonical\x20formatting,\x20so\x0athat\x20future\x20mechanical\x20changes\x20will\x20result\x20in\x20minimal\x20diffs.\x20The\x20<code>go</code>\x20command\x0awill\x20not\x20update\x20<code>go.mod</code>\x20if\x20only\x20formatting\x20changes\x20are\x20needed.</p>\x0a<p>Because\x20the\x20module\x20graph\x20defines\x20the\x20meaning\x20of\x20import\x20statements,\x20any\x20commands\x0athat\x20load\x20packages\x20also\x20use\x20and\x20therefore\x20update\x20<code>go.mod</code>,\x20including\x20<code>go\x20build</code>,\x0a<code>go\x20get</code>,\x20<code>go\x20install</code>,\x20<code>go\x20list</code>,\x20<code>go\x20test</code>,\x20<code>go\x20mod\x20graph</code>,\x20<code>go\x20mod\x20tidy</code>,\x20and\x0a<code>go\x20mod\x20why</code>.</p>\x0a<p>The\x20<code>-mod=readonly</code>\x20flag\x20prevents\x20commands\x20from\x20automatically\x20updating\x0a<code>go.mod</code>.\x20However,\x20if\x20a\x20command\x20needs\x20to\x20perform\x20an\x20action\x20that\x20would\x0aupdate\x20to\x20<code>go.mod</code>,\x20it\x20will\x20report\x20an\x20error.\x20For\x20example,\x20if\x0a<code>go\x20build</code>\x20is\x20asked\x20to\x20build\x20a\x20package\x20not\x20provided\x20by\x20any\x20module\x20in\x20the\x20build\x0alist,\x20<code>go\x20build</code>\x20will\x20report\x20an\x20error\x20instead\x20of\x20looking\x20up\x20the\x20module\x20and\x0aupdating\x20requirements\x20in\x20<code>go.mod</code>.</p>\x0a<p><a\x20id=\"minimal-version-selection\"></a></p>\x0a<h2>Minimal\x20version\x20selection\x20(MVS)</h2>\x0a<p><a\x20id=\"non-module-compat\"></a></p>\x0a<h2>Compatibility\x20with\x20non-module\x20repositories</h2>\x0a<p><a\x20id=\"mod-commands\"></a></p>\x0a<h2>Module-aware\x20commands</h2>\x0a<p>Most\x20<code>go</code>\x20commands\x20may\x20run\x20in\x20<em>Module-aware\x20mode</em>\x20or\x20<em><code>GOPATH</code>\x20mode</em>.\x20In\x0amodule-aware\x20mode,\x20the\x20<code>go</code>\x20command\x20uses\x20<code>go.mod</code>\x20files\x20to\x20find\x20versioned\x0adependencies,\x20and\x20it\x20typically\x20loads\x20packages\x20out\x20of\x20the\x20<a\x20href=\"#glos-module-cache\">module\x0acache</a>,\x20downloading\x20modules\x20if\x20they\x20are\x20missing.\x20In\x20<code>GOPATH</code>\x0amode,\x20the\x20<code>go</code>\x20command\x20ignores\x20modules;\x20it\x20looks\x20in\x20<code>vendor</code>\x20directories\x20and\x20in\x0a<code>GOPATH</code>\x20to\x20find\x20dependencies.</p>\x0a<p>Module-aware\x20mode\x20is\x20active\x20by\x20default\x20whenever\x20a\x20<code>go.mod</code>\x20file\x20is\x20found\x20in\x20the\x0acurrent\x20directory\x20or\x20in\x20any\x20parent\x20directory.\x20For\x20more\x20fine-grained\x20control,\x20the\x0a<code>GO111MODULE</code>\x20environment\x20variable\x20may\x20be\x20set\x20to\x20one\x20of\x20three\x20values:\x20<code>on</code>,\x0a<code>off</code>,\x20or\x20<code>auto</code>.</p>\x0a<ul>\x0a<li>If\x20<code>GO111MODULE=off</code>,\x20the\x20<code>go</code>\x20command\x20ignores\x20<code>go.mod</code>\x20files\x20and\x20runs\x20in\x0a<code>GOPATH</code>\x20mode.</li>\x0a<li>If\x20<code>GO111MODULE=on</code>,\x20the\x20<code>go</code>\x20command\x20runs\x20in\x20module-aware\x20mode,\x20even\x20when\x0ano\x20<code>go.mod</code>\x20file\x20is\x20present.\x20Not\x20all\x20commands\x20work\x20without\x20a\x20<code>go.mod</code>\x20file:\x0asee\x20<a\x20href=\"#commands-outside\">Module\x20commands\x20outside\x20a\x20module</a>.</li>\x0a<li>If\x20<code>GO111MODULE=auto</code>\x20or\x20is\x20unset,\x20the\x20<code>go</code>\x20command\x20runs\x20in\x20module-aware\x0amode\x20if\x20a\x20<code>go.mod</code>\x20file\x20is\x20present\x20in\x20the\x20current\x20directory\x20or\x20any\x20parent\x0adirectory\x20(the\x20default\x20behavior).</li>\x0a</ul>\x0a<p>In\x20module-aware\x20mode,\x20<code>GOPATH</code>\x20no\x20longer\x20defines\x20the\x20meaning\x20of\x20imports\x20during\x20a\x0abuild,\x20but\x20it\x20still\x20stores\x20downloaded\x20dependencies\x20(in\x20<code>GOPATH/pkg/mod</code>;\x20see\x0a<a\x20href=\"#module-cache\">Module\x20cache</a>)\x20and\x20installed\x20commands\x20(in\x20<code>GOPATH/bin</code>,\x20unless\x0a<code>GOBIN</code>\x20is\x20set).</p>\x0a<p><a\x20id=\"build-commands\"></a></p>\x0a<h3>Build\x20commands</h3>\x0a<p><a\x20id=\"vendoring\"></a></p>\x0a<h3>Vendoring</h3>\x0a<p>When\x20using\x20modules,\x20the\x20<code>go</code>\x20command\x20typically\x20satisfies\x20dependencies\x20by\x0adownloading\x20modules\x20from\x20their\x20sources\x20into\x20the\x20module\x20cache,\x20then\x20loading\x0apackages\x20from\x20those\x20downloaded\x20copies.\x20<em>Vendoring</em>\x20may\x20be\x20used\x20to\x20allow\x0ainteroperation\x20with\x20older\x20versions\x20of\x20Go,\x20or\x20to\x20ensure\x20that\x20all\x20files\x20used\x20for\x20a\x0abuild\x20are\x20stored\x20in\x20a\x20single\x20file\x20tree.</p>\x0a<p>The\x20<code>go\x20mod\x20vendor</code>\x20command\x20constructs\x20a\x20directory\x20named\x20<code>vendor</code>\x20in\x20the\x20<a\x20href=\"#glos-main-module\">main\x0amodule's</a>\x20root\x20directory\x20containing\x20copies\x20of\x20all\x20packages\x0aneeded\x20to\x20build\x20and\x20test\x20packages\x20in\x20the\x20main\x20module.\x20Packages\x20that\x20are\x20only\x0aimported\x20by\x20tests\x20of\x20packages\x20outside\x20the\x20main\x20module\x20are\x20not\x20included.\x20As\x20with\x0a<a\x20href=\"#go-mod-tidy\"><code>go\x20mod\x20tidy</code></a>\x20and\x20other\x20module\x20commands,\x20<a\x20href=\"#glos-build-constraint\">build\x0aconstraints</a>\x20except\x20for\x20<code>ignore</code>\x20are\x20not\x20considered\x20when\x0aconstructing\x20the\x20<code>vendor</code>\x20directory.</p>\x0a<p><code>go\x20mod\x20vendor</code>\x20also\x20creates\x20the\x20file\x20<code>vendor/modules.txt</code>\x20that\x20contains\x20a\x20list\x0aof\x20vendored\x20packages\x20and\x20the\x20module\x20versions\x20they\x20were\x20copied\x20from.\x20When\x0avendoring\x20is\x20enabled,\x20this\x20manifest\x20is\x20used\x20as\x20a\x20source\x20of\x20module\x20version\x0ainformation,\x20as\x20reported\x20by\x20<a\x20href=\"#go-list-m\"><code>go\x20list\x20-m</code></a>\x20and\x20<a\x20href=\"#go-version-m\"><code>go\x20version\x20-m</code></a>.\x20When\x20the\x20<code>go</code>\x20command\x20reads\x20<code>vendor/modules.txt</code>,\x20it\x20checks\x0athat\x20the\x20module\x20versions\x20are\x20consistent\x20with\x20<code>go.mod</code>.\x20If\x20<code>go.mod</code>\x20has\x20changed\x0asince\x20<code>vendor/modules.txt</code>\x20was\x20generated,\x20the\x20<code>go</code>\x20command\x20will\x20report\x20an\x20error.\x0a<code>go\x20mod\x20vendor</code>\x20should\x20be\x20run\x20again\x20to\x20update\x20the\x20<code>vendor</code>\x20directory.</p>\x0a<p>If\x20the\x20<code>vendor</code>\x20directory\x20is\x20present\x20in\x20the\x20main\x20module's\x20root\x20directory,\x20it\x0awill\x20be\x20used\x20automatically\x20if\x20the\x20<a\x20href=\"#go.mod-go\"><code>go</code>\x20version</a>\x20in\x20the\x20main\x0amodule's\x20<a\x20href=\"#glos-go.mod-file\"><code>go.mod</code>\x20file</a>\x20is\x20<code>1.14</code>\x20or\x20higher.\x20To\x20explicitly\x0aenable\x20vendoring,\x20invoke\x20the\x20<code>go</code>\x20command\x20with\x20the\x20flag\x20<code>-mod=vendor</code>.\x20To\x0adisable\x20vendoring,\x20use\x20the\x20flag\x20<code>-mod=mod</code>.</p>\x0a<p>When\x20vendoring\x20is\x20enabled,\x20<a\x20href=\"#build-commands\">build\x20commands</a>\x20like\x20<code>go\x20build</code>\x20and\x0a<code>go\x20test</code>\x20load\x20packages\x20from\x20the\x20<code>vendor</code>\x20directory\x20instead\x20of\x20accessing\x20the\x0anetwork\x20or\x20the\x20local\x20module\x20cache.\x20The\x20<a\x20href=\"#go-list-m\"><code>go\x20list\x20-m</code></a>\x20command\x20only\x0aprints\x20information\x20about\x20modules\x20listed\x20in\x20<code>go.mod</code>.\x20<code>go\x20mod</code>\x20commands\x20such\x20as\x0a<a\x20href=\"#go-mod-download\"><code>go\x20mod\x20download</code></a>\x20and\x20<a\x20href=\"#go-mod-tidy\"><code>go\x20mod\x20tidy</code></a>\x20do\x20not\x0awork\x20differently\x20when\x20vendoring\x20is\x20enabled\x20and\x20will\x20still\x20download\x20modules\x20and\x0aaccess\x20the\x20module\x20cache.\x20<a\x20href=\"#go-get\"><code>go\x20get</code></a>\x20also\x20does\x20not\x20work\x20differently\x20when\x0avendoring\x20is\x20enabled.</p>\x0a<p>Unlike\x20<a\x20href=\"https://golang.org/s/go15vendor\">vendoring\x20in\x20<code>GOPATH</code></a>,\x20the\x20<code>go</code>\x0acommand\x20ignores\x20vendor\x20directories\x20in\x20locations\x20other\x20than\x20the\x20main\x20module's\x0aroot\x20directory.</p>\x0a<p><a\x20id=\"go-get\"></a></p>\x0a<h3><code>go\x20get</code></h3>\x0a<p>Usage:</p>\x0a<pre><code>go\x20get\x20[-d]\x20[-t]\x20[-u]\x20[build\x20flags]\x20[packages]\x0a</code></pre>\x0a<p>Examples:</p>\x0a<pre><code>#\x20Install\x20the\x20latest\x20version\x20of\x20a\x20tool.\x0a$\x20go\x20get\x20golang.org/x/tools/cmd/goimports\x0a\x0a#\x20Upgrade\x20a\x20specific\x20module.\x0a$\x20go\x20get\x20-d\x20golang.org/x/net\x0a\x0a#\x20Upgrade\x20modules\x20that\x20provide\x20packages\x20imported\x20by\x20package\x20in\x20the\x20main\x20module.\x0a$\x20go\x20get\x20-u\x20./...\x0a\x0a#\x20Upgrade\x20or\x20downgrade\x20to\x20a\x20specific\x20version\x20of\x20a\x20module.\x0a$\x20go\x20get\x20-d\x20golang.org/x/text@v0.3.2\x0a\x0a#\x20Update\x20to\x20the\x20commit\x20on\x20the\x20module's\x20master\x20branch.\x0a$\x20go\x20get\x20-d\x20golang.org/x/text@master\x0a\x0a#\x20Remove\x20a\x20dependency\x20on\x20a\x20module\x20and\x20downgrade\x20modules\x20that\x20require\x20it\x0a#\x20to\x20versions\x20that\x20don't\x20require\x20it.\x0a$\x20go\x20get\x20-d\x20golang.org/x/text@none\x0a</code></pre>\x0a<p>The\x20<code>go\x20get</code>\x20command\x20updates\x20module\x20dependencies\x20in\x20the\x20<a\x20href=\"#go.mod-files\"><code>go.mod</code>\x0afile</a>\x20for\x20the\x20<a\x20href=\"#glos-main-module\">main\x20module</a>,\x20then\x20builds\x20and\x0ainstalls\x20packages\x20listed\x20on\x20the\x20command\x20line.</p>\x0a<p>The\x20first\x20step\x20is\x20to\x20determine\x20which\x20modules\x20to\x20update.\x20<code>go\x20get</code>\x20accepts\x20a\x20list\x0aof\x20packages,\x20package\x20patterns,\x20and\x20module\x20paths\x20as\x20arguments.\x20If\x20a\x20package\x0aargument\x20is\x20specified,\x20<code>go\x20get</code>\x20updates\x20the\x20module\x20that\x20provides\x20the\x20package.\x0aIf\x20a\x20package\x20pattern\x20is\x20specified\x20(for\x20example,\x20<code>all</code>\x20or\x20a\x20path\x20with\x20a\x20<code>...</code>\x0awildcard),\x20<code>go\x20get</code>\x20expands\x20the\x20pattern\x20to\x20a\x20set\x20of\x20packages,\x20then\x20updates\x20the\x0amodules\x20that\x20provide\x20the\x20packages.\x20If\x20an\x20argument\x20names\x20a\x20module\x20but\x20not\x20a\x0apackage\x20(for\x20example,\x20the\x20module\x20<code>golang.org/x/net</code>\x20has\x20no\x20package\x20in\x20its\x20root\x0adirectory),\x20<code>go\x20get</code>\x20will\x20update\x20the\x20module\x20but\x20will\x20not\x20build\x20a\x20package.\x20If\x20no\x0aarguments\x20are\x20specified,\x20<code>go\x20get</code>\x20acts\x20as\x20if\x20<code>.</code>\x20were\x20specified\x20(the\x20package\x20in\x0athe\x20current\x20directory);\x20this\x20may\x20be\x20used\x20together\x20with\x20the\x20<code>-u</code>\x20flag\x20to\x20update\x0amodules\x20that\x20provide\x20imported\x20packages.</p>\x0a<p>Each\x20argument\x20may\x20include\x20a\x20<dfn>version\x20query\x20suffix</dfn>\x20indicating\x20the\x0adesired\x20version,\x20as\x20in\x20<code>go\x20get\x20golang.org/x/text@v0.3.0</code>.\x20A\x20version\x20query\x0asuffix\x20consists\x20of\x20an\x20<code>@</code>\x20symbol\x20followed\x20by\x20a\x20<a\x20href=\"#version-queries\">version\x20query</a>,\x0awhich\x20may\x20indicate\x20a\x20specific\x20version\x20(<code>v0.3.0</code>),\x20a\x20version\x20prefix\x20(<code>v0.3</code>),\x0aa\x20branch\x20or\x20tag\x20name\x20(<code>master</code>),\x20a\x20revision\x20(<code>1234abcd</code>),\x20or\x20one\x20of\x20the\x20special\x0aqueries\x20<code>latest</code>,\x20<code>upgrade</code>,\x20<code>patch</code>,\x20or\x20<code>none</code>.\x20If\x20no\x20version\x20is\x20given,\x0a<code>go\x20get</code>\x20uses\x20the\x20<code>@upgrade</code>\x20query.</p>\x0a<p>Once\x20<code>go\x20get</code>\x20has\x20resolved\x20its\x20arguments\x20to\x20specific\x20modules\x20and\x20versions,\x20<code>go\x20get</code>\x20will\x20add,\x20change,\x20or\x20remove\x20<a\x20href=\"#go.mod-require\"><code>require</code>\x20directives</a>\x20in\x20the\x0amain\x20module's\x20<code>go.mod</code>\x20file\x20to\x20ensure\x20the\x20modules\x20remain\x20at\x20the\x20desired\x0aversions\x20in\x20the\x20future.\x20Note\x20that\x20required\x20versions\x20in\x20<code>go.mod</code>\x20files\x20are\x0a<em>minimum\x20versions</em>\x20and\x20may\x20be\x20increased\x20automatically\x20as\x20new\x20dependencies\x20are\x0aadded.\x20See\x20<a\x20href=\"#minimal-version-selection\">Minimal\x20version\x20selection\x20(MVS)</a>\x20for\x0adetails\x20on\x20how\x20versions\x20are\x20selected\x20and\x20conflicts\x20are\x20resolved\x20by\x20module-aware\x0acommands.</p>\x0a<!--\x20TODO(jayconrod):\x20add\x20diagrams\x20for\x20the\x20examples\x20below.\x0aWe\x20need\x20a\x20consistent\x20strategy\x20for\x20visualizing\x20module\x20graphs\x20here,\x20in\x20the\x20MVS\x0asection,\x20and\x20perhaps\x20in\x20other\x20documentation\x20(blog\x20posts,\x20etc.).\x0a-->\x0a<p>Other\x20modules\x20may\x20be\x20upgraded\x20when\x20a\x20module\x20named\x20on\x20the\x20command\x20line\x20is\x20added,\x0aupgraded,\x20or\x20downgraded\x20if\x20the\x20new\x20version\x20of\x20the\x20named\x20module\x20requires\x20other\x0amodules\x20at\x20higher\x20versions.\x20For\x20example,\x20suppose\x20module\x20<code>example.com/a</code>\x20is\x0aupgraded\x20to\x20version\x20<code>v1.5.0</code>,\x20and\x20that\x20version\x20requires\x20module\x20<code>example.com/b</code>\x0aat\x20version\x20<code>v1.2.0</code>.\x20If\x20module\x20<code>example.com/b</code>\x20is\x20currently\x20required\x20at\x20version\x0a<code>v1.1.0</code>,\x20<code>go\x20get\x20example.com/a@v1.5.0</code>\x20will\x20also\x20upgrade\x20<code>example.com/b</code>\x20to\x0a<code>v1.2.0</code>.</p>\x0a<p>Other\x20modules\x20may\x20be\x20downgraded\x20when\x20a\x20module\x20named\x20on\x20the\x20command\x20line\x20is\x0adowngraded\x20or\x20removed.\x20To\x20continue\x20the\x20above\x20example,\x20suppose\x20module\x0a<code>example.com/b</code>\x20is\x20downgraded\x20to\x20<code>v1.1.0</code>.\x20Module\x20<code>example.com/a</code>\x20would\x20also\x20be\x0adowngraded\x20to\x20a\x20version\x20that\x20requires\x20<code>example.com/b</code>\x20at\x20version\x20<code>v1.1.0</code>\x20or\x0alower.</p>\x0a<p>A\x20module\x20requirement\x20may\x20be\x20removed\x20using\x20the\x20version\x20suffix\x20<code>@none</code>.\x20This\x20is\x20a\x0aspecial\x20kind\x20of\x20downgrade.\x20Modules\x20that\x20depend\x20on\x20the\x20removed\x20module\x20will\x20be\x0adowngraded\x20or\x20removed\x20as\x20needed.\x20A\x20module\x20requirement\x20may\x20be\x20removed\x20even\x20if\x20one\x0aor\x20more\x20of\x20its\x20packages\x20are\x20imported\x20by\x20packages\x20in\x20the\x20main\x20module.\x20In\x20this\x0acase,\x20the\x20next\x20build\x20command\x20may\x20add\x20a\x20new\x20module\x20requirement.</p>\x0a<p>If\x20a\x20module\x20is\x20needed\x20at\x20two\x20different\x20versions\x20(specified\x20explicitly\x20in\x20command\x0aline\x20arguments\x20or\x20to\x20satisfy\x20upgrades\x20and\x20downgrades),\x20<code>go\x20get</code>\x20will\x20report\x20an\x0aerror.</p>\x0a<p>After\x20<code>go\x20get</code>\x20updates\x20the\x20<code>go.mod</code>\x20file,\x20it\x20builds\x20the\x20packages\x20named\x0aon\x20the\x20command\x20line.\x20Executables\x20will\x20be\x20installed\x20in\x20the\x20directory\x20named\x20by\x0athe\x20<code>GOBIN</code>\x20environment\x20variable,\x20which\x20defaults\x20to\x20<code>$GOPATH/bin</code>\x20or\x0a<code>$HOME/go/bin</code>\x20if\x20the\x20<code>GOPATH</code>\x20environment\x20variable\x20is\x20not\x20set.</p>\x0a<p><code>go\x20get</code>\x20supports\x20the\x20following\x20flags:</p>\x0a<ul>\x0a<li>The\x20<code>-d</code>\x20flag\x20tells\x20<code>go\x20get</code>\x20not\x20to\x20build\x20or\x20install\x20packages.\x20When\x20<code>-d</code>\x20is\x0aused,\x20<code>go\x20get</code>\x20will\x20only\x20manage\x20dependencies\x20in\x20<code>go.mod</code>.</li>\x0a<li>The\x20<code>-u</code>\x20flag\x20tells\x20<code>go\x20get</code>\x20to\x20upgrade\x20modules\x20providing\x20packages\x0aimported\x20directly\x20or\x20indirectly\x20by\x20packages\x20named\x20on\x20the\x20command\x20line.\x0aEach\x20module\x20selected\x20by\x20<code>-u</code>\x20will\x20be\x20upgraded\x20to\x20its\x20latest\x20version\x20unless\x0ait\x20is\x20already\x20required\x20at\x20a\x20higher\x20version\x20(a\x20pre-release).</li>\x0a<li>The\x20<code>-u=patch</code>\x20flag\x20(not\x20<code>-u\x20patch</code>)\x20also\x20tells\x20<code>go\x20get</code>\x20to\x20upgrade\x0adependencies,\x20but\x20<code>go\x20get</code>\x20will\x20upgrade\x20each\x20dependency\x20to\x20the\x20latest\x20patch\x0aversion\x20(similar\x20to\x20the\x20<code>@patch</code>\x20version\x20query).</li>\x0a<li>The\x20<code>-t</code>\x20flag\x20tells\x20<code>go\x20get</code>\x20to\x20consider\x20modules\x20needed\x20to\x20build\x20tests\x0aof\x20packages\x20named\x20on\x20the\x20command\x20line.\x20When\x20<code>-t</code>\x20and\x20<code>-u</code>\x20are\x20used\x20together,\x0a<code>go\x20get</code>\x20will\x20update\x20test\x20dependencies\x20as\x20well.</li>\x0a<li>The\x20<code>-insecure</code>\x20flag\x20should\x20no\x20longer\x20be\x20used.\x20It\x20permits\x20<code>go\x20get</code>\x20to\x20resolve\x0acustom\x20import\x20paths\x20and\x20fetch\x20from\x20repositories\x20and\x20module\x20proxies\x20using\x0ainsecure\x20schemes\x20such\x20as\x20HTTP.\x20The\x20<code>GOINSECURE</code>\x20<a\x20href=\"#environment-variables\">environment\x0avariable</a>\x20provides\x20more\x20fine-grained\x20control\x20and\x0ashould\x20be\x20used\x20instead.</li>\x0a</ul>\x0a<p><a\x20id=\"go-list-m\"></a></p>\x0a<h3><code>go\x20list\x20-m</code></h3>\x0a<p>Usage:</p>\x0a<pre><code>go\x20list\x20-m\x20[-u]\x20[-versions]\x20[list\x20flags]\x20[modules]\x0a</code></pre>\x0a<p>Example:</p>\x0a<pre><code>$\x20go\x20list\x20-m\x20all\x0a$\x20go\x20list\x20-m\x20-versions\x20example.com/m\x0a$\x20go\x20list\x20-m\x20-json\x20example.com/m@latest\x0a</code></pre>\x0a<p>The\x20<code>-m</code>\x20flag\x20causes\x20<code>go\x20list</code>\x20to\x20list\x20modules\x20instead\x20of\x20packages.\x20In\x20this\x0amode,\x20the\x20arguments\x20to\x20<code>go\x20list</code>\x20may\x20be\x20modules,\x20module\x20patterns\x20(containing\x20the\x0a<code>...</code>\x20wildcard),\x20<a\x20href=\"#version-queries\">version\x20queries</a>,\x20or\x20the\x20special\x20pattern\x0a<code>all</code>,\x20which\x20matches\x20all\x20modules\x20in\x20the\x20<a\x20href=\"#glos-build-list\">build\x20list</a>.\x20If\x20no\x0aarguments\x20are\x20specified,\x20the\x20<a\x20href=\"#glos-main-module\">main\x20module</a>\x20is\x20listed.</p>\x0a<p>When\x20listing\x20modules,\x20the\x20<code>-f</code>\x20flag\x20still\x20specifies\x20a\x20format\x20template\x20applied\x0ato\x20a\x20Go\x20struct,\x20but\x20now\x20a\x20<code>Module</code>\x20struct:</p>\x0a<pre><code>type\x20Module\x20struct\x20{\x0a\x20\x20\x20\x20Path\x20\x20\x20\x20\x20\x20string\x20\x20\x20\x20\x20\x20\x20//\x20module\x20path\x0a\x20\x20\x20\x20Version\x20\x20\x20string\x20\x20\x20\x20\x20\x20\x20//\x20module\x20version\x0a\x20\x20\x20\x20Versions\x20\x20[]string\x20\x20\x20\x20\x20//\x20available\x20module\x20versions\x20(with\x20-versions)\x0a\x20\x20\x20\x20Replace\x20\x20\x20*Module\x20\x20\x20\x20\x20\x20//\x20replaced\x20by\x20this\x20module\x0a\x20\x20\x20\x20Time\x20\x20\x20\x20\x20\x20*time.Time\x20\x20\x20//\x20time\x20version\x20was\x20created\x0a\x20\x20\x20\x20Update\x20\x20\x20\x20*Module\x20\x20\x20\x20\x20\x20//\x20available\x20update,\x20if\x20any\x20(with\x20-u)\x0a\x20\x20\x20\x20Main\x20\x20\x20\x20\x20\x20bool\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20is\x20this\x20the\x20main\x20module?\x0a\x20\x20\x20\x20Indirect\x20\x20bool\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20is\x20this\x20module\x20only\x20an\x20indirect\x20dependency\x20of\x20main\x20module?\x0a\x20\x20\x20\x20Dir\x20\x20\x20\x20\x20\x20\x20string\x20\x20\x20\x20\x20\x20\x20//\x20directory\x20holding\x20files\x20for\x20this\x20module,\x20if\x20any\x0a\x20\x20\x20\x20GoMod\x20\x20\x20\x20\x20string\x20\x20\x20\x20\x20\x20\x20//\x20path\x20to\x20go.mod\x20file\x20for\x20this\x20module,\x20if\x20any\x0a\x20\x20\x20\x20GoVersion\x20string\x20\x20\x20\x20\x20\x20\x20//\x20go\x20version\x20used\x20in\x20module\x0a\x20\x20\x20\x20Error\x20\x20\x20\x20\x20*ModuleError\x20//\x20error\x20loading\x20module\x0a}\x0a\x0atype\x20ModuleError\x20struct\x20{\x0a\x20\x20\x20\x20Err\x20string\x20//\x20the\x20error\x20itself\x0a}\x0a</code></pre>\x0a<p>The\x20default\x20output\x20is\x20to\x20print\x20the\x20module\x20path\x20and\x20then\x20information\x20about\x20the\x0aversion\x20and\x20replacement\x20if\x20any.\x20For\x20example,\x20<code>go\x20list\x20-m\x20all</code>\x20might\x20print:</p>\x0a<pre><code>example.com/main/module\x0agolang.org/x/text\x20v0.3.0\x20=&gt;\x20/tmp/text\x0arsc.io/pdf\x20v0.1.1\x0a</code></pre>\x0a<p>The\x20<code>Module</code>\x20struct\x20has\x20a\x20<code>String</code>\x20method\x20that\x20formats\x20this\x20line\x20of\x20output,\x20so\x0athat\x20the\x20default\x20format\x20is\x20equivalent\x20to\x20<code>-f\x20'{{.String}}'</code>.</p>\x0a<p>Note\x20that\x20when\x20a\x20module\x20has\x20been\x20replaced,\x20its\x20<code>Replace</code>\x20field\x20describes\x20the\x0areplacement\x20module\x20module,\x20and\x20its\x20<code>Dir</code>\x20field\x20is\x20set\x20to\x20the\x20replacement\x0amodule's\x20source\x20code,\x20if\x20present.\x20(That\x20is,\x20if\x20<code>Replace</code>\x20is\x20non-nil,\x20then\x20<code>Dir</code>\x0ais\x20set\x20to\x20<code>Replace.Dir</code>,\x20with\x20no\x20access\x20to\x20the\x20replaced\x20source\x20code.)</p>\x0a<p>The\x20<code>-u</code>\x20flag\x20adds\x20information\x20about\x20available\x20upgrades.\x20When\x20the\x20latest\x20version\x0aof\x20a\x20given\x20module\x20is\x20newer\x20than\x20the\x20current\x20one,\x20<code>list\x20-u</code>\x20sets\x20the\x20module's\x0a<code>Update</code>\x20field\x20to\x20information\x20about\x20the\x20newer\x20module.\x20The\x20module's\x20<code>String</code>\x0amethod\x20indicates\x20an\x20available\x20upgrade\x20by\x20formatting\x20the\x20newer\x20version\x20in\x0abrackets\x20after\x20the\x20current\x20version.\x20For\x20example,\x20<code>go\x20list\x20-m\x20-u\x20all</code>\x20might\x0aprint:</p>\x0a<pre><code>example.com/main/module\x0agolang.org/x/text\x20v0.3.0\x20[v0.4.0]\x20=&gt;\x20/tmp/text\x0arsc.io/pdf\x20v0.1.1\x20[v0.1.2]\x0a</code></pre>\x0a<p>(For\x20tools,\x20<code>go\x20list\x20-m\x20-u\x20-json\x20all</code>\x20may\x20be\x20more\x20convenient\x20to\x20parse.)</p>\x0a<p>The\x20<code>-versions</code>\x20flag\x20causes\x20<code>list</code>\x20to\x20set\x20the\x20module's\x20<code>Versions</code>\x20field\x20to\x20a\x0alist\x20of\x20all\x20known\x20versions\x20of\x20that\x20module,\x20ordered\x20according\x20to\x20semantic\x0aversioning,\x20lowest\x20to\x20highest.\x20The\x20flag\x20also\x20changes\x20the\x20default\x20output\x20format\x0ato\x20display\x20the\x20module\x20path\x20followed\x20by\x20the\x20space-separated\x20version\x20list.</p>\x0a<p>The\x20template\x20function\x20<code>module</code>\x20takes\x20a\x20single\x20string\x20argument\x20that\x20must\x20be\x20a\x0amodule\x20path\x20or\x20query\x20and\x20returns\x20the\x20specified\x20module\x20as\x20a\x20<code>Module</code>\x20struct.\x20If\x0aan\x20error\x20occurs,\x20the\x20result\x20will\x20be\x20a\x20<code>Module</code>\x20struct\x20with\x20a\x20non-nil\x20<code>Error</code>\x0afield.</p>\x0a<p><a\x20id=\"go-mod-download\"></a></p>\x0a<h3><code>go\x20mod\x20download</code></h3>\x0a<p>Usage:</p>\x0a<pre><code>go\x20mod\x20download\x20[-json]\x20[-x]\x20[modules]\x0a</code></pre>\x0a<p>Example:</p>\x0a<pre><code>$\x20go\x20mod\x20download\x0a$\x20go\x20mod\x20download\x20golang.org/x/mod@v0.2.0\x0a</code></pre>\x0a<p>The\x20<code>go\x20mod\x20download</code>\x20command\x20downloads\x20the\x20named\x20modules\x20into\x20the\x20<a\x20href=\"#glos-module-cache\">module\x0acache</a>.\x20Arguments\x20can\x20be\x20module\x20paths\x20or\x20module\x0apatterns\x20selecting\x20dependencies\x20of\x20the\x20main\x20module\x20or\x20<a\x20href=\"#version-queries\">version\x0aqueries</a>\x20of\x20the\x20form\x20<code>path@version</code>.\x20With\x20no\x20arguments,\x0a<code>download</code>\x20applies\x20to\x20all\x20dependencies\x20of\x20the\x20<a\x20href=\"#glos-main-module\">main\x20module</a>.</p>\x0a<p>The\x20<code>go</code>\x20command\x20will\x20automatically\x20download\x20modules\x20as\x20needed\x20during\x20ordinary\x0aexecution.\x20The\x20<code>go\x20mod\x20download</code>\x20command\x20is\x20useful\x20mainly\x20for\x20pre-filling\x20the\x0amodule\x20cache\x20or\x20for\x20loading\x20data\x20to\x20be\x20served\x20by\x20a\x20<a\x20href=\"#glos-module-proxy\">module\x0aproxy</a>.</p>\x0a<p>By\x20default,\x20<code>download</code>\x20writes\x20nothing\x20to\x20standard\x20output.\x20It\x20prints\x20progress\x0amessages\x20and\x20errors\x20to\x20standard\x20error.</p>\x0a<p>The\x20<code>-json</code>\x20flag\x20causes\x20<code>download</code>\x20to\x20print\x20a\x20sequence\x20of\x20JSON\x20objects\x20to\x0astandard\x20output,\x20describing\x20each\x20downloaded\x20module\x20(or\x20failure),\x20corresponding\x0ato\x20this\x20Go\x20struct:</p>\x0a<pre><code>type\x20Module\x20struct\x20{\x0a\x20\x20\x20\x20Path\x20\x20\x20\x20\x20string\x20//\x20module\x20path\x0a\x20\x20\x20\x20Version\x20\x20string\x20//\x20module\x20version\x0a\x20\x20\x20\x20Error\x20\x20\x20\x20string\x20//\x20error\x20loading\x20module\x0a\x20\x20\x20\x20Info\x20\x20\x20\x20\x20string\x20//\x20absolute\x20path\x20to\x20cached\x20.info\x20file\x0a\x20\x20\x20\x20GoMod\x20\x20\x20\x20string\x20//\x20absolute\x20path\x20to\x20cached\x20.mod\x20file\x0a\x20\x20\x20\x20Zip\x20\x20\x20\x20\x20\x20string\x20//\x20absolute\x20path\x20to\x20cached\x20.zip\x20file\x0a\x20\x20\x20\x20Dir\x20\x20\x20\x20\x20\x20string\x20//\x20absolute\x20path\x20to\x20cached\x20source\x20root\x20directory\x0a\x20\x20\x20\x20Sum\x20\x20\x20\x20\x20\x20string\x20//\x20checksum\x20for\x20path,\x20version\x20(as\x20in\x20go.sum)\x0a\x20\x20\x20\x20GoModSum\x20string\x20//\x20checksum\x20for\x20go.mod\x20(as\x20in\x20go.sum)\x0a}\x0a</code></pre>\x0a<p>The\x20<code>-x</code>\x20flag\x20causes\x20<code>download</code>\x20to\x20print\x20the\x20commands\x20<code>download</code>\x20executes\x0ato\x20standard\x20error.</p>\x0a<p><a\x20id=\"go-mod-edit\"></a></p>\x0a<h3><code>go\x20mod\x20edit</code></h3>\x0a<p><a\x20id=\"go-mod-init\"></a></p>\x0a<h3><code>go\x20mod\x20init</code></h3>\x0a<p>Usage:</p>\x0a<pre><code>go\x20mod\x20init\x20[module-path]\x0a</code></pre>\x0a<p>Example:</p>\x0a<pre><code>go\x20mod\x20init\x0ago\x20mod\x20init\x20example.com/m\x0a</code></pre>\x0a<p>The\x20<code>go\x20mod\x20init</code>\x20command\x20initializes\x20and\x20writes\x20a\x20new\x20<code>go.mod</code>\x20file\x20in\x20the\x0acurrent\x20directory,\x20in\x20effect\x20creating\x20a\x20new\x20module\x20rooted\x20at\x20the\x20current\x0adirectory.\x20The\x20<code>go.mod</code>\x20file\x20must\x20not\x20already\x20exist.</p>\x0a<p><code>init</code>\x20accepts\x20one\x20optional\x20argument,\x20the\x20<a\x20href=\"#glos-module-path\">module\x20path</a>\x20for\x0athe\x20new\x20module.\x20See\x20<a\x20href=\"#module-path\">Module\x20paths</a>\x20for\x20instructions\x20on\x20choosing\x0aa\x20module\x20path.\x20If\x20the\x20module\x20path\x20argument\x20is\x20omitted,\x20<code>init</code>\x20will\x20attempt\x0ato\x20infer\x20the\x20module\x20path\x20using\x20import\x20comments\x20in\x20<code>.go</code>\x20files,\x20vendoring\x20tool\x0aconfiguration\x20files,\x20and\x20the\x20current\x20directory\x20(if\x20in\x20<code>GOPATH</code>).</p>\x0a<p>If\x20a\x20configuration\x20file\x20for\x20a\x20vendoring\x20tool\x20is\x20present,\x20<code>init</code>\x20will\x20attempt\x20to\x0aimport\x20module\x20requirements\x20from\x20it.\x20<code>init</code>\x20supports\x20the\x20following\x20configuration\x0afiles.</p>\x0a<ul>\x0a<li><code>GLOCKFILE</code>\x20(Glock)</li>\x0a<li><code>Godeps/Godeps.json</code>\x20(Godeps)</li>\x0a<li><code>Gopkg.lock</code>\x20(dep)</li>\x0a<li><code>dependencies.tsv</code>\x20(godeps)</li>\x0a<li><code>glide.lock</code>\x20(glide)</li>\x0a<li><code>vendor.conf</code>\x20(trash)</li>\x0a<li><code>vendor.yml</code>\x20(govend)</li>\x0a<li><code>vendor/manifest</code>\x20(gvt)</li>\x0a<li><code>vendor/vendor.json</code>\x20(govendor)</li>\x0a</ul>\x0a<p>Vendoring\x20tool\x20configuration\x20files\x20can't\x20always\x20be\x20translated\x20with\x20perfect\x0afidelity.\x20For\x20example,\x20if\x20multiple\x20packages\x20within\x20the\x20same\x20repository\x20are\x0aimported\x20at\x20different\x20versions,\x20and\x20the\x20repository\x20only\x20contains\x20one\x20module,\x20the\x0aimported\x20<code>go.mod</code>\x20can\x20only\x20require\x20the\x20module\x20at\x20one\x20version.\x20You\x20may\x20wish\x20to\x0arun\x20<a\x20href=\"#go-list-m\"><code>go\x20list\x20-m\x20all</code></a>\x20to\x20check\x20all\x20versions\x20in\x20the\x20<a\x20href=\"#glos-build-list\">build\x0alist</a>,\x20and\x20<a\x20href=\"#go-mod-tidy\"><code>go\x20mod\x20tidy</code></a>\x20to\x20add\x20missing\x0arequirements\x20and\x20to\x20drop\x20unused\x20requirements.</p>\x0a<p><a\x20id=\"go-mod-tidy\"></a></p>\x0a<h3><code>go\x20mod\x20tidy</code></h3>\x0a<p><a\x20id=\"go-mod-vendor\"></a></p>\x0a<h3><code>go\x20mod\x20vendor</code></h3>\x0a<p>Usage:</p>\x0a<pre><code>go\x20mod\x20vendor\x20[-v]\x0a</code></pre>\x0a<p>The\x20<code>go\x20mod\x20vendor</code>\x20command\x20constructs\x20a\x20directory\x20named\x20<code>vendor</code>\x20in\x20the\x20<a\x20href=\"#glos-main-module\">main\x0amodule's</a>\x20root\x20directory\x20that\x20contains\x20copies\x20of\x20all\x20packages\x0aneeded\x20to\x20support\x20builds\x20and\x20tests\x20of\x20packages\x20in\x20the\x20main\x20module.\x20Packages\x0athat\x20are\x20only\x20imported\x20by\x20tests\x20of\x20packages\x20outside\x20the\x20main\x20module\x20are\x20not\x0aincluded.\x20As\x20with\x20<a\x20href=\"#go-mod-tidy\"><code>go\x20mod\x20tidy</code></a>\x20and\x20other\x20module\x20commands,\x0a<a\x20href=\"#glos-build-constraint\">build\x20constraints</a>\x20except\x20for\x20<code>ignore</code>\x20are\x20not\x0aconsidered\x20when\x20constructing\x20the\x20<code>vendor</code>\x20directory.</p>\x0a<p>When\x20vendoring\x20is\x20enabled,\x20the\x20<code>go</code>\x20command\x20will\x20load\x20packages\x20from\x20the\x20<code>vendor</code>\x0adirectory\x20instead\x20of\x20downloading\x20modules\x20from\x20their\x20sources\x20into\x20the\x20module\x0acache\x20and\x20using\x20packages\x20those\x20downloaded\x20copies.\x20See\x20<a\x20href=\"#vendoring\">Vendoring</a>\x0afor\x20more\x20information.</p>\x0a<p><code>go\x20mod\x20vendor</code>\x20also\x20creates\x20the\x20file\x20<code>vendor/modules.txt</code>\x20that\x20contains\x20a\x20list\x0aof\x20vendored\x20packages\x20and\x20the\x20module\x20versions\x20they\x20were\x20copied\x20from.\x20When\x0avendoring\x20is\x20enabled,\x20this\x20manifest\x20is\x20used\x20as\x20a\x20source\x20of\x20module\x20version\x0ainformation,\x20as\x20reported\x20by\x20<a\x20href=\"#go-list-m\"><code>go\x20list\x20-m</code></a>\x20and\x20<a\x20href=\"#go-version-m\"><code>go\x20version\x20-m</code></a>.\x20When\x20the\x20<code>go</code>\x20command\x20reads\x20<code>vendor/modules.txt</code>,\x20it\x20checks\x0athat\x20the\x20module\x20versions\x20are\x20consistent\x20with\x20<code>go.mod</code>.\x20If\x20<code>go.mod</code>\x20changed\x20since\x0a<code>vendor/modules.txt</code>\x20was\x20generated,\x20<code>go\x20mod\x20vendor</code>\x20should\x20be\x20run\x20again.</p>\x0a<p>Note\x20that\x20<code>go\x20mod\x20vendor</code>\x20removes\x20the\x20<code>vendor</code>\x20directory\x20if\x20it\x20exists\x20before\x0are-constructing\x20it.\x20Local\x20changes\x20should\x20not\x20be\x20made\x20to\x20vendored\x20packages.\x0aThe\x20<code>go</code>\x20command\x20does\x20not\x20check\x20that\x20packages\x20in\x20the\x20<code>vendor</code>\x20directory\x20have\x0anot\x20been\x20modified,\x20but\x20one\x20can\x20verify\x20the\x20integrity\x20of\x20the\x20<code>vendor</code>\x20directory\x0aby\x20running\x20<code>go\x20mod\x20vendor</code>\x20and\x20checking\x20that\x20no\x20changes\x20were\x20made.</p>\x0a<p>The\x20<code>-v</code>\x20flag\x20causes\x20<code>go\x20mod\x20vendor</code>\x20to\x20print\x20the\x20names\x20of\x20vendored\x20modules\x0aand\x20packages\x20to\x20standard\x20error.</p>\x0a<p><a\x20id=\"go-mod-verify\"></a></p>\x0a<h3><code>go\x20mod\x20verify</code></h3>\x0a<p><a\x20id=\"go-version-m\"></a></p>\x0a<h3><code>go\x20version\x20-m</code></h3>\x0a<p><a\x20id=\"go-clean-modcache\"></a></p>\x0a<h3><code>go\x20clean\x20-modcache</code></h3>\x0a<p><a\x20id=\"version-queries\"></a></p>\x0a<h3>Version\x20queries</h3>\x0a<p>Several\x20commands\x20allow\x20you\x20to\x20specify\x20a\x20version\x20of\x20a\x20module\x20using\x20a\x20<em>version\x0aquery</em>,\x20which\x20appears\x20after\x20an\x20<code>@</code>\x20character\x20following\x20a\x20module\x20or\x20package\x20path\x0aon\x20the\x20command\x20line.</p>\x0a<p>Examples:</p>\x0a<pre><code>go\x20get\x20example.com/m@latest\x0ago\x20mod\x20download\x20example.com/m@master\x0ago\x20list\x20-m\x20-json\x20example.com/m@e3702bed2\x0a</code></pre>\x0a<p>A\x20version\x20query\x20may\x20be\x20one\x20of\x20the\x20following:</p>\x0a<ul>\x0a<li>A\x20fully-specified\x20semantic\x20version,\x20such\x20as\x20<code>v1.2.3</code>,\x20which\x20selects\x20a\x0aspecific\x20version.\x20See\x20<a\x20href=\"#versions\">Versions</a>\x20for\x20syntax.</li>\x0a<li>A\x20semantic\x20version\x20prefix,\x20such\x20as\x20<code>v1</code>\x20or\x20<code>v1.2</code>,\x20which\x20selects\x20the\x20highest\x0aavailable\x20version\x20with\x20that\x20prefix.</li>\x0a<li>A\x20semantic\x20version\x20comparison,\x20such\x20as\x20<code>&lt;v1.2.3</code>\x20or\x20<code>&gt;=v1.5.6</code>,\x20which\x20selects\x0athe\x20nearest\x20available\x20version\x20to\x20the\x20comparison\x20target\x20(the\x20lowest\x20version\x0afor\x20<code>&gt;</code>\x20and\x20<code>&gt;=</code>,\x20and\x20the\x20highest\x20version\x20for\x20<code>&lt;</code>\x20and\x20<code>&lt;=</code>).</li>\x0a<li>A\x20revision\x20identifier\x20for\x20the\x20underlying\x20source\x20repository,\x20such\x20as\x20a\x20commit\x0ahash\x20prefix,\x20revision\x20tag,\x20or\x20branch\x20name.\x20If\x20the\x20revision\x20is\x20tagged\x20with\x20a\x0asemantic\x20version,\x20this\x20query\x20selects\x20that\x20version.\x20Otherwise,\x20this\x20query\x0aselects\x20a\x20<a\x20href=\"#glos-pseudo-version\">pseudo-version</a>\x20for\x20the\x20underlying\x0acommit.\x20Note\x20that\x20branches\x20and\x20tags\x20with\x20names\x20matched\x20by\x20other\x20version\x0aqueries\x20cannot\x20be\x20selected\x20this\x20way.\x20For\x20example,\x20the\x20query\x20<code>v2</code>\x20selects\x20the\x0alatest\x20version\x20starting\x20with\x20<code>v2</code>,\x20not\x20the\x20branch\x20named\x20<code>v2</code>.</li>\x0a<li>The\x20string\x20<code>latest</code>,\x20which\x20selects\x20the\x20highest\x20available\x20release\x20version.\x20If\x0athere\x20are\x20no\x20release\x20versions,\x20<code>latest</code>\x20selects\x20the\x20highest\x20pre-release\x0aversion.\x20\x20If\x20there\x20no\x20tagged\x20versions,\x20<code>latest</code>\x20selects\x20a\x20pseudo-version\x20for\x0athe\x20commit\x20at\x20the\x20tip\x20of\x20the\x20repository's\x20default\x20branch.</li>\x0a<li>The\x20string\x20<code>upgrade</code>,\x20which\x20is\x20like\x20<code>latest</code>\x20except\x20that\x20if\x20the\x20module\x20is\x0acurrently\x20required\x20at\x20a\x20higher\x20version\x20than\x20the\x20version\x20<code>latest</code>\x20would\x20select\x0a(for\x20example,\x20a\x20pre-release),\x20<code>upgrade</code>\x20will\x20select\x20the\x20current\x20version.</li>\x0a<li>The\x20string\x20<code>patch</code>,\x20which\x20selects\x20the\x20latest\x20available\x20version\x20with\x20the\x20same\x0amajor\x20and\x20minor\x20version\x20numbers\x20as\x20the\x20currently\x20required\x20version.\x20If\x20no\x0aversion\x20is\x20currently\x20required,\x20<code>patch</code>\x20is\x20equivalent\x20to\x20<code>latest</code>.</li>\x0a</ul>\x0a<p>Except\x20for\x20queries\x20for\x20specific\x20named\x20versions\x20or\x20revisions,\x20all\x20queries\x0aconsider\x20available\x20versions\x20reported\x20by\x20<code>go\x20list\x20-m\x20-versions</code>\x20(see\x20<a\x20href=\"#go-list-m\"><code>go\x20list\x20-m</code></a>).\x20This\x20list\x20contains\x20only\x20tagged\x20versions,\x20not\x20pseudo-versions.\x0aModule\x20versions\x20disallowed\x20by\x20<a\x20href=\"#go.mod-exclude\">exclude</a>\x20directives\x20in\x0athe\x20main\x20module's\x20<a\x20href=\"#glos-go.mod-file\"><code>go.mod</code>\x20file</a>\x20are\x20not\x20considered.</p>\x0a<p><a\x20href=\"#glos-release-version\">Release\x20versions</a>\x20are\x20preferred\x20over\x20pre-release\x0aversions.\x20For\x20example,\x20if\x20versions\x20<code>v1.2.2</code>\x20and\x20<code>v1.2.3-pre</code>\x20are\x20available,\x20the\x0a<code>latest</code>\x20query\x20will\x20select\x20<code>v1.2.2</code>,\x20even\x20though\x20<code>v1.2.3-pre</code>\x20is\x20higher.\x20The\x0a<code>&lt;v1.2.4</code>\x20query\x20would\x20also\x20select\x20<code>v1.2.2</code>,\x20even\x20though\x20<code>v1.2.3-pre</code>\x20is\x20closer\x0ato\x20<code>v1.2.4</code>.\x20If\x20no\x20release\x20or\x20pre-release\x20version\x20is\x20available,\x20the\x20<code>latest</code>,\x0a<code>upgrade</code>,\x20and\x20<code>patch</code>\x20queries\x20will\x20select\x20a\x20pseudo-version\x20for\x20the\x20commit\x0aat\x20the\x20tip\x20of\x20the\x20repository's\x20default\x20branch.\x20Other\x20queries\x20will\x20report\x0aan\x20error.</p>\x0a<p><a\x20id=\"commands-outside\"></a></p>\x0a<h3>Module\x20commands\x20outside\x20a\x20module</h3>\x0a<p>Module-aware\x20Go\x20commands\x20normally\x20run\x20in\x20the\x20context\x20of\x20a\x20<a\x20href=\"#glos-main-module\">main\x0amodule</a>\x20defined\x20by\x20a\x20<code>go.mod</code>\x20file\x20in\x20the\x20working\x20directory\x0aor\x20a\x20parent\x20directory.\x20Some\x20commands\x20may\x20be\x20run\x20in\x20module-aware\x20mode\x20without\x20a\x0a<code>go.mod</code>\x20file\x20by\x20setting\x20the\x20<code>GO111MODULE</code>\x20environment\x20variable\x20to\x20<code>on</code>.\x0aMost\x20commands\x20work\x20differently\x20when\x20no\x20<code>go.mod</code>\x20file\x20is\x20present.</p>\x0a<p>See\x20<a\x20href=\"#mod-commands\">Module-aware\x20commands</a>\x20for\x20information\x20on\x20enabling\x20and\x0adisabling\x20module-aware\x20mode.</p>\x0a<table\x20class=\"ModTable\">\x0a\x20\x20<thead>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<th>Command</th>\x0a\x20\x20\x20\x20\x20\x20<th>Behavior</th>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20</thead>\x0a\x20\x20<tbody>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>go\x20build</code><br>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>go\x20doc</code><br>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>go\x20fix</code><br>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>go\x20fmt</code><br>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>go\x20generate</code><br>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>go\x20install</code><br>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>go\x20list</code><br>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>go\x20run</code><br>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>go\x20test</code><br>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>go\x20vet</code>\x0a\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20\x20\x20<td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20Only\x20packages\x20in\x20the\x20standard\x20library\x20and\x20packages\x20specified\x20as\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>.go</code>\x20files\x20on\x20the\x20command\x20line\x20can\x20be\x20loaded,\x20imported,\x20and\x0a\x20\x20\x20\x20\x20\x20\x20\x20built.\x20Packages\x20from\x20other\x20modules\x20cannot\x20be\x20built,\x20since\x20there\x20is\x20no\x0a\x20\x20\x20\x20\x20\x20\x20\x20place\x20to\x20record\x20module\x20requirements\x20and\x20ensure\x20deterministic\x20builds.\x0a\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<td><code>go\x20get</code></td>\x0a\x20\x20\x20\x20\x20\x20<td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20Packages\x20and\x20executables\x20may\x20be\x20built\x20and\x20installed\x20as\x20usual.\x20Note\x20that\x0a\x20\x20\x20\x20\x20\x20\x20\x20there\x20is\x20no\x20main\x20module\x20when\x20<code>go\x20get</code>\x20is\x20run\x20without\x20a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>go.mod</code>\x20file,\x20so\x20<code>replace</code>\x20and\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>exclude</code>\x20directives\x20are\x20not\x20applied.\x0a\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<td><code>go\x20list\x20-m</code></td>\x0a\x20\x20\x20\x20\x20\x20<td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20Explicit\x20<a\x20href=\"#version-queries\">version\x20queries</a>\x20are\x20required\x0a\x20\x20\x20\x20\x20\x20\x20\x20for\x20most\x20arguments,\x20except\x20when\x20the\x20<code>-versions</code>\x20flag\x20is\x20used.\x0a\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<td><code>go\x20mod\x20download</code></td>\x0a\x20\x20\x20\x20\x20\x20<td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20Explicit\x20<a\x20href=\"#version-queries\">version\x20queries</a>\x20are\x20required\x0a\x20\x20\x20\x20\x20\x20\x20\x20for\x20most\x20arguments.\x0a\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<td><code>go\x20mod\x20edit</code></td>\x0a\x20\x20\x20\x20\x20\x20<td>An\x20explicit\x20file\x20argument\x20is\x20required.</td>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>go\x20mod\x20graph</code><br>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>go\x20mod\x20tidy</code><br>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>go\x20mod\x20vendor</code><br>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>go\x20mod\x20verify</code><br>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>go\x20mod\x20why</code>\x0a\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20\x20\x20<td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20These\x20commands\x20require\x20a\x20<code>go.mod</code>\x20file\x20and\x20will\x20report\x0a\x20\x20\x20\x20\x20\x20\x20\x20an\x20error\x20if\x20one\x20is\x20not\x20present.\x0a\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20</tbody>\x0a</table>\x0a<p><a\x20id=\"retrieving-modules\"></a></p>\x0a<h2>Retrieving\x20modules</h2>\x0a<p><a\x20id=\"goproxy-protocol\"></a></p>\x0a<h3><code>GOPROXY</code>\x20protocol</h3>\x0a<p>A\x20<a\x20href=\"#glos-module-proxy\"><em>module\x20proxy</em></a>\x20is\x20an\x20HTTP\x20server\x20that\x20can\x20respond\x20to\x0a<code>GET</code>\x20requests\x20for\x20paths\x20specified\x20below.\x20The\x20requests\x20have\x20no\x20query\x20parameters,\x0aand\x20no\x20specific\x20headers\x20are\x20required,\x20so\x20even\x20a\x20site\x20serving\x20from\x20a\x20fixed\x20file\x0asystem\x20(including\x20a\x20<code>file://</code>\x20URL)\x20can\x20be\x20a\x20module\x20proxy.</p>\x0a<p>Successful\x20HTTP\x20responses\x20must\x20have\x20the\x20status\x20code\x20200\x20(OK).\x20Redirects\x20(3xx)\x0aare\x20followed.\x20Responses\x20with\x20status\x20codes\x204xx\x20and\x205xx\x20are\x20treated\x20as\x20errors.\x0aThe\x20error\x20codes\x20404\x20(Not\x20Found)\x20and\x20410\x20(Gone)\x20indicate\x20that\x20the\x0arequested\x20module\x20or\x20version\x20is\x20not\x20available\x20on\x20the\x20proxy,\x20but\x20it\x20may\x20be\x20found\x0aelsewhere.\x20Error\x20responses\x20should\x20have\x20content\x20type\x20<code>text/plain</code>\x20with\x0a<code>charset</code>\x20either\x20<code>utf-8</code>\x20or\x20<code>us-ascii</code>.</p>\x0a<p>The\x20<code>go</code>\x20command\x20may\x20be\x20configured\x20to\x20contact\x20proxies\x20or\x20source\x20control\x20servers\x0ausing\x20the\x20<code>GOPROXY</code>\x20environment\x20variable,\x20which\x20is\x20a\x20comma-separated\x20list\x20of\x0aURLs\x20or\x20the\x20keywords\x20<code>direct</code>\x20or\x20<code>off</code>\x20(see\x20<a\x20href=\"#environment-variables\">Environment\x0avariables</a>\x20for\x20details).\x20When\x20the\x20<code>go</code>\x20command\x20receives\x0aa\x20404\x20or\x20410\x20response\x20from\x20a\x20proxy,\x20it\x20falls\x20back\x20to\x20later\x20proxies\x20in\x20the\x0alist.\x20The\x20<code>go</code>\x20command\x20does\x20not\x20fall\x20back\x20to\x20later\x20proxies\x20in\x20response\x20to\x20other\x0a4xx\x20and\x205xx\x20errors.\x20This\x20allows\x20a\x20proxy\x20to\x20act\x20as\x20a\x20gatekeeper,\x20for\x20example,\x20by\x0aresponding\x20with\x20error\x20403\x20(Forbidden)\x20for\x20modules\x20not\x20on\x20an\x20approved\x20list.</p>\x0a<!--\x20TODO(katiehockman):\x20why\x20only\x20fall\x20back\x20for\x20410/404?\x20Either\x20add\x20the\x20details\x0ahere,\x20or\x20write\x20a\x20blog\x20post\x20about\x20how\x20to\x20build\x20multiple\x20types\x20of\x20proxies.\x20e.g.\x0aa\x20\"privacy\x20preserving\x20one\"\x20and\x20an\x20\"authorization\x20one\"\x20-->\x0a<p>The\x20table\x20below\x20specifies\x20queries\x20that\x20a\x20module\x20proxy\x20must\x20respond\x20to.\x20For\x20each\x0apath,\x20<code>$base</code>\x20is\x20the\x20path\x20portion\x20of\x20a\x20proxy\x20URL,<code>$module</code>\x20is\x20a\x20module\x20path,\x20and\x0a<code>$version</code>\x20is\x20a\x20version.\x20For\x20example,\x20if\x20the\x20proxy\x20URL\x20is\x0a<code>https://example.com/mod</code>,\x20and\x20the\x20client\x20is\x20requesting\x20the\x20<code>go.mod</code>\x20file\x20for\x0athe\x20module\x20<code>golang.org/x/text</code>\x20at\x20version\x20<code>v0.3.2</code>,\x20the\x20client\x20would\x20send\x20a\x0a<code>GET</code>\x20request\x20for\x20<code>https://example.com/mod/golang.org/x/text/@v/v0.3.2.mod</code>.</p>\x0a<p>To\x20avoid\x20ambiguity\x20when\x20serving\x20from\x20case-insensitive\x20file\x20systems,\x0athe\x20<code>$module</code>\x20and\x20<code>$version</code>\x20elements\x20are\x20case-encoded\x20by\x20replacing\x20every\x0auppercase\x20letter\x20with\x20an\x20exclamation\x20mark\x20followed\x20by\x20the\x20corresponding\x0alower-case\x20letter.\x20This\x20allows\x20modules\x20<code>example.com/M</code>\x20and\x20<code>example.com/m</code>\x20to\x0aboth\x20be\x20stored\x20on\x20disk,\x20since\x20the\x20former\x20is\x20encoded\x20as\x20<code>example.com/!m</code>.</p>\x0a<!--\x20TODO(jayconrod):\x20This\x20table\x20has\x20multi-line\x20cells,\x20and\x20GitHub\x20Flavored\x0aMarkdown\x20doesn't\x20have\x20syntax\x20for\x20that,\x20so\x20we\x20use\x20raw\x20HTML.\x20Gitiles\x20doesn't\x0ainclude\x20this\x20table\x20in\x20the\x20rendered\x20HTML.\x20Once\x20x/website\x20has\x20a\x20Markdown\x20renderer,\x0aensure\x20this\x20table\x20is\x20readable.\x20If\x20the\x20cells\x20are\x20too\x20large,\x20and\x20it's\x20difficult\x0ato\x20scan,\x20use\x20paragraphs\x20or\x20sections\x20below.\x0a-->\x0a<table\x20class=\"ModTable\">\x0a\x20\x20<thead>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<th>Path</th>\x0a\x20\x20\x20\x20\x20\x20<th>Description</th>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20</thead>\x0a\x20\x20<tbody>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<td><code>$base/$module/@v/list</code></td>\x0a\x20\x20\x20\x20\x20\x20<td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20Returns\x20a\x20list\x20of\x20known\x20versions\x20of\x20the\x20given\x20module\x20in\x20plain\x20text,\x20one\x0a\x20\x20\x20\x20\x20\x20\x20\x20per\x20line.\x20This\x20list\x20should\x20not\x20include\x20pseudo-versions.\x0a\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<td><code>$base/$module/@v/$version.info</code></td>\x0a\x20\x20\x20\x20\x20\x20<td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Returns\x20JSON-formatted\x20metadata\x20about\x20a\x20specific\x20version\x20of\x20a\x20module.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20The\x20response\x20must\x20be\x20a\x20JSON\x20object\x20that\x20corresponds\x20to\x20the\x20Go\x20data\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20structure\x20below:\x0a\x20\x20\x20\x20\x20\x20\x20\x20</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<pre>\x0atype\x20Info\x20struct\x20{\x0a\x20\x20\x20\x20Version\x20string\x20\x20\x20\x20//\x20version\x20string\x0a\x20\x20\x20\x20Time\x20\x20\x20\x20time.Time\x20//\x20commit\x20time\x0a}\x0a</pre>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20The\x20<code>Version</code>\x20field\x20is\x20required\x20and\x20must\x20contain\x20a\x20valid,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<a\x20href=\"#glos-canonical-version\">canonical\x20version</a>\x20(see\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<a\x20href=\"#versions\">Versions</a>).\x20The\x20<code>$version</code>\x20in\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20request\x20path\x20does\x20not\x20need\x20to\x20be\x20the\x20same\x20version\x20or\x20even\x20a\x20valid\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20version;\x20this\x20endpoint\x20may\x20be\x20used\x20to\x20find\x20versions\x20for\x20branch\x20names\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20or\x20revision\x20identifiers.\x20However,\x20if\x20<code>$version</code>\x20is\x20a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20canonical\x20version\x20with\x20a\x20major\x20version\x20compatible\x20with\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<code>$module</code>,\x20the\x20<code>Version</code>\x20field\x20in\x20a\x20successful\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20response\x20must\x20be\x20the\x20same.\x0a\x20\x20\x20\x20\x20\x20\x20\x20</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20The\x20<code>Time</code>\x20field\x20is\x20optional.\x20If\x20present,\x20it\x20must\x20be\x20a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20string\x20in\x20RFC\x203339\x20format.\x20It\x20indicates\x20the\x20time\x20when\x20the\x20version\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20was\x20created.\x0a\x20\x20\x20\x20\x20\x20\x20\x20</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20More\x20fields\x20may\x20be\x20added\x20in\x20the\x20future,\x20so\x20other\x20names\x20are\x20reserved.\x0a\x20\x20\x20\x20\x20\x20\x20\x20</p>\x0a\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<td><code>$base/$module/@v/$version.mod</code></td>\x0a\x20\x20\x20\x20\x20\x20<td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20Returns\x20the\x20<code>go.mod</code>\x20file\x20for\x20a\x20specific\x20version\x20of\x20a\x0a\x20\x20\x20\x20\x20\x20\x20\x20module.\x20If\x20the\x20module\x20does\x20not\x20have\x20a\x20<code>go.mod</code>\x20file\x20at\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20requested\x20version,\x20a\x20file\x20containing\x20only\x20a\x20<code>module</code>\x0a\x20\x20\x20\x20\x20\x20\x20\x20statement\x20with\x20the\x20requested\x20module\x20path\x20must\x20be\x20returned.\x20Otherwise,\x0a\x20\x20\x20\x20\x20\x20\x20\x20the\x20original,\x20unmodified\x20<code>go.mod</code>\x20file\x20must\x20be\x20returned.\x0a\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<td><code>$base/$module/@v/$version.zip</code></td>\x0a\x20\x20\x20\x20\x20\x20<td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20Returns\x20a\x20zip\x20file\x20containing\x20the\x20contents\x20of\x20a\x20specific\x20version\x20of\x0a\x20\x20\x20\x20\x20\x20\x20\x20a\x20module.\x20See\x20<a\x20href=\"#zip-format\">Module\x20zip\x20format</a>\x20for\x20details\x0a\x20\x20\x20\x20\x20\x20\x20\x20on\x20how\x20this\x20zip\x20file\x20must\x20be\x20formatted.\x0a\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<td><code>$base/$module/@latest</code></td>\x0a\x20\x20\x20\x20\x20\x20<td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20Returns\x20JSON-formatted\x20metadata\x20about\x20the\x20latest\x20known\x20version\x20of\x20a\x0a\x20\x20\x20\x20\x20\x20\x20\x20module\x20in\x20the\x20same\x20format\x20as\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>$base/$module/@v/$version.info</code>.\x20The\x20latest\x20version\x20should\x0a\x20\x20\x20\x20\x20\x20\x20\x20be\x20the\x20version\x20of\x20the\x20module\x20that\x20the\x20<code>go</code>\x20command\x20should\x20use\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20<code>$base/$module/@v/list</code>\x20is\x20empty\x20or\x20no\x20listed\x20version\x20is\x0a\x20\x20\x20\x20\x20\x20\x20\x20suitable.\x20This\x20endpoint\x20is\x20optional,\x20and\x20module\x20proxies\x20are\x20not\x20required\x0a\x20\x20\x20\x20\x20\x20\x20\x20to\x20implement\x20it.\x0a\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20</tbody>\x0a</table>\x0a<p>When\x20resolving\x20the\x20latest\x20version\x20of\x20a\x20module,\x20the\x20<code>go</code>\x20command\x20will\x20request\x0a<code>$base/$module/@v/list</code>,\x20then,\x20if\x20no\x20suitable\x20versions\x20are\x20found,\x0a<code>$base/$module/@latest</code>.\x20The\x20<code>go</code>\x20command\x20prefers,\x20in\x20order:\x20the\x20semantically\x0ahighest\x20release\x20version,\x20the\x20semantically\x20highest\x20pre-release\x20version,\x20and\x20the\x0achronologically\x20most\x20recent\x20pseudo-version.\x20In\x20Go\x201.12\x20and\x20earlier,\x20the\x20<code>go</code>\x0acommand\x20considered\x20pseudo-versions\x20in\x20<code>$base/$module/@v/list</code>\x20to\x20be\x20pre-release\x0aversions,\x20but\x20this\x20is\x20no\x20longer\x20true\x20since\x20Go\x201.13.</p>\x0a<p>A\x20module\x20proxy\x20must\x20always\x20serve\x20the\x20same\x20content\x20for\x20successful\x0aresponses\x20for\x20<code>$base/$module/$version.mod</code>\x20and\x20<code>$base/$module/$version.zip</code>\x0aqueries.\x20This\x20content\x20is\x20<a\x20href=\"#authenticating\">cryptographically\x20authenticated</a>\x0ausing\x20<a\x20href=\"#go.sum-file-format\"><code>go.sum</code>\x20files</a>\x20and,\x20by\x20default,\x20the\x0a<a\x20href=\"#checksum-database\">checksum\x20database</a>.</p>\x0a<p>The\x20<code>go</code>\x20command\x20caches\x20most\x20content\x20it\x20downloads\x20from\x20module\x20proxies\x20in\x20its\x0amodule\x20cache\x20in\x20<code>$GOPATH/pkg/mod/cache/download</code>.\x20Even\x20when\x20downloading\x20directly\x0afrom\x20version\x20control\x20systems,\x20the\x20<code>go</code>\x20command\x20synthesizes\x20explicit\x20<code>info</code>,\x0a<code>mod</code>,\x20and\x20<code>zip</code>\x20files\x20and\x20stores\x20them\x20in\x20this\x20directory,\x20the\x20same\x20as\x20if\x20it\x20had\x0adownloaded\x20them\x20directly\x20from\x20a\x20proxy.\x20The\x20cache\x20layout\x20is\x20the\x20same\x20as\x20the\x20proxy\x0aURL\x20space,\x20so\x20serving\x20<code>$GOPATH/pkg/mod/cache/download</code>\x20at\x20(or\x20copying\x20it\x20to)\x0a<code>https://example.com/proxy</code>\x20would\x20let\x20users\x20access\x20cached\x20module\x20versions\x20by\x0asetting\x20<code>GOPROXY</code>\x20to\x20<code>https://example.com/proxy</code>.</p>\x0a<p><a\x20id=\"communicating-with-proxies\"></a></p>\x0a<h3>Communicating\x20with\x20proxies</h3>\x0a<p>The\x20<code>go</code>\x20command\x20may\x20download\x20module\x20source\x20code\x20and\x20metadata\x20from\x20a\x20<a\x20href=\"#glos-module-proxy\">module\x0aproxy</a>.\x20The\x20<code>GOPROXY</code>\x20<a\x20href=\"#environment-variables\">environment\x0avariable</a>\x20may\x20be\x20used\x20to\x20configure\x20which\x20proxies\x20the\x0a<code>go</code>\x20command\x20may\x20connect\x20to\x20and\x20whether\x20it\x20may\x20communicate\x20directly\x20with\x0a<a\x20href=\"#communicating-with-vcs\">version\x20control\x20systems</a>.\x20Downloaded\x20module\x20data\x20is\x0asaved\x20in\x20the\x20<a\x20href=\"#glos-module-cache\">module\x20cache</a>.\x20The\x20<code>go</code>\x20command\x20will\x20only\x0acontact\x20a\x20proxy\x20when\x20it\x20needs\x20information\x20not\x20already\x20in\x20the\x20cache.</p>\x0a<p>The\x20<a\x20href=\"#goproxy-protocol\"><code>GOPROXY</code>\x20protocol</a>\x20section\x20describes\x20requests\x20that\x0amay\x20be\x20sent\x20to\x20a\x20<code>GOPROXY</code>\x20server.\x20However,\x20it's\x20also\x20helpful\x20to\x20understand\x0awhen\x20the\x20<code>go</code>\x20command\x20makes\x20these\x20requests.\x20For\x20example,\x20<code>go\x20build</code>\x20follows\x0athe\x20procedure\x20below:</p>\x0a<ul>\x0a<li>Compute\x20the\x20<a\x20href=\"#glos-build-list\">build\x20list</a>\x20by\x20reading\x20<a\x20href=\"#glos-go.mod-file\"><code>go.mod</code>\x0afiles</a>\x20and\x20performing\x20<a\x20href=\"#glos-minimal-version-selection\">minimal\x20version\x20selection\x0a(MVS)</a>.</li>\x0a<li>Read\x20the\x20packages\x20named\x20on\x20the\x20command\x20line\x20and\x20the\x20packages\x20they\x20import.</li>\x0a<li>If\x20a\x20package\x20is\x20not\x20provided\x20by\x20any\x20module\x20in\x20the\x20build\x20list,\x20find\x20a\x20module\x0athat\x20provides\x20it.\x20Add\x20a\x20module\x20requirement\x20on\x20its\x20latest\x20version\x20to\x20<code>go.mod</code>,\x0aand\x20start\x20over.</li>\x0a<li>Build\x20packages\x20after\x20everything\x20is\x20loaded.</li>\x0a</ul>\x0a<p>When\x20the\x20<code>go</code>\x20command\x20computes\x20the\x20build\x20list,\x20it\x20loads\x20the\x20<code>go.mod</code>\x20file\x20for\x0aeach\x20module\x20in\x20the\x20<a\x20href=\"#glos-module-graph\">module\x20graph</a>.\x20If\x20a\x20<code>go.mod</code>\x20file\x20is\x20not\x0ain\x20the\x20cache,\x20the\x20<code>go</code>\x20command\x20will\x20download\x20it\x20from\x20the\x20proxy\x20using\x20a\x0a<code>$module/@v/$version.mod</code>\x20request\x20(where\x20<code>$module</code>\x20is\x20the\x20module\x20path\x20and\x0a<code>$version</code>\x20is\x20the\x20version).\x20These\x20requests\x20can\x20be\x20tested\x20with\x20a\x20tool\x20like\x0a<code>curl</code>.\x20For\x20example,\x20the\x20command\x20below\x20downloads\x20the\x20<code>go.mod</code>\x20file\x20for\x0a<code>golang.org/x/mod</code>\x20at\x20version\x20<code>v0.2.0</code>:</p>\x0a<pre><code>$\x20curl\x20https://proxy.golang.org/golang.org/x/mod/@v/v0.2.0.mod\x0amodule\x20golang.org/x/mod\x0a\x0ago\x201.12\x0a\x0arequire\x20(\x0a\x09golang.org/x/crypto\x20v0.0.0-20191011191535-87dc89f01550\x0a\x09golang.org/x/tools\x20v0.0.0-20191119224855-298f0cb1881e\x0a\x09golang.org/x/xerrors\x20v0.0.0-20191011141410-1b5146add898\x0a)\x0a</code></pre>\x0a<p>In\x20order\x20to\x20load\x20a\x20package,\x20the\x20<code>go</code>\x20command\x20needs\x20the\x20source\x20code\x20for\x20the\x0amodule\x20that\x20provides\x20it.\x20Module\x20source\x20code\x20is\x20distributed\x20in\x20<code>.zip</code>\x20files\x20which\x0aare\x20extracted\x20into\x20the\x20module\x20cache.\x20If\x20a\x20module\x20<code>.zip</code>\x20is\x20not\x20in\x20the\x20cache,\x0athe\x20<code>go</code>\x20command\x20will\x20download\x20it\x20using\x20a\x20<code>$module/@v/$version.zip</code>\x20request.</p>\x0a<pre><code>$\x20curl\x20-O\x20https://proxy.golang.org/golang.org/x/mod/@v/v0.2.0.zip\x0a$\x20unzip\x20-l\x20v0.2.0.zip\x20|\x20head\x0aArchive:\x20\x20v0.2.0.zip\x0a\x20\x20Length\x20\x20\x20\x20\x20\x20Date\x20\x20\x20\x20Time\x20\x20\x20\x20Name\x0a---------\x20\x20----------\x20-----\x20\x20\x20----\x0a\x20\x20\x20\x20\x201479\x20\x2000-00-1980\x2000:00\x20\x20\x20golang.org/x/mod@v0.2.0/LICENSE\x0a\x20\x20\x20\x20\x201303\x20\x2000-00-1980\x2000:00\x20\x20\x20golang.org/x/mod@v0.2.0/PATENTS\x0a\x20\x20\x20\x20\x20\x20559\x20\x2000-00-1980\x2000:00\x20\x20\x20golang.org/x/mod@v0.2.0/README\x0a\x20\x20\x20\x20\x20\x20\x2021\x20\x2000-00-1980\x2000:00\x20\x20\x20golang.org/x/mod@v0.2.0/codereview.cfg\x0a\x20\x20\x20\x20\x20\x20214\x20\x2000-00-1980\x2000:00\x20\x20\x20golang.org/x/mod@v0.2.0/go.mod\x0a\x20\x20\x20\x20\x201476\x20\x2000-00-1980\x2000:00\x20\x20\x20golang.org/x/mod@v0.2.0/go.sum\x0a\x20\x20\x20\x20\x205224\x20\x2000-00-1980\x2000:00\x20\x20\x20golang.org/x/mod@v0.2.0/gosumcheck/main.go\x0a</code></pre>\x0a<p>Note\x20that\x20<code>.mod</code>\x20and\x20<code>.zip</code>\x20requests\x20are\x20separate,\x20even\x20though\x20<code>go.mod</code>\x20files\x0aare\x20usually\x20contained\x20within\x20<code>.zip</code>\x20files.\x20The\x20<code>go</code>\x20command\x20may\x20need\x20to\x20download\x0a<code>go.mod</code>\x20files\x20for\x20many\x20different\x20modules,\x20and\x20<code>.mod</code>\x20files\x20are\x20much\x20smaller\x0athan\x20<code>.zip</code>\x20files.\x20Additionally,\x20if\x20a\x20Go\x20project\x20does\x20not\x20have\x20a\x20<code>go.mod</code>\x20file,\x0athe\x20proxy\x20will\x20serve\x20a\x20synthetic\x20<code>go.mod</code>\x20file\x20that\x20only\x20contains\x20a\x20<a\x20href=\"#go.mod-module\"><code>module</code>\x0adirective</a>.\x20Synthetic\x20<code>go.mod</code>\x20files\x20are\x20generated\x20by\x20the\x20<code>go</code>\x0acommand\x20when\x20downloading\x20from\x20a\x20<a\x20href=\"#communicating-with-vcs\">version\x20control\x0asystem</a>.</p>\x0a<p>If\x20the\x20<code>go</code>\x20command\x20needs\x20to\x20load\x20a\x20package\x20not\x20provided\x20by\x20any\x20module\x20in\x20the\x0abuild\x20list,\x20it\x20will\x20attempt\x20to\x20find\x20a\x20new\x20module\x20that\x20provides\x20it.\x20The\x20section\x0a<a\x20href=\"#resolve-pkg-mod\">Resolving\x20a\x20package\x20to\x20a\x20module</a>\x20describes\x20this\x20process.\x20In\x0asummary,\x20the\x20<code>go</code>\x20command\x20requests\x20information\x20about\x20the\x20latest\x20version\x20of\x20each\x0amodule\x20path\x20that\x20could\x20possibly\x20contain\x20the\x20package.\x20For\x20example,\x20for\x20the\x0apackage\x20<code>golang.org/x/net/html</code>,\x20the\x20<code>go</code>\x20command\x20would\x20try\x20to\x20find\x20the\x20latest\x0aversions\x20of\x20the\x20modules\x20<code>golang.org/x/net/html</code>,\x20<code>golang.org/x/net</code>,\x0a<code>golang.org/x/</code>,\x20and\x20<code>golang.org</code>.\x20Only\x20<code>golang.org/x/net</code>\x20actually\x20exists\x20and\x0aprovides\x20that\x20package,\x20so\x20the\x20<code>go</code>\x20command\x20uses\x20the\x20latest\x20version\x20of\x20that\x0amodule.\x20If\x20more\x20than\x20one\x20module\x20provides\x20the\x20package,\x20the\x20<code>go</code>\x20command\x20will\x20use\x0athe\x20module\x20with\x20the\x20longest\x20path.</p>\x0a<p>When\x20the\x20<code>go</code>\x20command\x20requests\x20the\x20latest\x20version\x20of\x20a\x20module,\x20it\x20first\x20sends\x20a\x0arequest\x20for\x20<code>$module/@v/list</code>.\x20If\x20the\x20list\x20is\x20empty\x20or\x20none\x20of\x20the\x20returned\x0aversions\x20can\x20be\x20used,\x20it\x20sends\x20a\x20request\x20for\x20<code>$module/@latest</code>.\x20Once\x20a\x20version\x0ais\x20chosen,\x20the\x20<code>go</code>\x20command\x20sends\x20a\x20<code>$module/@v/$version.info</code>\x20request\x20for\x0ametadata.\x20It\x20may\x20then\x20send\x20<code>$module/@v/$version.mod</code>\x20and\x0a<code>$module/@v/$version.zip</code>\x20requests\x20to\x20load\x20the\x20<code>go.mod</code>\x20file\x20and\x20source\x20code.</p>\x0a<pre><code>$\x20curl\x20https://proxy.golang.org/golang.org/x/mod/@v/list\x0av0.1.0\x0av0.2.0\x0a\x0a$\x20curl\x20https://proxy.golang.org/golang.org/x/mod/@v/v0.2.0.info\x0a{&quot;Version&quot;:&quot;v0.2.0&quot;,&quot;Time&quot;:&quot;2020-01-02T17:33:45Z&quot;}\x0a</code></pre>\x0a<p>After\x20downloading\x20a\x20<code>.mod</code>\x20or\x20<code>.zip</code>\x20file,\x20the\x20<code>go</code>\x20command\x20computes\x20a\x0acryptographic\x20hash\x20and\x20checks\x20that\x20it\x20matches\x20a\x20hash\x20in\x20the\x20main\x20module's\x0a<code>go.sum</code>\x20file.\x20If\x20the\x20hash\x20is\x20not\x20present\x20in\x20<code>go.sum</code>,\x20by\x20default,\x20the\x20<code>go</code>\x0acommand\x20retrieves\x20it\x20from\x20the\x20<a\x20href=\"#checksum-database\">checksum\x20database</a>.\x20If\x20the\x0acomputed\x20hash\x20does\x20not\x20match,\x20the\x20<code>go</code>\x20command\x20reports\x20a\x20security\x20error\x20and\x20does\x0anot\x20install\x20the\x20file\x20in\x20the\x20module\x20cache.\x20The\x20<code>GOPRIVATE</code>\x20and\x20<code>GONOSUMDB</code>\x0a<a\x20href=\"#environment-variables\">environment\x20variables</a>\x20may\x20be\x20used\x20to\x20disable\x20requests\x0ato\x20the\x20checksum\x20database\x20for\x20specific\x20modules.\x20The\x20<code>GOSUMDB</code>\x20environment\x0avariable\x20may\x20also\x20be\x20set\x20to\x20<code>off</code>\x20to\x20disable\x20requests\x20to\x20the\x20checksum\x20database\x0aentirely.\x20See\x20<a\x20href=\"#authenticating\">Authenticating\x20modules</a>\x20for\x20more\x0ainformation.\x20Note\x20that\x20version\x20lists\x20and\x20version\x20metadata\x20returned\x20for\x20<code>.info</code>\x0arequests\x20are\x20not\x20authenticated\x20and\x20may\x20change\x20over\x20time.</p>\x0a<p><a\x20id=\"communicating-with-vcs\"></a></p>\x0a<h3>Communicating\x20with\x20version\x20control\x20systems</h3>\x0a<p><a\x20id=\"custom-import-paths\"></a></p>\x0a<h3>Custom\x20import\x20paths</h3>\x0a<!--\x20TODO(jayconrod):\x20custom\x20import\x20paths,\x20details\x20of\x20direct\x20mode\x20-->\x0a<p><a\x20id=\"path-constraints\"></a></p>\x0a<h3>File\x20name\x20and\x20path\x20constraints</h3>\x0a<p><a\x20id=\"zip-format\"></a></p>\x0a<h3>Module\x20zip\x20format</h3>\x0a<p><a\x20id=\"private-modules\"></a></p>\x0a<h3>Private\x20modules</h3>\x0a<p><a\x20id=\"module-cache\"></a></p>\x0a<h3>Module\x20cache</h3>\x0a<p><a\x20id=\"authenticating\"></a></p>\x0a<h2>Authenticating\x20modules</h2>\x0a<!--\x20TODO:\x20continue\x20this\x20section\x20-->\x0a<p>When\x20deciding\x20whether\x20to\x20trust\x20the\x20source\x20code\x20for\x20a\x20module\x20version\x20just\x0afetched\x20from\x20a\x20proxy\x20or\x20origin\x20server,\x20the\x20<code>go</code>\x20command\x20first\x20consults\x20the\x0a<code>go.sum</code>\x20lines\x20in\x20the\x20<code>go.sum</code>\x20file\x20of\x20the\x20current\x20module.\x20If\x20the\x20<code>go.sum</code>\x20file\x0adoes\x20not\x20contain\x20an\x20entry\x20for\x20that\x20module\x20version,\x20then\x20it\x20may\x20consult\x20the\x0achecksum\x20database.</p>\x0a<p><a\x20id=\"go.sum-file-format\"></a></p>\x0a<h3>go.sum\x20file\x20format</h3>\x0a<p><a\x20id=\"checksum-database\"></a></p>\x0a<h3>Checksum\x20database</h3>\x0a<p>The\x20checksum\x20database\x20is\x20a\x20global\x20source\x20of\x20<code>go.sum</code>\x20lines.\x20The\x20<code>go</code>\x20command\x20can\x0ause\x20this\x20in\x20many\x20situations\x20to\x20detect\x20misbehavior\x20by\x20proxies\x20or\x20origin\x20servers.</p>\x0a<p>The\x20checksum\x20database\x20allows\x20for\x20global\x20consistency\x20and\x20reliability\x20for\x20all\x0apublicly\x20available\x20module\x20versions.\x20It\x20makes\x20untrusted\x20proxies\x20possible\x20since\x0athey\x20can't\x20serve\x20the\x20wrong\x20code\x20without\x20it\x20going\x20unnoticed.\x20It\x20also\x20ensures\x0athat\x20the\x20bits\x20associated\x20with\x20a\x20specific\x20version\x20do\x20not\x20change\x20from\x20one\x20day\x20to\x0athe\x20next,\x20even\x20if\x20the\x20module's\x20author\x20subsequently\x20alters\x20the\x20tags\x20in\x20their\x0arepository.</p>\x0a<p>The\x20checksum\x20database\x20is\x20served\x20by\x20<a\x20href=\"https://sum.golang.org\">sum.golang.org</a>,\x0awhich\x20is\x20run\x20by\x20Google.\x20It\x20is\x20a\x20<a\x20href=\"https://research.swtch.com/tlog\">Transparent\x0aLog</a>\x20(or\x20\xe2\x80\x9cMerkle\x20Tree\xe2\x80\x9d)\x20of\x20<code>go.sum</code>\x20line\x0ahashes,\x20which\x20is\x20backed\x20by\x20<a\x20href=\"https://github.com/google/trillian\">Trillian</a>.\x20The\x0amain\x20advantage\x20of\x20a\x20Merkle\x20tree\x20is\x20that\x20independent\x20auditors\x20can\x20verify\x20that\x20it\x0ahasn't\x20been\x20tampered\x20with,\x20so\x20it\x20is\x20more\x20trustworthy\x20than\x20a\x20simple\x20database.</p>\x0a<p>The\x20<code>go</code>\x20command\x20interacts\x20with\x20the\x20checksum\x20database\x20using\x20the\x20protocol\x0aoriginally\x20outlined\x20in\x20<a\x20href=\"https://go.googlesource.com/proposal/+/master/design/25530-sumdb.md#checksum-database\">Proposal:\x20Secure\x20the\x20Public\x20Go\x20Module\x0aEcosystem</a>.</p>\x0a<p>The\x20table\x20below\x20specifies\x20queries\x20that\x20the\x20checksum\x20database\x20must\x20respond\x20to.\x0aFor\x20each\x20path,\x20<code>$base</code>\x20is\x20the\x20path\x20portion\x20of\x20the\x20checksum\x20database\x20URL,\x0a<code>$module</code>\x20is\x20a\x20module\x20path,\x20and\x20<code>$version</code>\x20is\x20a\x20version.\x20For\x20example,\x20if\x20the\x0achecksum\x20database\x20URL\x20is\x20<code>https://sum.golang.org</code>,\x20and\x20the\x20client\x20is\x20requesting\x0athe\x20record\x20for\x20the\x20module\x20<code>golang.org/x/text</code>\x20at\x20version\x20<code>v0.3.2</code>,\x20the\x20client\x0awould\x20send\x20a\x20<code>GET</code>\x20request\x20for\x0a<code>https://sum.golang.org/lookup/golang.org/x/text@v0.3.2</code>.</p>\x0a<p>To\x20avoid\x20ambiguity\x20when\x20serving\x20from\x20case-insensitive\x20file\x20systems,\x0athe\x20<code>$module</code>\x20and\x20<code>$version</code>\x20elements\x20are\x0a<a\x20href=\"https://pkg.go.dev/golang.org/x/mod/module#EscapePath\">case-encoded</a>\x0aby\x20replacing\x20every\x20uppercase\x20letter\x20with\x20an\x20exclamation\x20mark\x20followed\x20by\x20the\x0acorresponding\x20lower-case\x20letter.\x20This\x20allows\x20modules\x20<code>example.com/M</code>\x20and\x0a<code>example.com/m</code>\x20to\x20both\x20be\x20stored\x20on\x20disk,\x20since\x20the\x20former\x20is\x20encoded\x20as\x0a<code>example.com/!m</code>.</p>\x0a<p>Parts\x20of\x20the\x20path\x20surrounded\x20by\x20square\x20brakets,\x20like\x20<code>[.p/$W]</code>\x20denote\x20optional\x0avalues.</p>\x0a<table\x20class=\"ModTable\">\x0a\x20\x20<thead>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<th>Path</th>\x0a\x20\x20\x20\x20\x20\x20<th>Description</th>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20</thead>\x0a\x20\x20<tbody>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<td><code>$base/latest</code></td>\x0a\x20\x20\x20\x20\x20\x20<td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20Returns\x20a\x20signed,\x20encoded\x20tree\x20description\x20for\x20the\x20latest\x20log.\x20This\x0a\x20\x20\x20\x20\x20\x20\x20\x20signed\x20description\x20is\x20in\x20the\x20form\x20of\x20a\x0a\x20\x20\x20\x20\x20\x20\x20\x20<a\x20href=\"https://pkg.go.dev/golang.org/x/mod/sumdb/note\">note</a>,\x0a\x20\x20\x20\x20\x20\x20\x20\x20which\x20is\x20text\x20that\x20has\x20been\x20signed\x20by\x20one\x20or\x20more\x20server\x20keys\x20and\x20can\x0a\x20\x20\x20\x20\x20\x20\x20\x20be\x20verified\x20using\x20the\x20server's\x20public\x20key.\x20The\x20tree\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20provides\x20the\x20size\x20of\x20the\x20tree\x20and\x20the\x20hash\x20of\x20the\x20tree\x20head\x20at\x20that\x0a\x20\x20\x20\x20\x20\x20\x20\x20size.\x20This\x20encoding\x20is\x20described\x20in\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code><a\x20href=\"https://pkg.go.dev/golang.org/x/mod/sumdb/tlog#FormatTree\">\x0a\x20\x20\x20\x20\x20\x20\x20\x20golang.org/x/mod/sumdb/tlog#FormatTree</a></code>.\x0a\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<td><code>$base/lookup/$module@$version</code></td>\x0a\x20\x20\x20\x20\x20\x20<td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20Returns\x20the\x20log\x20record\x20number\x20for\x20the\x20entry\x20about\x20<code>$module</code>\x0a\x20\x20\x20\x20\x20\x20\x20\x20at\x20<code>$version</code>,\x20followed\x20by\x20the\x20data\x20for\x20the\x20record\x20(that\x20is,\x0a\x20\x20\x20\x20\x20\x20\x20\x20the\x20<code>go.sum</code>\x20lines\x20for\x20<code>$module</code>\x20at\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>$version</code>)\x20and\x20a\x20signed,\x20encoded\x20tree\x20description\x20that\x0a\x20\x20\x20\x20\x20\x20\x20\x20contains\x20the\x20record.\x0a\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<td><code>$base/tile/$H/$L/$K[.p/$W]</code></td>\x0a\x20\x20\x20\x20\x20\x20<td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20Returns\x20a\x20[log\x20tile](https://research.swtch.com/tlog#serving_tiles),\x0a\x20\x20\x20\x20\x20\x20\x20\x20which\x20is\x20a\x20set\x20of\x20hashes\x20that\x20make\x20up\x20a\x20section\x20of\x20the\x20log.\x20Each\x20tile\x0a\x20\x20\x20\x20\x20\x20\x20\x20is\x20defined\x20in\x20a\x20two-dimensional\x20coordinate\x20at\x20tile\x20level\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>$L</code>,\x20<code>$K</code>th\x20from\x20the\x20left,\x20with\x20a\x20tile\x20height\x20of\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>$H</code>.\x20The\x20optional\x20<code>.p/$W</code>\x20suffix\x20indicates\x20a\x0a\x20\x20\x20\x20\x20\x20\x20\x20partial\x20log\x20tile\x20with\x20only\x20<code>$W</code>\x20hashes.\x20Clients\x20must\x20fall\x0a\x20\x20\x20\x20\x20\x20\x20\x20back\x20to\x20fetching\x20the\x20full\x20tile\x20if\x20a\x20partial\x20tile\x20is\x20not\x20found.\x0a\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20\x20\x20\x20\x20<td><code>$base/tile/$H/data/$K[.p/$W]</code></td>\x0a\x20\x20\x20\x20\x20\x20<td>\x0a\x20\x20\x20\x20\x20\x20\x20\x20Returns\x20the\x20record\x20data\x20for\x20the\x20leaf\x20hashes\x20in\x0a\x20\x20\x20\x20\x20\x20\x20\x20<code>/tile/$H/0/$K[.p/$W]</code>\x20(with\x20a\x20literal\x20<code>data</code>\x20path\x0a\x20\x20\x20\x20\x20\x20\x20\x20element).\x0a\x20\x20\x20\x20\x20\x20</td>\x0a\x20\x20\x20\x20</tr>\x0a\x20\x20\x20\x20<tr>\x0a\x20\x20</tbody>\x0a</table>\x0a<p>If\x20the\x20<code>go</code>\x20command\x20consults\x20the\x20checksum\x20database,\x20then\x20the\x20first\x0astep\x20is\x20to\x20retrieve\x20the\x20record\x20data\x20through\x20the\x20<code>/lookup</code>\x20endpoint.\x20If\x20the\x0amodule\x20version\x20is\x20not\x20yet\x20recorded\x20in\x20the\x20log,\x20the\x20checksum\x20database\x20will\x20try\x0ato\x20fetch\x20it\x20from\x20the\x20origin\x20server\x20before\x20replying.\x20This\x20<code>/lookup</code>\x20data\x0aprovides\x20the\x20sum\x20for\x20this\x20module\x20version\x20as\x20well\x20as\x20its\x20position\x20in\x20the\x20log,\x0awhich\x20informs\x20the\x20client\x20of\x20which\x20tiles\x20should\x20be\x20fetched\x20to\x20perform\x20proofs.\x0aThe\x20<code>go</code>\x20command\x20performs\x20\xe2\x80\x9cinclusion\xe2\x80\x9d\x20proofs\x20(that\x20a\x20specific\x20record\x20exists\x20in\x0athe\x20log)\x20and\x20\xe2\x80\x9cconsistency\xe2\x80\x9d\x20proofs\x20(that\x20the\x20tree\x20hasn\xe2\x80\x99t\x20been\x20tampered\x20with)\x0abefore\x20adding\x20new\x20<code>go.sum</code>\x20lines\x20to\x20the\x20main\x20module\xe2\x80\x99s\x20<code>go.sum</code>\x20file.\x20It's\x0aimportant\x20that\x20the\x20data\x20from\x20<code>/lookup</code>\x20should\x20never\x20be\x20used\x20without\x20first\x0aauthenticating\x20it\x20against\x20the\x20signed\x20tree\x20hash\x20and\x20authenticating\x20the\x20signed\x0atree\x20hash\x20against\x20the\x20client's\x20timeline\x20of\x20signed\x20tree\x20hashes.</p>\x0a<p>Signed\x20tree\x20hashes\x20and\x20new\x20tiles\x20served\x20by\x20the\x20checksum\x20database\x20are\x20stored\x0ain\x20the\x20module\x20cache,\x20so\x20the\x20<code>go</code>\x20command\x20only\x20needs\x20to\x20fetch\x20tiles\x20that\x20are\x0amissing.</p>\x0a<p>The\x20<code>go</code>\x20command\x20doesn't\x20need\x20to\x20directly\x20connect\x20to\x20the\x20checksum\x20database.\x20It\x0acan\x20request\x20module\x20sums\x20via\x20a\x20module\x20proxy\x20that\x0a<a\x20href=\"https://go.googlesource.com/proposal/+/master/design/25530-sumdb.md#proxying-a-checksum-database\">mirrors\x20the\x20checksum\x20database</a>\x0aand\x20supports\x20the\x20protocol\x20above.\x20This\x20can\x20be\x20particularly\x20helpful\x20for\x20private,\x0acorporate\x20proxies\x20which\x20block\x20requests\x20outside\x20the\x20organization.</p>\x0a<p>The\x20<code>GOSUMDB</code>\x20environment\x20variable\x20identifies\x20the\x20name\x20of\x20checksum\x20database\x20to\x20use\x0aand\x20optionally\x20its\x20public\x20key\x20and\x20URL,\x20as\x20in:</p>\x0a<pre><code>GOSUMDB=&quot;sum.golang.org&quot;\x0aGOSUMDB=&quot;sum.golang.org+&lt;publickey&gt;&quot;\x0aGOSUMDB=&quot;sum.golang.org+&lt;publickey&gt;\x20https://sum.golang.org&quot;\x0a</code></pre>\x0a<p>The\x20<code>go</code>\x20command\x20knows\x20the\x20public\x20key\x20of\x20<code>sum.golang.org</code>,\x20and\x20also\x20that\x20the\x0aname\x20<code>sum.golang.google.cn</code>\x20(available\x20inside\x20mainland\x20China)\x20connects\x20to\x20the\x0a<code>sum.golang.org</code>\x20checksum\x20database;\x20use\x20of\x20any\x20other\x20database\x20requires\x20giving\x0athe\x20public\x20key\x20explicitly.\x20The\x20URL\x20defaults\x20to\x20<code>https://</code>\x20followed\x20by\x20the\x0adatabase\x20name.</p>\x0a<p><code>GOSUMDB</code>\x20defaults\x20to\x20<code>sum.golang.org</code>,\x20the\x20Go\x20checksum\x20database\x20run\x20by\x20Google.\x0aSee\x20https://sum.golang.org/privacy\x20for\x20the\x20service's\x20privacy\x20policy.</p>\x0a<p>If\x20<code>GOSUMDB</code>\x20is\x20set\x20to\x20<code>off</code>,\x20or\x20if\x20<code>go\x20get</code>\x20is\x20invoked\x20with\x20the\x20<code>-insecure</code>\x0aflag,\x20the\x20checksum\x20database\x20is\x20not\x20consulted,\x20and\x20all\x20unrecognized\x20modules\x20are\x0aaccepted,\x20at\x20the\x20cost\x20of\x20giving\x20up\x20the\x20security\x20guarantee\x20of\x20verified\x0arepeatable\x20downloads\x20for\x20all\x20modules.\x20A\x20better\x20way\x20to\x20bypass\x20the\x20checksum\x0adatabase\x20for\x20specific\x20modules\x20is\x20to\x20use\x20the\x20<code>GOPRIVATE</code>\x20or\x20<code>GONOSUMDB</code>\x0aenvironment\x20variables.\x20See\x20<a\x20href=\"#private-modules\">Private\x20Modules</a>\x20for\x20details.</p>\x0a<p>The\x20<code>go\x20env\x20-w</code>\x20command\x20can\x20be\x20used\x20to\x0a<a\x20href=\"/pkg/cmd/go/#hdr-Print_Go_environment_information\">set\x20these\x20variables</a>\x0afor\x20future\x20<code>go</code>\x20command\x20invocations.</p>\x0a<p><a\x20id=\"privacy\"></a></p>\x0a<h2>Privacy</h2>\x0a<p><a\x20id=\"environment-variables\"></a></p>\x0a<h2>Environment\x20variables</h2>\x0a<p><a\x20id=\"glossary\"></a></p>\x0a<h2>Glossary</h2>\x0a<p><a\x20id=\"glos-build-constraint\"></a>\x0a<strong>build\x20constraint:</strong>\x20A\x20condition\x20that\x20determines\x20whether\x20a\x20Go\x20source\x20file\x20is\x0aused\x20when\x20compiling\x20a\x20package.\x20Build\x20constraints\x20may\x20be\x20expressed\x20with\x20file\x20name\x0asuffixes\x20(for\x20example,\x20<code>foo_linux_amd64.go</code>)\x20or\x20with\x20build\x20constraint\x20comments\x0a(for\x20example,\x20<code>//\x20+build\x20linux,amd64</code>).\x20See\x20<a\x20href=\"https://golang.org/pkg/go/build/#hdr-Build_Constraints\">Build\x0aConstraints</a>.</p>\x0a<p><a\x20id=\"glos-build-list\"></a>\x0a<strong>build\x20list:</strong>\x20The\x20list\x20of\x20module\x20versions\x20that\x20will\x20be\x20used\x20for\x20a\x20build\x0acommand\x20such\x20as\x20<code>go\x20build</code>,\x20<code>go\x20list</code>,\x20or\x20<code>go\x20test</code>.\x20The\x20build\x20list\x20is\x0adetermined\x20from\x20the\x20<a\x20href=\"#glos-main-module\">main\x20module's</a>\x20<a\x20href=\"#glos-go.mod-file\"><code>go.mod</code>\x0afile</a>\x20and\x20<code>go.mod</code>\x20files\x20in\x20transitively\x20required\x20modules\x0ausing\x20<a\x20href=\"#glos-minimal-version-selection\">minimal\x20version\x20selection</a>.\x20The\x20build\x0alist\x20contains\x20versions\x20for\x20all\x20modules\x20in\x20the\x20<a\x20href=\"#glos-module-graph\">module\x0agraph</a>,\x20not\x20just\x20those\x20relevant\x20to\x20a\x20specific\x20command.</p>\x0a<p><a\x20id=\"glos-canonical-version\"></a>\x0a<strong>canonical\x20version:</strong>\x20A\x20correctly\x20formatted\x20<a\x20href=\"#glos-version\">version</a>\x20without\x0aa\x20build\x20metadata\x20suffix\x20other\x20than\x20<code>+incompatible</code>.\x20For\x20example,\x20<code>v1.2.3</code>\x0ais\x20a\x20canonical\x20version,\x20but\x20<code>v1.2.3+meta</code>\x20is\x20not.</p>\x0a<p><a\x20id=\"glos-go.mod-file\"></a>\x0a<strong><code>go.mod</code>\x20file:</strong>\x20The\x20file\x20that\x20defines\x20a\x20module's\x20path,\x20requirements,\x20and\x0aother\x20metadata.\x20Appears\x20in\x20the\x20<a\x20href=\"#glos-module-root-directory\">module's\x20root\x0adirectory</a>.\x20See\x20the\x20section\x20on\x20<a\x20href=\"#go.mod-files\"><code>go.mod</code>\x0afiles</a>.</p>\x0a<p><a\x20id=\"glos-import-path\"></a>\x0a<strong>import\x20path:</strong>\x20A\x20string\x20used\x20to\x20import\x20a\x20package\x20in\x20a\x20Go\x20source\x20file.\x0aSynonymous\x20with\x20<a\x20href=\"#glos-package-path\">package\x20path</a>.</p>\x0a<p><a\x20id=\"glos-main-module\"></a>\x0a<strong>main\x20module:</strong>\x20The\x20module\x20in\x20which\x20the\x20<code>go</code>\x20command\x20is\x20invoked.</p>\x0a<p><a\x20id=\"glos-major-version\"></a>\x0a<strong>major\x20version:</strong>\x20The\x20first\x20number\x20in\x20a\x20semantic\x20version\x20(<code>1</code>\x20in\x20<code>v1.2.3</code>).\x20In\x0aa\x20release\x20with\x20incompatible\x20changes,\x20the\x20major\x20version\x20must\x20be\x20incremented,\x20and\x0athe\x20minor\x20and\x20patch\x20versions\x20must\x20be\x20set\x20to\x200.\x20Semantic\x20versions\x20with\x20major\x0aversion\x200\x20are\x20considered\x20unstable.</p>\x0a<p><a\x20id=\"glos-major-version-suffix\"></a>\x0a<strong>major\x20version\x20suffix:</strong>\x20A\x20module\x20path\x20suffix\x20that\x20matches\x20the\x20major\x20version\x0anumber.\x20For\x20example,\x20<code>/v2</code>\x20in\x20<code>example.com/mod/v2</code>.\x20Major\x20version\x20suffixes\x20are\x0arequired\x20at\x20<code>v2.0.0</code>\x20and\x20later\x20and\x20are\x20not\x20allowed\x20at\x20earlier\x20versions.\x20See\x0athe\x20section\x20on\x20<a\x20href=\"#major-version-suffixes\">Major\x20version\x20suffixes</a>.</p>\x0a<p><a\x20id=\"glos-minimal-version-selection\"></a>\x0a<strong>minimal\x20version\x20selection\x20(MVS):</strong>\x20The\x20algorithm\x20used\x20to\x20determine\x20the\x0aversions\x20of\x20all\x20modules\x20that\x20will\x20be\x20used\x20in\x20a\x20build.\x20See\x20the\x20section\x20on\x0a<a\x20href=\"#minimal-version-selection\">Minimal\x20version\x20selection</a>\x20for\x20details.</p>\x0a<p><a\x20id=\"glos-minor-version\"></a>\x0a<strong>minor\x20version:</strong>\x20The\x20second\x20number\x20in\x20a\x20semantic\x20version\x20(<code>2</code>\x20in\x20<code>v1.2.3</code>).\x20In\x0aa\x20release\x20with\x20new,\x20backwards\x20compatible\x20functionality,\x20the\x20minor\x20version\x20must\x0abe\x20incremented,\x20and\x20the\x20patch\x20version\x20must\x20be\x20set\x20to\x200.</p>\x0a<p><a\x20id=\"glos-module\"></a>\x0a<strong>module:</strong>\x20A\x20collection\x20of\x20packages\x20that\x20are\x20released,\x20versioned,\x20and\x0adistributed\x20together.</p>\x0a<p><a\x20id=\"glos-module-cache\"></a>\x0a<strong>module\x20cache:</strong>\x20A\x20local\x20directory\x20storing\x20downloaded\x20modules,\x20located\x20in\x0a<code>GOPATH/pkg/mod</code>.\x20See\x20<a\x20href=\"#module-cache\">Module\x20cache</a>.</p>\x0a<p><a\x20id=\"glos-module-graph\"></a>\x0a<strong>module\x20graph:</strong>\x20The\x20directed\x20graph\x20of\x20module\x20requirements,\x20rooted\x20at\x20the\x20<a\x20href=\"#glos-main-module\">main\x0amodule</a>.\x20Each\x20vertex\x20in\x20the\x20graph\x20is\x20a\x20module;\x20each\x20edge\x20is\x20a\x0aversion\x20from\x20a\x20<code>require</code>\x20statement\x20in\x20a\x20<code>go.mod</code>\x20file\x20(subject\x20to\x20<code>replace</code>\x20and\x0a<code>exclude</code>\x20statements\x20in\x20the\x20main\x20module's\x20<code>go.mod</code>\x20file.</p>\x0a<p><a\x20id=\"glos-module-path\"></a>\x0a<strong>module\x20path:</strong>\x20A\x20path\x20that\x20identifies\x20a\x20module\x20and\x20acts\x20as\x20a\x20prefix\x20for\x0apackage\x20import\x20paths\x20within\x20the\x20module.\x20For\x20example,\x20<code>&quot;golang.org/x/net&quot;</code>.</p>\x0a<p><a\x20id=\"glos-module-proxy\"></a>\x0a<strong>module\x20proxy:</strong>\x20A\x20web\x20server\x20that\x20implements\x20the\x20<a\x20href=\"#goproxy-protocol\"><code>GOPROXY</code>\x0aprotocol</a>.\x20The\x20<code>go</code>\x20command\x20downloads\x20version\x20information,\x0a<code>go.mod</code>\x20files,\x20and\x20module\x20zip\x20files\x20from\x20module\x20proxies.</p>\x0a<p><a\x20id=\"glos-module-root-directory\"></a>\x0a<strong>module\x20root\x20directory:</strong>\x20The\x20directory\x20that\x20contains\x20the\x20<code>go.mod</code>\x20file\x20that\x0adefines\x20a\x20module.</p>\x0a<p><a\x20id=\"glos-package\"></a>\x0a<strong>package:</strong>\x20A\x20collection\x20of\x20source\x20files\x20in\x20the\x20same\x20directory\x20that\x20are\x0acompiled\x20together.\x20See\x20the\x20<a\x20href=\"/ref/spec#Packages\">Packages\x20section</a>\x20in\x20the\x20Go\x0aLanguage\x20Specification.</p>\x0a<p><a\x20id=\"glos-package-path\"></a>\x0a<strong>package\x20path:</strong>\x20The\x20path\x20that\x20uniquely\x20identifies\x20a\x20package.\x20A\x20package\x20path\x20is\x0aa\x20<a\x20href=\"#glos-module-path\">module\x20path</a>\x20joined\x20with\x20a\x20subdirectory\x20within\x20the\x20module.\x0aFor\x20example\x20<code>&quot;golang.org/x/net/html&quot;</code>\x20is\x20the\x20package\x20path\x20for\x20the\x20package\x20in\x20the\x0amodule\x20<code>&quot;golang.org/x/net&quot;</code>\x20in\x20the\x20<code>&quot;html&quot;</code>\x20subdirectory.\x20Synonym\x20of\x0a<a\x20href=\"#glos-import-path\">import\x20path</a>.</p>\x0a<p><a\x20id=\"glos-patch-version\"></a>\x0a<strong>patch\x20version:</strong>\x20The\x20third\x20number\x20in\x20a\x20semantic\x20version\x20(<code>3</code>\x20in\x20<code>v1.2.3</code>).\x20In\x0aa\x20release\x20with\x20no\x20changes\x20to\x20the\x20module's\x20public\x20interface,\x20the\x20patch\x20version\x0amust\x20be\x20incremented.</p>\x0a<p><a\x20id=\"glos-pre-release-version\"></a>\x0a<strong>pre-release\x20version:</strong>\x20A\x20version\x20with\x20a\x20dash\x20followed\x20by\x20a\x20series\x20of\x0adot-separated\x20identifiers\x20immediately\x20following\x20the\x20patch\x20version,\x20for\x20example,\x0a<code>v1.2.3-beta4</code>.\x20Pre-release\x20versions\x20are\x20considered\x20unstable\x20and\x20are\x20not\x0aassumed\x20to\x20be\x20compatible\x20with\x20other\x20versions.\x20A\x20pre-release\x20version\x20sorts\x20before\x0athe\x20corresponding\x20release\x20version:\x20<code>v1.2.3-pre</code>\x20comes\x20before\x20<code>v1.2.3</code>.\x20See\x20also\x0a<a\x20href=\"#glos-release-version\">release\x20version</a>.</p>\x0a<p><a\x20id=\"glos-pseudo-version\"></a>\x0a<strong>pseudo-version:</strong>\x20A\x20version\x20that\x20encodes\x20a\x20revision\x20identifier\x20(such\x20as\x20a\x20Git\x0acommit\x20hash)\x20and\x20a\x20timestamp\x20from\x20a\x20version\x20control\x20system.\x20For\x20example,\x0a<code>v0.0.0-20191109021931-daa7c04131f5</code>.\x20Used\x20for\x20<a\x20href=\"#non-module-compat\">compatibility\x20with\x20non-module\x0arepositories</a>\x20and\x20in\x20other\x20situations\x20when\x20a\x20tagged\x0aversion\x20is\x20not\x20available.</p>\x0a<p><a\x20id=\"glos-release-version\"></a>\x0a<strong>release\x20version:</strong>\x20A\x20version\x20without\x20a\x20pre-release\x20suffix.\x20For\x20example,\x0a<code>v1.2.3</code>,\x20not\x20<code>v1.2.3-pre</code>.\x20See\x20also\x20<a\x20href=\"#glos-pre-release-version\">pre-release\x0aversion</a>.</p>\x0a<p><a\x20id=\"glos-version\"></a>\x0a<strong>version:</strong>\x20An\x20identifier\x20for\x20an\x20immutable\x20snapshot\x20of\x20a\x20module,\x20written\x20as\x20the\x0aletter\x20<code>v</code>\x20followed\x20by\x20a\x20semantic\x20version.\x20See\x20the\x20section\x20on\x0a<a\x20href=\"#versions\">Versions</a>.</p>\x0a",
 }
diff --git a/content/static/style.css b/content/static/style.css
index 912e4fb..d8f6b73 100644
--- a/content/static/style.css
+++ b/content/static/style.css
@@ -255,25 +255,25 @@
 
 /* Style download button on doc/install page */
 a#start {
-    background: #E0EBF5;
-    border: 0.0625rem solid #375EAB;
-    border-radius: 0.3125rem;
-    color: #222;
-    display: block;
-    padding: 0.625rem;
-    text-align: center;
-    text-decoration: none;
+  background: #e0ebf5;
+  border: 0.0625rem solid #375eab;
+  border-radius: 0.3125rem;
+  color: #222;
+  display: block;
+  padding: 0.625rem;
+  text-align: center;
+  text-decoration: none;
 }
 a#start .big {
-    display: block;
-    font-size: 1.25rem;
-    font-weight: bold;
+  display: block;
+  font-size: 1.25rem;
+  font-weight: bold;
 }
 a#start .desc {
-    display: block;
-    font-size: 0.875rem;
-    font-weight: normal;
-    margin-top: 0.3125rem;
+  display: block;
+  font-size: 0.875rem;
+  font-weight: normal;
+  margin-top: 0.3125rem;
 }
 
 .download {