From b59aa104c2c5ab0277e79624fd48c6bca0ad42d7 Mon Sep 17 00:00:00 2001 From: Andrew Bonventre Date: Fri, 21 Jun 2019 15:53:05 -0400 Subject: [x/go.dev] Initial commit X-GoDev-Commit: f0aa8f9a66f29c7e2c61d951cabe3ea06e0571a2 --- go.dev/.gitignore | 12 ++++++++++++ go.dev/README.md | 1 + 2 files changed, 13 insertions(+) create mode 100644 go.dev/.gitignore create mode 100644 go.dev/README.md diff --git a/go.dev/.gitignore b/go.dev/.gitignore new file mode 100644 index 00000000..f1c181ec --- /dev/null +++ b/go.dev/.gitignore @@ -0,0 +1,12 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, build with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out diff --git a/go.dev/README.md b/go.dev/README.md new file mode 100644 index 00000000..7dfca122 --- /dev/null +++ b/go.dev/README.md @@ -0,0 +1 @@ +# go.dev \ No newline at end of file -- cgit v1.3 From ec1ba1fd27b97bac8dc3c9c77c809f5702c63f04 Mon Sep 17 00:00:00 2001 From: Andrew Bonventre Date: Tue, 25 Jun 2019 17:46:23 -0400 Subject: [x/go.dev] all: add bare hugo theme and configs This change adds a very basic hugo theme plus configurations for deploying on Firebase via Google Cloud Build. X-GoDev-Commit: 190fb271e64746790e8014aae6fb2ab81a9b9222 --- go.dev/.firebaserc | 6 +++++ go.dev/.gitignore | 10 ++++++++ go.dev/Dockerfile.firebase | 5 ++++ go.dev/Dockerfile.hugo | 10 ++++++++ go.dev/LICENSE | 27 ++++++++++++++++++++++ go.dev/archetypes/default.md | 6 +++++ go.dev/cloudbuild.yaml | 19 +++++++++++++++ go.dev/config.toml | 4 ++++ go.dev/firebase.json | 10 ++++++++ go.dev/themes/default/archetypes/default.md | 2 ++ go.dev/themes/default/layouts/404.html | 0 go.dev/themes/default/layouts/_default/baseof.html | 12 ++++++++++ go.dev/themes/default/layouts/_default/list.html | 0 go.dev/themes/default/layouts/_default/single.html | 0 go.dev/themes/default/layouts/index.html | 3 +++ go.dev/themes/default/static/css/styles.css | 14 +++++++++++ 16 files changed, 128 insertions(+) create mode 100644 go.dev/.firebaserc create mode 100644 go.dev/Dockerfile.firebase create mode 100644 go.dev/Dockerfile.hugo create mode 100644 go.dev/LICENSE create mode 100644 go.dev/archetypes/default.md create mode 100644 go.dev/cloudbuild.yaml create mode 100644 go.dev/config.toml create mode 100644 go.dev/firebase.json create mode 100644 go.dev/themes/default/archetypes/default.md create mode 100644 go.dev/themes/default/layouts/404.html create mode 100644 go.dev/themes/default/layouts/_default/baseof.html create mode 100644 go.dev/themes/default/layouts/_default/list.html create mode 100644 go.dev/themes/default/layouts/_default/single.html create mode 100644 go.dev/themes/default/layouts/index.html create mode 100644 go.dev/themes/default/static/css/styles.css diff --git a/go.dev/.firebaserc b/go.dev/.firebaserc new file mode 100644 index 00000000..663d35d0 --- /dev/null +++ b/go.dev/.firebaserc @@ -0,0 +1,6 @@ +{ + "projects": { + "staging": "go-dev-staging", + "prod": "go-dev-prod" + } +} diff --git a/go.dev/.gitignore b/go.dev/.gitignore index f1c181ec..2fda3a4d 100644 --- a/go.dev/.gitignore +++ b/go.dev/.gitignore @@ -10,3 +10,13 @@ # Output of the go coverage tool, specifically when used with LiteIDE *.out + +.DS_Store + +.firebase/* + +# Ignore Hugo output +public/* + +# But not the admin UI +!public/admin diff --git a/go.dev/Dockerfile.firebase b/go.dev/Dockerfile.firebase new file mode 100644 index 00000000..b4cce494 --- /dev/null +++ b/go.dev/Dockerfile.firebase @@ -0,0 +1,5 @@ +FROM node:10 + +RUN npm install -g firebase-tools + +ENTRYPOINT ["/usr/local/bin/firebase"] diff --git a/go.dev/Dockerfile.hugo b/go.dev/Dockerfile.hugo new file mode 100644 index 00000000..e1b79e5d --- /dev/null +++ b/go.dev/Dockerfile.hugo @@ -0,0 +1,10 @@ +FROM debian:stretch + +RUN apt-get update && apt-get install -y --no-install-recommends \ + wget \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* +RUN wget https://github.com/gohugoio/hugo/releases/download/v0.55.6/hugo_0.55.6_Linux-64bit.tar.gz +RUN tar -xzvf hugo_0.55.6_Linux-64bit.tar.gz + +ENTRYPOINT ["/hugo"] diff --git a/go.dev/LICENSE b/go.dev/LICENSE new file mode 100644 index 00000000..6a66aea5 --- /dev/null +++ b/go.dev/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/go.dev/archetypes/default.md b/go.dev/archetypes/default.md new file mode 100644 index 00000000..00e77bd7 --- /dev/null +++ b/go.dev/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/go.dev/cloudbuild.yaml b/go.dev/cloudbuild.yaml new file mode 100644 index 00000000..be1dfa73 --- /dev/null +++ b/go.dev/cloudbuild.yaml @@ -0,0 +1,19 @@ +steps: + - name: 'gcr.io/cloud-builders/docker' + args: ['build', '-f', 'Dockerfile.firebase', '-t', 'gcr.io/$PROJECT_ID/firebase', '.'] + - name: 'gcr.io/cloud-builders/docker' + args: ['build', '-f', 'Dockerfile.hugo', '-t', 'gcr.io/$PROJECT_ID/hugo', '.'] + - name: 'gcr.io/$PROJECT_ID/hugo' + - name: 'gcr.io/$PROJECT_ID/firebase' + entrypoint: 'bash' + args: ['-c', 'firebase deploy -P $$PROJECT_ID --token $$FIREBASE_TOKEN'] + env: + - 'PROJECT_ID=$PROJECT_ID' + secretEnv: ['FIREBASE_TOKEN'] +images: + - 'gcr.io/$PROJECT_ID/firebase' + - 'gcr.io/$PROJECT_ID/hugo' +secrets: + - kmsKeyName: projects/go-dev-staging/locations/global/keyRings/default-ring/cryptoKeys/default-key + secretEnv: + FIREBASE_TOKEN: CiQACK2Cxmn6y6EYHlC2RF3D0tNSYx21qYOhYtJlxhnXEIC3QrkSVQA78cuPO23Kod2ov2uE7ud7O3Wul64INE3X/NMZfS/xe3CvdoM/i3tDx8WB8rHVB4rJkZE4jFCF0iM10FazcR8dXXAj9Wb7bvH6e1gGUQyUb2tpZXk= diff --git a/go.dev/config.toml b/go.dev/config.toml new file mode 100644 index 00000000..67155947 --- /dev/null +++ b/go.dev/config.toml @@ -0,0 +1,4 @@ +baseURL = "https://go-dev-staging.app/" +languageCode = "en" +title = "go.dev" +theme = "default" diff --git a/go.dev/firebase.json b/go.dev/firebase.json new file mode 100644 index 00000000..e7829392 --- /dev/null +++ b/go.dev/firebase.json @@ -0,0 +1,10 @@ +{ + "hosting": { + "public": "public", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ] + } +} diff --git a/go.dev/themes/default/archetypes/default.md b/go.dev/themes/default/archetypes/default.md new file mode 100644 index 00000000..ac36e062 --- /dev/null +++ b/go.dev/themes/default/archetypes/default.md @@ -0,0 +1,2 @@ ++++ ++++ diff --git a/go.dev/themes/default/layouts/404.html b/go.dev/themes/default/layouts/404.html new file mode 100644 index 00000000..e69de29b diff --git a/go.dev/themes/default/layouts/_default/baseof.html b/go.dev/themes/default/layouts/_default/baseof.html new file mode 100644 index 00000000..863c41e1 --- /dev/null +++ b/go.dev/themes/default/layouts/_default/baseof.html @@ -0,0 +1,12 @@ + + + + + + + +{{$.Site.Title}} + +
Header
+
{{block "main" .}}{{end}}
+
Footer
diff --git a/go.dev/themes/default/layouts/_default/list.html b/go.dev/themes/default/layouts/_default/list.html new file mode 100644 index 00000000..e69de29b diff --git a/go.dev/themes/default/layouts/_default/single.html b/go.dev/themes/default/layouts/_default/single.html new file mode 100644 index 00000000..e69de29b diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html new file mode 100644 index 00000000..bd576dec --- /dev/null +++ b/go.dev/themes/default/layouts/index.html @@ -0,0 +1,3 @@ +{{define "main"}} +Body +{{end}} diff --git a/go.dev/themes/default/static/css/styles.css b/go.dev/themes/default/static/css/styles.css new file mode 100644 index 00000000..efabcd09 --- /dev/null +++ b/go.dev/themes/default/static/css/styles.css @@ -0,0 +1,14 @@ +*, +:before, +:after { + box-sizing: border-box; +} +.Site { + display: flex; + flex-direction: column; + margin: 0; + min-height: 100vh; +} +.Site-content { + flex: 1; +} -- cgit v1.3 From 498d734f60ceec1414a6cf8e864d80b2dc62f74d Mon Sep 17 00:00:00 2001 From: Andrew Bonventre Date: Tue, 25 Jun 2019 17:51:52 -0400 Subject: [x/go.dev] content: add first empty post MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To placate hugo when building, the content/ directory must exist. git won’t allow you to check in an empty directory without some chicanery. Add an empty post instead. X-GoDev-Commit: 24e7c07833d6cb0efcc2ff59d6606a74cae5b5cf --- go.dev/content/post.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 go.dev/content/post.md diff --git a/go.dev/content/post.md b/go.dev/content/post.md new file mode 100644 index 00000000..cc6b5e9d --- /dev/null +++ b/go.dev/content/post.md @@ -0,0 +1,5 @@ +--- +title: 'Post' +date: 2019-06-25T17:51:23-04:00 +draft: true +--- -- cgit v1.3 From 29748e3b2aa39047e8723c5e10a5336c666ad4b1 Mon Sep 17 00:00:00 2001 From: Andrew Bonventre Date: Mon, 5 Aug 2019 17:36:02 -0400 Subject: [x/go.dev] all: update header and single post theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adds a dummy post to exercise rendering * Removes public/admin directory since we’re not launching with Netlify CMS * Styles the header (desktop-only to start) X-GoDev-Commit: 3266662a88c39d374015316af9e9da54679f36ba --- go.dev/.gitignore | 4 +- go.dev/content/post.md | 56 +++++++++- go.dev/themes/default/layouts/_default/baseof.html | 28 ++++- go.dev/themes/default/layouts/_default/single.html | 10 ++ go.dev/themes/default/static/css/styles.css | 124 ++++++++++++++++++++- .../themes/default/static/images/go-logo-blue.svg | 1 + 6 files changed, 214 insertions(+), 9 deletions(-) create mode 100644 go.dev/themes/default/static/images/go-logo-blue.svg diff --git a/go.dev/.gitignore b/go.dev/.gitignore index 2fda3a4d..7b31b751 100644 --- a/go.dev/.gitignore +++ b/go.dev/.gitignore @@ -16,7 +16,5 @@ .firebase/* # Ignore Hugo output -public/* +public/ -# But not the admin UI -!public/admin diff --git a/go.dev/content/post.md b/go.dev/content/post.md index cc6b5e9d..f5e4989d 100644 --- a/go.dev/content/post.md +++ b/go.dev/content/post.md @@ -1,5 +1,57 @@ --- -title: 'Post' +title: 'Lorem Postum' date: 2019-06-25T17:51:23-04:00 -draft: true +authors: ['Andrew Bonventre', 'Steve Francia'] --- + +## Inminet facies saevit montis + +Lorem markdownum horum surgere es quaeris et iuvenci cadunt hausitque armiferae +[senex](http://sub.com/). Cecidisse inpediunt Romam, voluisse curru **saepe pro +sola** poposcerat bracchia. Sanguine _discutiunt manu_, mihi armos? Dilata levia +ab mira auxiliaria pennas Eumenidum lentoque inertem tantum stipite pompa. + +## Rex feritatis tamen seminaque aquas liceret nepos + +Pervenit ramos; quaterque panda, terra pedum blandita parte. Et vidisse illis +loci crimen moratur **nomine**! Pelasgos discurrunt conata. Manu Hippomenes +pecudis dixisse, hac, iunctam dixerat vita penetralia tempus praedivite Libycas. +Feroci sacris Pitanen guttura despexitque candida fervebant curasque dies +inhibere rapta. + +- Fulmina doctam deduxisse illo +- Corpora o Pallade magno regia ignarus optime +- Venenis et esse perimet +- Mihi nocte +- Gelidoque sit crevit + +## Quamquam nympha esse senex prior nec + +Longos et o reliquit [alterius](http://caelaratin.net/dixitexspes) canis +praecordia nimiis, fiducia _non corpore_. Correptaque et venata illi! Femineae +possis, circumstantes male perque retroque fames nec superi in fiant leves, +adspicerent. Hasta spectabat est **vultum in** inficere subsidit hunc. Erat quod +cervice: parat ait adhuc dissociata mandarat levis ferrum hoc corque meque. + +## Imaginis lora + +Et arte, versabat ne pater sibila; natus visa graves perque rustica! Caeli +forma, Tres, clarum? Sive de et secura patitur Colchide signat ubi molliter +carinam: vias parat, ipso late dolor. Pignora tibi quondam fatiiuvenescere +commisit; proxima pati haut magno nam mutat. Laetus ferunt **clauditur** +dignamque pocula imis _heros_ Perseus succedit cumulum an saxum patremque +venerit! + + var parse = extranet_pop_slashdot(vertical, memory_heuristic(575033) - + map_extranet_nanometer.ssid_cd_commerce(prebinding_icq, png_virtual, + tag_mount)); + var leopard_shortcut = 3 + onlineAlphaBiometrics; + kilobitLogicSsid = ad; + if (storage - 1 > 3 + 3) { + scroll(half_file * row, installerRefreshFriendly); + } else { + compile_big += exbibyte * white_bus_webmail; + } + +_Avem linguam fecundus_ voce, mea haud paratior et telorum trahitur, causas iura +dilectae **nisi feres** canes formam? Domos ac mediaque os Stygias! diff --git a/go.dev/themes/default/layouts/_default/baseof.html b/go.dev/themes/default/layouts/_default/baseof.html index 863c41e1..55d9dea8 100644 --- a/go.dev/themes/default/layouts/_default/baseof.html +++ b/go.dev/themes/default/layouts/_default/baseof.html @@ -4,9 +4,31 @@ + {{$.Site.Title}} -
Header
-
{{block "main" .}}{{end}}
-
Footer
+ +
+
+ {{block "main" .}}{{end}} +
+
+
+ +
diff --git a/go.dev/themes/default/layouts/_default/single.html b/go.dev/themes/default/layouts/_default/single.html index e69de29b..bed84b92 100644 --- a/go.dev/themes/default/layouts/_default/single.html +++ b/go.dev/themes/default/layouts/_default/single.html @@ -0,0 +1,10 @@ +{{define "main"}} +
+

{{.Title}}

+ {{range .Params.authors}} + + {{end}} + + {{.Content}} +
+{{end}} diff --git a/go.dev/themes/default/static/css/styles.css b/go.dev/themes/default/static/css/styles.css index efabcd09..27d16ae8 100644 --- a/go.dev/themes/default/static/css/styles.css +++ b/go.dev/themes/default/static/css/styles.css @@ -3,12 +3,134 @@ :after { box-sizing: border-box; } +html, +.Site { + height: 100%; +} +a, +a:link, +a:visited { + color: #007d9c; + text-decoration: none; +} +a:hover { + text-decoration: underline; +} .Site { display: flex; flex-direction: column; + font-family: 'Roboto', sans-serif; margin: 0; - min-height: 100vh; } .Site-content { flex: 1; } +.Site-footer { + background-color: #253443; + color: #fff; + font-size: 14px; +} +.Header, +.Footer, +.Container { + margin: 0 auto; + max-width: 1113px; +} +.Header { + border-bottom: 1px solid #e0e0e0; +} +.Header-nav { + align-items: center; + display: flex; + justify-content: space-between; +} +.Header-logo { + display: block; + height: 32px; + width: 82px; +} +.Header-menu { + display: flex; + list-style: none; + margin: 0; + padding: 0; +} +.Header-menuItem + .Header-menuItem { + margin-left: 15px; +} +.Header-menuItem a:link, +.Header-menuItem a:visited { + border-bottom: 2px solid transparent; + border-top: 2px solid transparent; /* To ensure the text remains centered. */ + color: #3e4042; + display: inline-block; + padding: 20px 15px; + text-decoration: none; +} +.Header-menuItem--active a:link, +.Header-menuItem--active a:visited { + border-bottom-color: #00add8; + font-weight: bold; +} +.Header-menuItem a:hover { + border-bottom-color: #542c7d; + color: #3e4042; +} +.Article { + color: #202224; + margin: 0 auto 30px; + max-width: 45em; +} +.Article-author, +.Article-date { + font-size: 16px; + line-height: 1.4; +} +.Article-date { + color: #6e7072; +} +.Article h1, +.Article h2, +.Article h3, +.Article h4, +.Article h5, +.Article h6 { + font-family: 'Work Sans', sans-serif; + font-weight: 600; +} +.Article h1 { + font-size: 30px; +} +.Article h2 { + font-size: 24px; +} +.Article h3 { + font-size: 18px; +} +.Article h4, +.Article h5, +.Article h6 { + font-size: 16px; +} +.Article p, +.Article ul, +.Article ol { + color: #555759; + font-size: 18px; + line-height: 1.6; +} +.Article pre { + background-color: #f8f9f9; + border: 1px solid #dcdee0; + border-radius: 6px; + color: #3e4042; + font-size: 16px; + line-height: 1.45; + overflow-x: auto; + padding: 24px; +} +.Article pre, +.Article code { + color: #3e4042; + font-family: 'Source Code Pro', monospace; +} diff --git a/go.dev/themes/default/static/images/go-logo-blue.svg b/go.dev/themes/default/static/images/go-logo-blue.svg new file mode 100644 index 00000000..da6ea83d --- /dev/null +++ b/go.dev/themes/default/static/images/go-logo-blue.svg @@ -0,0 +1 @@ + \ No newline at end of file -- cgit v1.3 From 69e006e44115cb08edc41a48e4e2caab91987428 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Wed, 7 Aug 2019 16:53:45 -0400 Subject: [x/go.dev] home: add layout and Hero content Add the basic structure for the layout of homepage components. Homepage components are special, as they have full-bleed background coloring. X-GoDev-Commit: 7416fa1f0989455fc84ac23943a7f6722031347a --- go.dev/themes/default/layouts/_default/baseof.html | 10 +- go.dev/themes/default/layouts/index.html | 51 +++++++- go.dev/themes/default/static/css/styles.css | 139 ++++++++++++++++++++- .../themes/default/static/images/go-logo-white.svg | 1 + .../themes/default/static/images/gopher-ladder.svg | 91 ++++++++++++++ 5 files changed, 282 insertions(+), 10 deletions(-) create mode 100644 go.dev/themes/default/static/images/go-logo-white.svg create mode 100644 go.dev/themes/default/static/images/gopher-ladder.svg diff --git a/go.dev/themes/default/layouts/_default/baseof.html b/go.dev/themes/default/layouts/_default/baseof.html index 55d9dea8..7b600332 100644 --- a/go.dev/themes/default/layouts/_default/baseof.html +++ b/go.dev/themes/default/layouts/_default/baseof.html @@ -7,12 +7,12 @@ {{$.Site.Title}} - +
-
+
{{block "main" .}}{{end}}
@@ -31,4 +31,4 @@ - + \ No newline at end of file diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index bd576dec..db9624e8 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -1,3 +1,52 @@ {{define "main"}} -Body +
+
+
+

Scale. Faster

+

+ An open source programming language that helps build fast, scalable applications that grow alongside your + business. +

+
+ +
+ Go Gopher climbing a ladder. +
+
+
+
+
+
+

Who Uses Go

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit,

+
+
+
+
+
+
+

Use Cases

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit,

+
+
+
+
+
+
+

Why Go

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit,

+
+
+
+
+
+
+

Learn Go

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit,

+
+
+
{{end}} diff --git a/go.dev/themes/default/static/css/styles.css b/go.dev/themes/default/static/css/styles.css index 27d16ae8..75fb3af9 100644 --- a/go.dev/themes/default/static/css/styles.css +++ b/go.dev/themes/default/static/css/styles.css @@ -22,6 +22,9 @@ a:hover { font-family: 'Roboto', sans-serif; margin: 0; } +.Site--blue { + background-image: linear-gradient(45deg, #007d9c 35%, #00a29c); +} .Site-content { flex: 1; } @@ -34,7 +37,11 @@ a:hover { .Footer, .Container { margin: 0 auto; - max-width: 1113px; + max-width: 75.75rem; +} +.Container--fullBleed { + margin: 0; + max-width: none; } .Header { border-bottom: 1px solid #e0e0e0; @@ -44,6 +51,10 @@ a:hover { display: flex; justify-content: space-between; } +.Header--dark { + border-bottom: none; + color: #fff; +} .Header-logo { display: block; height: 32px; @@ -55,9 +66,6 @@ a:hover { margin: 0; padding: 0; } -.Header-menuItem + .Header-menuItem { - margin-left: 15px; -} .Header-menuItem a:link, .Header-menuItem a:visited { border-bottom: 2px solid transparent; @@ -66,6 +74,13 @@ a:hover { display: inline-block; padding: 20px 15px; text-decoration: none; + width: 100%; + margin: 0 15px; + text-align: center; +} +.Header--dark .Header-menuItem a:link, +.Header--dark .Header-menuItem a:visited { + color: #fff; } .Header-menuItem--active a:link, .Header-menuItem--active a:visited { @@ -134,3 +149,119 @@ a:hover { color: #3e4042; font-family: 'Source Code Pro', monospace; } +.WhoUses-gridContainer, +.WhyGo-gridContainer, +.UseCases-gridContainer, +.LearnGo-gridContainer { + display: flex; + flex-direction: column; + flex-wrap: wrap; + margin: 0 auto; + max-width: 75.75rem; + padding: 2.625rem 0; +} +@media only screen and (min-width: 57.7rem) { + .WhoUses-gridContainer, + .WhyGo-gridContainer, + .UseCases-gridContainer, + .LearnGo-gridContainer { + flex-direction: row; + } +} +.WhyGo, +.WhoUses { + background-color: #fff; +} +.LearnGo, +.UseCases { + background-color: #f6f8fa; +} +.WhoUses-header, +.UseCases-header, +.WhyGo-header, +.LearnGo-header { + flex: 0 0 100%; + text-align: center; +} +.WhoUses-header h2, +.UseCases-header h2, +.WhyGo-header h2, +.LearnGo-header h2 { + margin-top: 0; + text-transform: uppercase; +} +.Hero { + color: #fff; +} +.Hero h1 { + font-size: 2.625rem; + line-height: 1.125rem; +} +.Hero h2 { + font-size: 1.5rem; + font-weight: normal; + max-width: 30rem; +} +.Hero-gridContainer { + display: flex; + flex-direction: column; + flex-wrap: wrap; + margin: 0 auto; + max-width: 75.75rem; + padding: 2.625rem 0; +} +@media only screen and (min-width: 57.7rem) { + .Hero-gridContainer { + flex-direction: row; + padding-bottom: 0; + } +} +.Hero-actions { + align-items: center; + display: flex; + flex: 1 1; + flex-direction: column; +} +.Hero-actions a, +.Hero-actions a:visited, +.Hero-actions a:hover { + border: 1px solid #f6f8fa; + border-radius: 3px; + color: #fff; + font-size: 1.5rem; + margin-top: 1.3125rem; + max-width: 17.5rem; + padding: 1rem 0; + text-align: center; + text-decoration: none; + width: 100%; +} +.Hero-actions a.Primary { + background-color: #fddd00; + border: 1px solid #fddd00; + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.2); + color: #202224; +} +.Hero-gopher { + display: none; +} +.Hero-blurb { + margin: auto; +} +@media only screen and (min-width: 57.7rem) { + .Hero-blurb { + flex: 2 2; + margin: 0; + } + .Hero-gopher { + display: flex; + flex: 1; + justify-content: flex-end; + } + .Hero-gopherLadder { + height: 358px; + object-fit: cover; + object-position: 100% 0; + width: 183px; + } +} \ No newline at end of file diff --git a/go.dev/themes/default/static/images/go-logo-white.svg b/go.dev/themes/default/static/images/go-logo-white.svg new file mode 100644 index 00000000..727a62ee --- /dev/null +++ b/go.dev/themes/default/static/images/go-logo-white.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gopher-ladder.svg b/go.dev/themes/default/static/images/gopher-ladder.svg new file mode 100644 index 00000000..9eeaa37d --- /dev/null +++ b/go.dev/themes/default/static/images/gopher-ladder.svg @@ -0,0 +1,91 @@ + + + + Group 12 + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.3 From cca4ce839cd9bb0b0173f60aee67f6bde7d32202 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Fri, 9 Aug 2019 14:21:46 -0400 Subject: [x/go.dev] home: implement mobile styling for header and hero Added padding to header and containers to have the correct margins on mobile and tablets, as specified. Gopher and actions should now fold beneath hero text on mobile and smaller tablets. X-GoDev-Commit: cc757e1301af0679a7fadb78c830afd1ee54fce4 --- go.dev/themes/default/static/css/styles.css | 65 ++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 20 deletions(-) diff --git a/go.dev/themes/default/static/css/styles.css b/go.dev/themes/default/static/css/styles.css index 75fb3af9..fb07cc16 100644 --- a/go.dev/themes/default/static/css/styles.css +++ b/go.dev/themes/default/static/css/styles.css @@ -23,7 +23,7 @@ a:hover { margin: 0; } .Site--blue { - background-image: linear-gradient(45deg, #007d9c 35%, #00a29c); + background: linear-gradient(45deg, #007d9c 35%, #00a29c) no-repeat center center fixed; } .Site-content { flex: 1; @@ -45,6 +45,7 @@ a:hover { } .Header { border-bottom: 1px solid #e0e0e0; + padding: 0 1.5rem; } .Header-nav { align-items: center; @@ -59,6 +60,10 @@ a:hover { display: block; height: 32px; width: 82px; + margin: 1rem 0; +} +.Header-menuItem { + display: none; } .Header-menu { display: flex; @@ -66,6 +71,11 @@ a:hover { margin: 0; padding: 0; } +@media only screen and (min-width: 57.7rem) { + .Header-menuItem { + display: inline-flex; + } +} .Header-menuItem a:link, .Header-menuItem a:visited { border-bottom: 2px solid transparent; @@ -158,7 +168,7 @@ a:hover { flex-wrap: wrap; margin: 0 auto; max-width: 75.75rem; - padding: 2.625rem 0; + padding: 2.625rem 1.5rem; } @media only screen and (min-width: 57.7rem) { .WhoUses-gridContainer, @@ -200,37 +210,35 @@ a:hover { .Hero h2 { font-size: 1.5rem; font-weight: normal; - max-width: 30rem; + max-width: 29rem; } .Hero-gridContainer { display: flex; - flex-direction: column; + flex-direction: row; flex-wrap: wrap; margin: 0 auto; max-width: 75.75rem; - padding: 2.625rem 0; -} -@media only screen and (min-width: 57.7rem) { - .Hero-gridContainer { - flex-direction: row; - padding-bottom: 0; - } + padding: 2.625rem 1.5rem 0; } .Hero-actions { align-items: center; display: flex; - flex: 1 1; + flex: 3 1; flex-direction: column; + justify-content: center; + padding-right: 24px; } .Hero-actions a, .Hero-actions a:visited, .Hero-actions a:hover { + border-radius: 4px; + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.2); + height: 4rem; border: 1px solid #f6f8fa; - border-radius: 3px; color: #fff; font-size: 1.5rem; - margin-top: 1.3125rem; - max-width: 17.5rem; + margin: 1.3125rem 1.25rem 0; + max-width: 13.75rem; padding: 1rem 0; text-align: center; text-decoration: none; @@ -243,25 +251,42 @@ a:hover { color: #202224; } .Hero-gopher { - display: none; + display: flex; + flex: 2; + justify-content: flex-end; +} +.Hero-gopherLadder { + width: 153px; + height: 355px; + object-fit: cover; + object-position: 100% 0; } .Hero-blurb { margin: auto; + flex: 0 0 100%; } @media only screen and (min-width: 57.7rem) { + .Hero-actions { + justify-content: initial; + flex: 1 1; + } + .Hero-actions a, + .Hero-actions a:visited, + .Hero-actions a:hover { + max-width: 17.5rem; + } .Hero-blurb { flex: 2 2; margin: 0; } .Hero-gopher { - display: flex; flex: 1; - justify-content: flex-end; } .Hero-gopherLadder { height: 358px; - object-fit: cover; - object-position: 100% 0; width: 183px; } + .Hero h2 { + max-width: 30rem; + } } \ No newline at end of file -- cgit v1.3 From fb4d45468dbf56e4f466885db617313eac1fe8c5 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Mon, 12 Aug 2019 17:36:49 -0400 Subject: [x/go.dev] home: add Who Uses Go content The homepage shows a list of case studies, with a hover effect. As there's no hover on mobile, we always show the hover effect below certain screen sizes. The "hover: hover" media query would be ideal, but is a little behind in terms of browser support. X-GoDev-Commit: da263c9d0b878d10a76f723b6d6dbbd073aee7e3 --- go.dev/themes/default/layouts/index.html | 38 +++++++++++++ go.dev/themes/default/static/css/styles.css | 63 ++++++++++++++++++++- go.dev/themes/default/static/images/adobe-logo.png | Bin 0 -> 33133 bytes go.dev/themes/default/static/images/amex-logo.png | Bin 0 -> 72648 bytes .../themes/default/static/images/google-logo.png | Bin 0 -> 99484 bytes .../themes/default/static/images/netflix-logo.png | Bin 0 -> 84975 bytes go.dev/themes/default/static/images/sap-logo.png | Bin 0 -> 16193 bytes .../themes/default/static/images/walmart-logo.png | Bin 0 -> 1028472 bytes 8 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 go.dev/themes/default/static/images/adobe-logo.png create mode 100644 go.dev/themes/default/static/images/amex-logo.png create mode 100644 go.dev/themes/default/static/images/google-logo.png create mode 100644 go.dev/themes/default/static/images/netflix-logo.png create mode 100644 go.dev/themes/default/static/images/sap-logo.png create mode 100644 go.dev/themes/default/static/images/walmart-logo.png diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index db9624e8..58b7f6a3 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -23,6 +23,44 @@

Who Uses Go

Lorem ipsum dolor sit amet, consectetur adipiscing elit,

+
diff --git a/go.dev/themes/default/static/css/styles.css b/go.dev/themes/default/static/css/styles.css index fb07cc16..8d57e947 100644 --- a/go.dev/themes/default/static/css/styles.css +++ b/go.dev/themes/default/static/css/styles.css @@ -289,4 +289,65 @@ a:hover { .Hero h2 { max-width: 30rem; } -} \ No newline at end of file +} +.WhoUses-caseStudyList { + align-content: center; + display: flex; + flex: 0 0 100%; + flex-wrap: wrap; + justify-content: space-evenly; + list-style: none; + margin: 0; + padding: 0; +} +.WhoUses-caseStudy { + display: flex; + flex: 0 1 11.375rem; + justify-content: center; + margin: 1em; + min-height: 11.6875rem; +} +.WhoUses-caseStudy p { + margin-bottom: 0; +} +.WhoUses-caseStudy a:link, +.WhoUses-caseStudy a:visited { + border-radius: 10px; + box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.22); + color: #6e7072; + display: flex; + flex-direction: column; + height: 100%; + max-width: 11.375rem; + padding: 1rem; + text-align: center; + text-decoration: none; + width: 100%; +} +.WhoUses-logo { + margin: auto; + max-height: 120px; + max-width: 150px; +} +@media only screen and (min-width: 57.7rem) { + .WhoUses-caseStudy { + flex: 0 1 33%; + margin: 0; + } + .WhoUses-caseStudy a:link, + .WhoUses-caseStudy a:visited { + box-shadow: 0 2px 8px 0 transparent; + color: transparent; + } + .WhoUses-caseStudy a:link:hover, + .WhoUses-caseStudy a:visited:hover { + transition: all 0.2s ease-in-out; + box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.22); + color: #6e7072; + } +} +@media only screen and (min-width: 66.75rem) { + .WhoUses-caseStudy { + flex: 1; + } +} diff --git a/go.dev/themes/default/static/images/adobe-logo.png b/go.dev/themes/default/static/images/adobe-logo.png new file mode 100644 index 00000000..802b3e89 Binary files /dev/null and b/go.dev/themes/default/static/images/adobe-logo.png differ diff --git a/go.dev/themes/default/static/images/amex-logo.png b/go.dev/themes/default/static/images/amex-logo.png new file mode 100644 index 00000000..298ccf6e Binary files /dev/null and b/go.dev/themes/default/static/images/amex-logo.png differ diff --git a/go.dev/themes/default/static/images/google-logo.png b/go.dev/themes/default/static/images/google-logo.png new file mode 100644 index 00000000..8fd4f201 Binary files /dev/null and b/go.dev/themes/default/static/images/google-logo.png differ diff --git a/go.dev/themes/default/static/images/netflix-logo.png b/go.dev/themes/default/static/images/netflix-logo.png new file mode 100644 index 00000000..a11f0801 Binary files /dev/null and b/go.dev/themes/default/static/images/netflix-logo.png differ diff --git a/go.dev/themes/default/static/images/sap-logo.png b/go.dev/themes/default/static/images/sap-logo.png new file mode 100644 index 00000000..a7ca3b90 Binary files /dev/null and b/go.dev/themes/default/static/images/sap-logo.png differ diff --git a/go.dev/themes/default/static/images/walmart-logo.png b/go.dev/themes/default/static/images/walmart-logo.png new file mode 100644 index 00000000..5e568f3a Binary files /dev/null and b/go.dev/themes/default/static/images/walmart-logo.png differ -- cgit v1.3 From 74184422c41dfd95f05bf6f6ec183ad19c974155 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 15 Aug 2019 15:23:20 -0400 Subject: [x/go.dev] all: set up firebase redirects for discovery site The current plan is for the discovery site to be hosted on a subdomain. In the meantime, this change will help validate our routing strategy. X-GoDev-Commit: 91b0c8e1bf08d0c6608376c92cdb49fc3003ccf9 --- go.dev/firebase.json | 17 +++++++++++++++++ go.dev/themes/default/layouts/_default/baseof.html | 1 + 2 files changed, 18 insertions(+) diff --git a/go.dev/firebase.json b/go.dev/firebase.json index e7829392..f1e0a6c0 100644 --- a/go.dev/firebase.json +++ b/go.dev/firebase.json @@ -5,6 +5,23 @@ "firebase.json", "**/.*", "**/node_modules/**" + ], + "redirects": [ + { + "source": "/explore/:explore*", + "destination": "https://go-discovery.appspot.com/:explore", + "type": 302 + }, + { + "source": "/pkg/", + "destination": "https://go-discovery.appspot.com/", + "type": 302 + }, + { + "source": "/pkg/:pkg*", + "destination": "https://go-discovery.appspot.com/pkg/:pkg", + "type": 302 + } ] } } diff --git a/go.dev/themes/default/layouts/_default/baseof.html b/go.dev/themes/default/layouts/_default/baseof.html index 7b600332..7eb832e9 100644 --- a/go.dev/themes/default/layouts/_default/baseof.html +++ b/go.dev/themes/default/layouts/_default/baseof.html @@ -17,6 +17,7 @@ -- cgit v1.3 From 34a00196c32140eea9fe83646d1e726b87fbc540 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 15 Aug 2019 16:50:05 -0400 Subject: [x/go.dev] all: fix firebase redirects for explore,pkg There's a slight nuance to named globs and trailing slashes. This may not end up mattering once we have our final routes, but this is still useful as a proof of concept. X-GoDev-Commit: f783b18c071cc7f99e81f0cca9440dfd8f91275c --- go.dev/firebase.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/go.dev/firebase.json b/go.dev/firebase.json index f1e0a6c0..b005700b 100644 --- a/go.dev/firebase.json +++ b/go.dev/firebase.json @@ -7,13 +7,18 @@ "**/node_modules/**" ], "redirects": [ + { + "source": "/explore", + "destination": "https://go-discovery.appspot.com/", + "type": 302 + }, { "source": "/explore/:explore*", "destination": "https://go-discovery.appspot.com/:explore", "type": 302 }, { - "source": "/pkg/", + "source": "/pkg", "destination": "https://go-discovery.appspot.com/", "type": 302 }, -- cgit v1.3 From 2786f4c2613f2dae5b6fc806f70164d57eee5893 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Wed, 28 Aug 2019 17:45:47 -0400 Subject: [x/go.dev] home: add Use Cases layout The Use Cases section is a simple grid list of a title, description, and link to details. X-GoDev-Commit: c40b65dbcc9d092c3219d4509d84bd68c64aba9f --- go.dev/themes/default/layouts/index.html | 49 ++++++++++++++++++++++++++--- go.dev/themes/default/static/css/styles.css | 28 +++++++++++++++++ 2 files changed, 73 insertions(+), 4 deletions(-) diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index 58b7f6a3..dd41d53f 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -64,10 +64,51 @@
-
-
-

Use Cases

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit,

+
+
+
+

Use Cases

+
+
+ +

Web Development

+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut +

+

+ Learn More > +

+
+
+ +

Command Line Interfaces

+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut +

+

+ Learn More > +

+
+
+ +

Networking and Services

+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut +

+

+ Learn More > +

+
+
+ +

Operations

+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut +

+

+ Learn More > +

+
diff --git a/go.dev/themes/default/static/css/styles.css b/go.dev/themes/default/static/css/styles.css index 8d57e947..5dec17f5 100644 --- a/go.dev/themes/default/static/css/styles.css +++ b/go.dev/themes/default/static/css/styles.css @@ -176,6 +176,7 @@ a:hover { .UseCases-gridContainer, .LearnGo-gridContainer { flex-direction: row; + justify-content: space-between; } } .WhyGo, @@ -197,6 +198,7 @@ a:hover { .UseCases-header h2, .WhyGo-header h2, .LearnGo-header h2 { + letter-spacing: 0.125rem; margin-top: 0; text-transform: uppercase; } @@ -351,3 +353,29 @@ a:hover { flex: 1; } } +.UseCases-gridContainer { + flex-direction: row; + justify-content: space-around; + margin: -1em 0 0 -1em; /* Offset gutters for the leftmost and top cells in the grid. */ +} +.UseCase { + flex: 1 0 15.625rem; + margin-top: 1rem; + max-width: 15.625rem; + padding: 1em 0 0 1em; /* Gutter between grid cells. */ +} +.UseCase-logo { + background: linear-gradient(10.64deg, #007d9c 0%, #00a29c 100%); + border-radius: 50%; + height: 3.75rem; + margin: auto; + width: 3.75rem; +} +.UseCase-title { + text-align: center; +} +.UseCase-action { + font-size: 1.125rem; + line-height: 2.5rem; + text-align: center; +} -- cgit v1.3 From 10e627e40f4d1f9197ed1f17bb95d4d4a508fc42 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 29 Aug 2019 18:11:39 -0400 Subject: [x/go.dev] home: add Why Go section to homepage This section is a list of reasons to use go with custom bullets, as well as a new gopher. X-GoDev-Commit: f54b0ad30b0b6988a4294ea2777f323c78a7776f --- go.dev/themes/default/layouts/index.html | 36 ++++++++++++++++- go.dev/themes/default/static/css/styles.css | 45 +++++++++++++++++++++ .../default/static/images/gopher-biplane.png | Bin 0 -> 317369 bytes 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 go.dev/themes/default/static/images/gopher-biplane.png diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index dd41d53f..8789fb76 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -116,7 +116,41 @@

Why Go

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit,

+
+
    +
  • + +
    +

    Scalability

    +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut + labore et dolore magna aliqua. Ut enim ad minim veniam, +

    +
    +
  • +
  • + +
    +

    Microservices

    +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut + labore et dolore magna aliqua. Ut enim ad minim veniam, +

    +
    +
  • +
  • + +
    +

    Efficiency

    +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut + labore et dolore magna aliqua. Ut enim ad minim veniam, +

    +
    +
  • +
+
+ Go Gopher piloting a biplane.
diff --git a/go.dev/themes/default/static/css/styles.css b/go.dev/themes/default/static/css/styles.css index 5dec17f5..08dfc5d4 100644 --- a/go.dev/themes/default/static/css/styles.css +++ b/go.dev/themes/default/static/css/styles.css @@ -379,3 +379,48 @@ a:hover { line-height: 2.5rem; text-align: center; } +.WhyGo-gridContainer { + align-items: center; + flex-direction: row; + justify-content: space-around; +} +.WhyGo-reasons { + flex: 2 2 50%; + list-style: none; + padding-left: 0; +} +.WhyGo-reason { + display: flex; + flex-direction: row; + margin-top: 1rem; + max-width: 31.25rem; + padding-right: 1em; +} +.WhyGo-reasonText { + margin-left: 1.25rem; +} +.WhyGo-reasonTitle { + font-size: 1.5rem; + line-height: 1.75rem; + margin: 0; +} +.WhyGo-reasonIcon { + background: linear-gradient(10.64deg, #007d9c 0%, #00a29c 100%); + border-radius: 50%; + color: white; + font-size: 1.4rem; + height: 1.5rem; + line-height: 1.4rem; + margin-top: .125rem; + min-width: 1.5rem; + text-align: center; + width: 1.5rem; +} +.WhyGo-gopher { + flex: 1 1 50%; + max-width: 28.4375rem; + text-align: center; +} +.WhyGo-gopher img { + width: 100%; +} diff --git a/go.dev/themes/default/static/images/gopher-biplane.png b/go.dev/themes/default/static/images/gopher-biplane.png new file mode 100644 index 00000000..a561a82f Binary files /dev/null and b/go.dev/themes/default/static/images/gopher-biplane.png differ -- cgit v1.3 From 8cbc9740b4f270d17f7214087e656acd1205aa83 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 29 Aug 2019 15:54:30 -0400 Subject: [x/go.dev] home: make the Download Go link subtle The download Go link should be a minor call-to-action compared to the Learn More action. X-GoDev-Commit: d3b10985a905d34f36ecd9db918c25bdd9ddbd38 --- go.dev/themes/default/layouts/index.html | 4 ++-- go.dev/themes/default/static/css/styles.css | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index 8789fb76..fbaebed7 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -9,8 +9,8 @@
Go Gopher climbing a ladder. diff --git a/go.dev/themes/default/static/css/styles.css b/go.dev/themes/default/static/css/styles.css index 08dfc5d4..a3738bdc 100644 --- a/go.dev/themes/default/static/css/styles.css +++ b/go.dev/themes/default/static/css/styles.css @@ -233,24 +233,24 @@ a:hover { .Hero-actions a, .Hero-actions a:visited, .Hero-actions a:hover { - border-radius: 4px; - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.2); - height: 4rem; - border: 1px solid #f6f8fa; color: #fff; - font-size: 1.5rem; - margin: 1.3125rem 1.25rem 0; max-width: 13.75rem; padding: 1rem 0; text-align: center; - text-decoration: none; - width: 100%; + text-decoration: underline; + margin: 0.5rem 0; } .Hero-actions a.Primary { background-color: #fddd00; border: 1px solid #fddd00; + border-radius: 4px; + margin: 1.3125rem 1.25rem 0; + height: 4rem; + width: 100%; box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.2); color: #202224; + font-size: 1.5rem; + text-decoration: none; } .Hero-gopher { display: flex; -- cgit v1.3 From c617a113385cdcfe8dd1781c434f07a763823b54 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Tue, 3 Sep 2019 16:03:56 -0400 Subject: [x/go.dev] home: add Learn Go course content The courses are a flex grid of 4 items. Images are placeholder boxes at the moment. X-GoDev-Commit: 7f655f1a7daa45087d65e0f7cae5a5c6d7f020c2 --- go.dev/themes/default/layouts/index.html | 40 ++++++++++++++++++++++- go.dev/themes/default/static/css/styles.css | 49 +++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 1 deletion(-) diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index fbaebed7..62fc3762 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -158,8 +158,46 @@

Learn Go

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit,

+

Join the Go community and start learning

+
+
+

Courses

+

View more courses >

+
{{end}} diff --git a/go.dev/themes/default/static/css/styles.css b/go.dev/themes/default/static/css/styles.css index a3738bdc..c144a9c6 100644 --- a/go.dev/themes/default/static/css/styles.css +++ b/go.dev/themes/default/static/css/styles.css @@ -424,3 +424,52 @@ a:hover { .WhyGo-gopher img { width: 100%; } +.LearnGo-subHeader { + display: flex; + justify-content: space-between; + width: 100%; +} +.LearnGo-subHeader h3 { + color: #6e7072; + font-size: 1rem; + font-weight: normal; +} +.LearnGo-viewMore a { + font-weight: 600; +} +.LearnGo-courses { + display: flex; + flex: 1 0 100%; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-around; + list-style: none; + margin: 0 0 0 -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ + padding-left: 0; +} +@media only screen and (min-width: 72.75rem) { + .LearnGo-courses { + justify-content: space-between; + } +} +.LearnGo-courseItem { + align-items: center; + display: flex; + flex-wrap: wrap; + justify-content: center; + padding: 1rem 0 0 1rem; /* Gutter between grid cells. */ +} +.LearnGo-courseItem a { + color: #3e4042; +} +.LearnGo-courseTitle { + text-align: center; +} +.LearnGo-courseImage { + background-color: #fff; + border-radius: 0.3125rem; + box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); + height: 11rem; + max-width: 16.5rem; + width: 16.5rem; +} -- cgit v1.3 From dd6c53a53f81787cdc62c2ae6947ac6098c5b604 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Wed, 4 Sep 2019 11:26:36 -0400 Subject: [x/go.dev] home: add Events section to Learn Go This section is a flexible list that stacks columns on mobile. It uses webkit-line-clamp, which is compatible with a broad section of browsers, despite the webkit prefix. There is no supported non-prefixed version as of 2019. An alternative would involve javascript. X-GoDev-Commit: e472d9bc9fa897c8df654ee6d73e4af73e1295ce --- go.dev/themes/default/layouts/index.html | 68 +++++++++++++++++++++ go.dev/themes/default/static/css/styles.css | 94 ++++++++++++++++++++++++++++- 2 files changed, 161 insertions(+), 1 deletion(-) diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index 62fc3762..1738a57a 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -198,6 +198,74 @@
+
+

Events

+

View more events >

+
+
    +
  • +
    +
    +
    +

    May Tue 08

    +

    London, U.K.

    +
    +
    +

    + Meetup Name +

    +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt... +

    +
    +

    Learn more >

    +
    +
  • +
  • +
    +
    +
    +

    May Tue 08

    +

    London, U.K.

    +
    +
    +

    + Meetup Name +

    +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt + mollit anim id est laborum. +

    +
    +

    Learn more >

    +
    +
  • +
  • +
    +
    +
    +

    May Tue 08

    +

    London, U.K.

    +
    +
    +

    + Meetup Name +

    +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex + ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt + mollit anim id est laborum. +

    +
    +

    Learn more >

    +
    +
  • +
{{end}} diff --git a/go.dev/themes/default/static/css/styles.css b/go.dev/themes/default/static/css/styles.css index c144a9c6..f7270806 100644 --- a/go.dev/themes/default/static/css/styles.css +++ b/go.dev/themes/default/static/css/styles.css @@ -444,7 +444,7 @@ a:hover { flex-wrap: wrap; justify-content: space-around; list-style: none; - margin: 0 0 0 -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ + margin: 0 0 1rem -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ padding-left: 0; } @media only screen and (min-width: 72.75rem) { @@ -473,3 +473,95 @@ a:hover { max-width: 16.5rem; width: 16.5rem; } +.LearnGo-events { + background-color: #fff; + border: 0.0625rem solid rgba(155, 155, 155, 0.19); + border-radius: 0.3125rem; + box-shadow: 0 0.125rem 0.8125rem 0 rgba(0, 0, 0, 0.26); + flex: 1 0 100%; + list-style: none; + margin: 0.5rem 0 0; + padding-left: 0; + width: 100%; +} +.LearnGo-eventItem { + display: flex; + padding: 1rem; +} +.LearnGo-eventItem + .LearnGo-eventItem { + border-top: 1px solid #e0e0e0; +} +.LearnGo-eventThumbnail { + background-color: #d8d8d8; + height: 3rem; + min-width: 3rem; + width: 3rem; +} +.LearnGo-eventBody { + flex: auto; + padding-left: 1rem; +} +.LearnGo-eventDate { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + width: 100%; +} +.LearnGo-eventDate p { + color: #6e7072; + margin: 0; +} +.LearnGo-eventName { + color: #007d9c; + font-size: 1.25rem; + font-weight: normal; + margin: 0; +} +.LearnGo-eventDescription { + -webkit-box-orient: vertical; /* See webkit-line-clamp */ + display: -webkit-box; /* See webkit-line-clamp */ + -webkit-line-clamp: 4; /* Elide flex text. webkit-line-clamp is broadly compatible with browsers. */ + overflow: hidden; + text-overflow: ellipsis; +} +.LearnGo-viewMore { + margin: 0; +} +@media only screen and (min-width: 57.7rem) { + .LearnGo-eventThumbnail { + height: 5.375rem; + min-width: 5.375rem; + width: 5.375rem; + } + .LearnGo-eventDate { + flex: 2; + flex-direction: column; + justify-content: center; + margin: 0 1rem; + min-width: 6rem; + } + .LearnGo-eventText { + display: flex; + flex: 2 1 23.4375rem; + flex-direction: column; + justify-content: space-around; + max-height: 5.375rem; + padding-right: 5rem; + } + .LearnGo-eventDescription { + -webkit-line-clamp: 2; /* see non-media-query definition. */ + margin: 0 0 0.5rem; + } + .LearnGo-viewMore { + align-self: center; + flex: 2; + text-align: right; + } + .LearnGo-eventBody { + display: flex; + flex-direction: row; + } + .LearnGo-eventItem { + max-height: 7.5rem; + } +} -- cgit v1.3 From f271e03bc74e0f8ccff1eb6e6d1f527825709f58 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Wed, 4 Sep 2019 13:17:19 -0400 Subject: [x/go.dev] home: increase desktop padding on Learn Go Events This change is consistent with the designs. X-GoDev-Commit: 28ec9ea59ed5c7ace1dd9f7c0436350e72477457 --- go.dev/themes/default/static/css/styles.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go.dev/themes/default/static/css/styles.css b/go.dev/themes/default/static/css/styles.css index f7270806..aab3b9e5 100644 --- a/go.dev/themes/default/static/css/styles.css +++ b/go.dev/themes/default/static/css/styles.css @@ -481,7 +481,7 @@ a:hover { flex: 1 0 100%; list-style: none; margin: 0.5rem 0 0; - padding-left: 0; + padding: 0.5rem 0; width: 100%; } .LearnGo-eventItem { @@ -562,6 +562,6 @@ a:hover { flex-direction: row; } .LearnGo-eventItem { - max-height: 7.5rem; + padding: 1rem 3rem; } } -- cgit v1.3 From 871140a3d3074b25a689f8e4aaae78bc86b7c4a7 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Wed, 4 Sep 2019 15:08:14 -0400 Subject: [x/go.dev] home: add margin to in-between border of events X-GoDev-Commit: a8261289fbe5693e1c75954c67f6ca6efa35487d --- go.dev/themes/default/static/css/styles.css | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/go.dev/themes/default/static/css/styles.css b/go.dev/themes/default/static/css/styles.css index aab3b9e5..fcf10f46 100644 --- a/go.dev/themes/default/static/css/styles.css +++ b/go.dev/themes/default/static/css/styles.css @@ -486,7 +486,8 @@ a:hover { } .LearnGo-eventItem { display: flex; - padding: 1rem; + padding: 1rem 0; + margin: 0 1rem; } .LearnGo-eventItem + .LearnGo-eventItem { border-top: 1px solid #e0e0e0; @@ -562,6 +563,7 @@ a:hover { flex-direction: row; } .LearnGo-eventItem { - padding: 1rem 3rem; + padding: 1rem 0; + margin: 0 3rem; } } -- cgit v1.3 From 5617b83c64c0dc17032fe2db2557c4207602124d Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 5 Sep 2019 18:34:46 -0400 Subject: [x/go.dev] all: add footer content and layout It's all placeholder content for now, but matches the design's layout. X-GoDev-Commit: b2cde523522c92c35aaf328f43d710b11efdb363 --- go.dev/themes/default/layouts/_default/baseof.html | 21 ++++++++++++++++++++- go.dev/themes/default/static/css/styles.css | 18 ++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/go.dev/themes/default/layouts/_default/baseof.html b/go.dev/themes/default/layouts/_default/baseof.html index 7eb832e9..3785f681 100644 --- a/go.dev/themes/default/layouts/_default/baseof.html +++ b/go.dev/themes/default/layouts/_default/baseof.html @@ -30,6 +30,25 @@ \ No newline at end of file diff --git a/go.dev/themes/default/static/css/styles.css b/go.dev/themes/default/static/css/styles.css index fcf10f46..231879bd 100644 --- a/go.dev/themes/default/static/css/styles.css +++ b/go.dev/themes/default/static/css/styles.css @@ -39,6 +39,9 @@ a:hover { margin: 0 auto; max-width: 75.75rem; } +.Footer { + padding: 2.625rem 1.5rem; +} .Container--fullBleed { margin: 0; max-width: none; @@ -567,3 +570,18 @@ a:hover { margin: 0 3rem; } } +.Footer-links { + display: flex; + flex-wrap: wrap; + margin-left: -6rem; +} +.Footer-linkColumn { + padding-left: 6rem; +} +a.Footer-link { + color: #fff; + display: flex; + flex: 1; + font-size: .875rem; + line-height: 2rem; +} -- cgit v1.3 From 2fbbd3d3962a7250fec89c28e5569c3b4d3e9c91 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Mon, 9 Sep 2019 14:59:54 -0400 Subject: [x/go.dev] all: fingerprint CSS assets for caching and integrity This changes hugo to fingerprint CSS assets. This will allow us to do smarter caching in production, as well as use asset integrity. X-GoDev-Commit: 4f1b6f86032ec8de4bbacae062affcde3f9b4ed8 --- go.dev/.gitignore | 2 +- go.dev/themes/default/assets/css/styles.css | 587 +++++++++++++++++++++ go.dev/themes/default/layouts/_default/baseof.html | 8 +- go.dev/themes/default/static/css/styles.css | 587 --------------------- 4 files changed, 595 insertions(+), 589 deletions(-) create mode 100644 go.dev/themes/default/assets/css/styles.css delete mode 100644 go.dev/themes/default/static/css/styles.css diff --git a/go.dev/.gitignore b/go.dev/.gitignore index 7b31b751..9f134b48 100644 --- a/go.dev/.gitignore +++ b/go.dev/.gitignore @@ -17,4 +17,4 @@ # Ignore Hugo output public/ - +resources/ diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css new file mode 100644 index 00000000..231879bd --- /dev/null +++ b/go.dev/themes/default/assets/css/styles.css @@ -0,0 +1,587 @@ +*, +:before, +:after { + box-sizing: border-box; +} +html, +.Site { + height: 100%; +} +a, +a:link, +a:visited { + color: #007d9c; + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +.Site { + display: flex; + flex-direction: column; + font-family: 'Roboto', sans-serif; + margin: 0; +} +.Site--blue { + background: linear-gradient(45deg, #007d9c 35%, #00a29c) no-repeat center center fixed; +} +.Site-content { + flex: 1; +} +.Site-footer { + background-color: #253443; + color: #fff; + font-size: 14px; +} +.Header, +.Footer, +.Container { + margin: 0 auto; + max-width: 75.75rem; +} +.Footer { + padding: 2.625rem 1.5rem; +} +.Container--fullBleed { + margin: 0; + max-width: none; +} +.Header { + border-bottom: 1px solid #e0e0e0; + padding: 0 1.5rem; +} +.Header-nav { + align-items: center; + display: flex; + justify-content: space-between; +} +.Header--dark { + border-bottom: none; + color: #fff; +} +.Header-logo { + display: block; + height: 32px; + width: 82px; + margin: 1rem 0; +} +.Header-menuItem { + display: none; +} +.Header-menu { + display: flex; + list-style: none; + margin: 0; + padding: 0; +} +@media only screen and (min-width: 57.7rem) { + .Header-menuItem { + display: inline-flex; + } +} +.Header-menuItem a:link, +.Header-menuItem a:visited { + border-bottom: 2px solid transparent; + border-top: 2px solid transparent; /* To ensure the text remains centered. */ + color: #3e4042; + display: inline-block; + padding: 20px 15px; + text-decoration: none; + width: 100%; + margin: 0 15px; + text-align: center; +} +.Header--dark .Header-menuItem a:link, +.Header--dark .Header-menuItem a:visited { + color: #fff; +} +.Header-menuItem--active a:link, +.Header-menuItem--active a:visited { + border-bottom-color: #00add8; + font-weight: bold; +} +.Header-menuItem a:hover { + border-bottom-color: #542c7d; + color: #3e4042; +} +.Article { + color: #202224; + margin: 0 auto 30px; + max-width: 45em; +} +.Article-author, +.Article-date { + font-size: 16px; + line-height: 1.4; +} +.Article-date { + color: #6e7072; +} +.Article h1, +.Article h2, +.Article h3, +.Article h4, +.Article h5, +.Article h6 { + font-family: 'Work Sans', sans-serif; + font-weight: 600; +} +.Article h1 { + font-size: 30px; +} +.Article h2 { + font-size: 24px; +} +.Article h3 { + font-size: 18px; +} +.Article h4, +.Article h5, +.Article h6 { + font-size: 16px; +} +.Article p, +.Article ul, +.Article ol { + color: #555759; + font-size: 18px; + line-height: 1.6; +} +.Article pre { + background-color: #f8f9f9; + border: 1px solid #dcdee0; + border-radius: 6px; + color: #3e4042; + font-size: 16px; + line-height: 1.45; + overflow-x: auto; + padding: 24px; +} +.Article pre, +.Article code { + color: #3e4042; + font-family: 'Source Code Pro', monospace; +} +.WhoUses-gridContainer, +.WhyGo-gridContainer, +.UseCases-gridContainer, +.LearnGo-gridContainer { + display: flex; + flex-direction: column; + flex-wrap: wrap; + margin: 0 auto; + max-width: 75.75rem; + padding: 2.625rem 1.5rem; +} +@media only screen and (min-width: 57.7rem) { + .WhoUses-gridContainer, + .WhyGo-gridContainer, + .UseCases-gridContainer, + .LearnGo-gridContainer { + flex-direction: row; + justify-content: space-between; + } +} +.WhyGo, +.WhoUses { + background-color: #fff; +} +.LearnGo, +.UseCases { + background-color: #f6f8fa; +} +.WhoUses-header, +.UseCases-header, +.WhyGo-header, +.LearnGo-header { + flex: 0 0 100%; + text-align: center; +} +.WhoUses-header h2, +.UseCases-header h2, +.WhyGo-header h2, +.LearnGo-header h2 { + letter-spacing: 0.125rem; + margin-top: 0; + text-transform: uppercase; +} +.Hero { + color: #fff; +} +.Hero h1 { + font-size: 2.625rem; + line-height: 1.125rem; +} +.Hero h2 { + font-size: 1.5rem; + font-weight: normal; + max-width: 29rem; +} +.Hero-gridContainer { + display: flex; + flex-direction: row; + flex-wrap: wrap; + margin: 0 auto; + max-width: 75.75rem; + padding: 2.625rem 1.5rem 0; +} +.Hero-actions { + align-items: center; + display: flex; + flex: 3 1; + flex-direction: column; + justify-content: center; + padding-right: 24px; +} +.Hero-actions a, +.Hero-actions a:visited, +.Hero-actions a:hover { + color: #fff; + max-width: 13.75rem; + padding: 1rem 0; + text-align: center; + text-decoration: underline; + margin: 0.5rem 0; +} +.Hero-actions a.Primary { + background-color: #fddd00; + border: 1px solid #fddd00; + border-radius: 4px; + margin: 1.3125rem 1.25rem 0; + height: 4rem; + width: 100%; + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.2); + color: #202224; + font-size: 1.5rem; + text-decoration: none; +} +.Hero-gopher { + display: flex; + flex: 2; + justify-content: flex-end; +} +.Hero-gopherLadder { + width: 153px; + height: 355px; + object-fit: cover; + object-position: 100% 0; +} +.Hero-blurb { + margin: auto; + flex: 0 0 100%; +} +@media only screen and (min-width: 57.7rem) { + .Hero-actions { + justify-content: initial; + flex: 1 1; + } + .Hero-actions a, + .Hero-actions a:visited, + .Hero-actions a:hover { + max-width: 17.5rem; + } + .Hero-blurb { + flex: 2 2; + margin: 0; + } + .Hero-gopher { + flex: 1; + } + .Hero-gopherLadder { + height: 358px; + width: 183px; + } + .Hero h2 { + max-width: 30rem; + } +} +.WhoUses-caseStudyList { + align-content: center; + display: flex; + flex: 0 0 100%; + flex-wrap: wrap; + justify-content: space-evenly; + list-style: none; + margin: 0; + padding: 0; +} +.WhoUses-caseStudy { + display: flex; + flex: 0 1 11.375rem; + justify-content: center; + margin: 1em; + min-height: 11.6875rem; +} +.WhoUses-caseStudy p { + margin-bottom: 0; +} +.WhoUses-caseStudy a:link, +.WhoUses-caseStudy a:visited { + border-radius: 10px; + box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.22); + color: #6e7072; + display: flex; + flex-direction: column; + height: 100%; + max-width: 11.375rem; + padding: 1rem; + text-align: center; + text-decoration: none; + width: 100%; +} +.WhoUses-logo { + margin: auto; + max-height: 120px; + max-width: 150px; +} +@media only screen and (min-width: 57.7rem) { + .WhoUses-caseStudy { + flex: 0 1 33%; + margin: 0; + } + .WhoUses-caseStudy a:link, + .WhoUses-caseStudy a:visited { + box-shadow: 0 2px 8px 0 transparent; + color: transparent; + } + .WhoUses-caseStudy a:link:hover, + .WhoUses-caseStudy a:visited:hover { + transition: all 0.2s ease-in-out; + box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.22); + color: #6e7072; + } +} +@media only screen and (min-width: 66.75rem) { + .WhoUses-caseStudy { + flex: 1; + } +} +.UseCases-gridContainer { + flex-direction: row; + justify-content: space-around; + margin: -1em 0 0 -1em; /* Offset gutters for the leftmost and top cells in the grid. */ +} +.UseCase { + flex: 1 0 15.625rem; + margin-top: 1rem; + max-width: 15.625rem; + padding: 1em 0 0 1em; /* Gutter between grid cells. */ +} +.UseCase-logo { + background: linear-gradient(10.64deg, #007d9c 0%, #00a29c 100%); + border-radius: 50%; + height: 3.75rem; + margin: auto; + width: 3.75rem; +} +.UseCase-title { + text-align: center; +} +.UseCase-action { + font-size: 1.125rem; + line-height: 2.5rem; + text-align: center; +} +.WhyGo-gridContainer { + align-items: center; + flex-direction: row; + justify-content: space-around; +} +.WhyGo-reasons { + flex: 2 2 50%; + list-style: none; + padding-left: 0; +} +.WhyGo-reason { + display: flex; + flex-direction: row; + margin-top: 1rem; + max-width: 31.25rem; + padding-right: 1em; +} +.WhyGo-reasonText { + margin-left: 1.25rem; +} +.WhyGo-reasonTitle { + font-size: 1.5rem; + line-height: 1.75rem; + margin: 0; +} +.WhyGo-reasonIcon { + background: linear-gradient(10.64deg, #007d9c 0%, #00a29c 100%); + border-radius: 50%; + color: white; + font-size: 1.4rem; + height: 1.5rem; + line-height: 1.4rem; + margin-top: .125rem; + min-width: 1.5rem; + text-align: center; + width: 1.5rem; +} +.WhyGo-gopher { + flex: 1 1 50%; + max-width: 28.4375rem; + text-align: center; +} +.WhyGo-gopher img { + width: 100%; +} +.LearnGo-subHeader { + display: flex; + justify-content: space-between; + width: 100%; +} +.LearnGo-subHeader h3 { + color: #6e7072; + font-size: 1rem; + font-weight: normal; +} +.LearnGo-viewMore a { + font-weight: 600; +} +.LearnGo-courses { + display: flex; + flex: 1 0 100%; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-around; + list-style: none; + margin: 0 0 1rem -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ + padding-left: 0; +} +@media only screen and (min-width: 72.75rem) { + .LearnGo-courses { + justify-content: space-between; + } +} +.LearnGo-courseItem { + align-items: center; + display: flex; + flex-wrap: wrap; + justify-content: center; + padding: 1rem 0 0 1rem; /* Gutter between grid cells. */ +} +.LearnGo-courseItem a { + color: #3e4042; +} +.LearnGo-courseTitle { + text-align: center; +} +.LearnGo-courseImage { + background-color: #fff; + border-radius: 0.3125rem; + box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); + height: 11rem; + max-width: 16.5rem; + width: 16.5rem; +} +.LearnGo-events { + background-color: #fff; + border: 0.0625rem solid rgba(155, 155, 155, 0.19); + border-radius: 0.3125rem; + box-shadow: 0 0.125rem 0.8125rem 0 rgba(0, 0, 0, 0.26); + flex: 1 0 100%; + list-style: none; + margin: 0.5rem 0 0; + padding: 0.5rem 0; + width: 100%; +} +.LearnGo-eventItem { + display: flex; + padding: 1rem 0; + margin: 0 1rem; +} +.LearnGo-eventItem + .LearnGo-eventItem { + border-top: 1px solid #e0e0e0; +} +.LearnGo-eventThumbnail { + background-color: #d8d8d8; + height: 3rem; + min-width: 3rem; + width: 3rem; +} +.LearnGo-eventBody { + flex: auto; + padding-left: 1rem; +} +.LearnGo-eventDate { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + width: 100%; +} +.LearnGo-eventDate p { + color: #6e7072; + margin: 0; +} +.LearnGo-eventName { + color: #007d9c; + font-size: 1.25rem; + font-weight: normal; + margin: 0; +} +.LearnGo-eventDescription { + -webkit-box-orient: vertical; /* See webkit-line-clamp */ + display: -webkit-box; /* See webkit-line-clamp */ + -webkit-line-clamp: 4; /* Elide flex text. webkit-line-clamp is broadly compatible with browsers. */ + overflow: hidden; + text-overflow: ellipsis; +} +.LearnGo-viewMore { + margin: 0; +} +@media only screen and (min-width: 57.7rem) { + .LearnGo-eventThumbnail { + height: 5.375rem; + min-width: 5.375rem; + width: 5.375rem; + } + .LearnGo-eventDate { + flex: 2; + flex-direction: column; + justify-content: center; + margin: 0 1rem; + min-width: 6rem; + } + .LearnGo-eventText { + display: flex; + flex: 2 1 23.4375rem; + flex-direction: column; + justify-content: space-around; + max-height: 5.375rem; + padding-right: 5rem; + } + .LearnGo-eventDescription { + -webkit-line-clamp: 2; /* see non-media-query definition. */ + margin: 0 0 0.5rem; + } + .LearnGo-viewMore { + align-self: center; + flex: 2; + text-align: right; + } + .LearnGo-eventBody { + display: flex; + flex-direction: row; + } + .LearnGo-eventItem { + padding: 1rem 0; + margin: 0 3rem; + } +} +.Footer-links { + display: flex; + flex-wrap: wrap; + margin-left: -6rem; +} +.Footer-linkColumn { + padding-left: 6rem; +} +a.Footer-link { + color: #fff; + display: flex; + flex: 1; + font-size: .875rem; + line-height: 2rem; +} diff --git a/go.dev/themes/default/layouts/_default/baseof.html b/go.dev/themes/default/layouts/_default/baseof.html index 3785f681..6b8c6931 100644 --- a/go.dev/themes/default/layouts/_default/baseof.html +++ b/go.dev/themes/default/layouts/_default/baseof.html @@ -5,7 +5,13 @@ - +{{$styles := resources.Get "css/styles.css" -}} +{{if .Site.IsServer -}} + +{{else -}} + {{$stylesFP := $styles | fingerprint -}} + +{{end -}} {{$.Site.Title}}
-
- {{block "main" .}}{{end}} -
+ {{block "main" .}}{{end}}

Events

-- cgit v1.3 From c0bdc74269ac4831b34e3b76a6c09968e431c62d Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Fri, 27 Sep 2019 16:29:59 -0400 Subject: [x/go.dev] learn,home: add event layout, data, and styling This adds event data from global Go meetups. Structurally, the content on the homepage and the learn page are the same, but the styling is somewhat different. X-GoDev-Commit: 88a6cc582da282c21193916489463b3b29d8c87f --- go.dev/data/events.yaml | 219 +++++++++++++++++++++++ go.dev/themes/default/assets/css/styles.css | 131 +++++++++++++- go.dev/themes/default/layouts/index.html | 84 +++------ go.dev/themes/default/layouts/learn/section.html | 36 ++++ 4 files changed, 405 insertions(+), 65 deletions(-) create mode 100644 go.dev/data/events.yaml diff --git a/go.dev/data/events.yaml b/go.dev/data/events.yaml new file mode 100644 index 00000000..53b145a2 --- /dev/null +++ b/go.dev/data/events.yaml @@ -0,0 +1,219 @@ +# DO NOT EDIT: Autogenerated from cmd/events. +all: +- city: Pune + country: India + description: |- + WWG Pune is a chapter of Women Who Go.
+ We built this meetup to provide a better entry point to women who are interested in Go. We also want to provide a safe space for networking, learning and finding mentors. This group shall bring us together so we can continue to grow in Go.

+

+ Even though any person can attend this meetup regardless of gender, we wish to empower the less-represented developers of the programming community.
+

+ We would love for you to speak at Women Who Go! DM us at @wwg_pune about a short talk, demo, or whatever you have in mind! + id: "265180374" + local_date: Sep 28, 2019 + local_time: "2019-09-28T10:00:00+05:30" + localizedcountry: India + localizedlocation: Pune, India + name: Learning Golang Part 2 - Mastering the basics of Go + state: "" + thumbnailurl: "" + url: https://www.meetup.com/wwg_pune/events/265180374 +- city: Paris + country: France + description: |- + This is the Paris Chapter of Women Who Go: http://www.meetup.com/Women-Who-Go/ This group is an inclusive space for everyone.
+ This group is for you if any of the following:
1. You identify as a woman, publicly or privately. 2. You have some interest in the Go programming language, or programming in general. + id: "264458143" + local_date: Sep 28, 2019 + local_time: "2019-09-28T10:00:00+02:00" + localizedcountry: France + localizedlocation: Paris, France + name: 'Workshop - Production ready cloud-native services with Go and Kubernetes ' + state: "" + thumbnailurl: https://secure.meetupstatic.com/photos/event/2/d/3/b/thumb_480491579.jpeg + url: https://www.meetup.com/Women-Who-Go-Paris/events/264458143 +- city: Chennai + country: India + description: |- + A group for anyone using (want to use) golang for programming and development of software or engineering applications.
+ We are on slack #chennaigolang + id: "264717526" + local_date: Sep 28, 2019 + local_time: "2019-09-28T14:00:00+05:30" + localizedcountry: India + localizedlocation: Chennai, India + name: September Go Meetup + state: "" + thumbnailurl: https://secure.meetupstatic.com/photos/event/9/1/b/e/thumb_449917310.jpeg + url: https://www.meetup.com/Chennai-golang-Meetup/events/264717526 +- city: Delhi + country: India + description: |- + You do not need to know Go, be a professional developer or enjoy talking to strangers in order to come hang out with us!
+ This group is for you if you are interested in Go, and are looking for a safe space to learn. Membership is restricted to women and gender minorities.
+ We would love for you to speak at Women Who Go! Contact delhi@womenwhogo.org about a short talk, demo, or whatever you have in mind! + id: "265075250" + local_date: Sep 29, 2019 + local_time: "2019-09-29T09:30:00+05:30" + localizedcountry: India + localizedlocation: Delhi, India + name: 'DevFest ' + state: "" + thumbnailurl: "" + url: https://www.meetup.com/New-Delhi-Women-Who-Go/events/265075250 +- city: London + country: United Kingdom + description: |- + The London Gophers Study Group is a London-based community for people that would like to study the Go programming language in a supportive environment. We are a sister group to the LondonGophers.
+ For more information see our README.
+ We follow the Go Code of Conduct, in summary:
+ - Treat everyone with respect and kindness.
- Be thoughtful in how you communicate.
- Don’t be destructive or inflammatory. + id: "264953347" + local_date: Oct 1, 2019 + local_time: "2019-10-01T18:30:00+01:00" + localizedcountry: United Kingdom + localizedlocation: London, United Kingdom + name: September Go Study Group hosted by Cloudreach + state: "" + thumbnailurl: https://secure.meetupstatic.com/photos/event/5/0/1/8/thumb_480620504.jpeg + url: https://www.meetup.com/LondonGophersStudyGroup/events/264953347 +- city: Eugene + country: USA + description: |- + All Gophers and curious software professionals are welcome to come discuss Go and related topics.
+ Go is a Google-funded language for massively-scalable distributed systems that is statically typed and compiled. It has quickly stabilized and is running head-to-head with C++, Java, C#, etc. (The Computer Language Benchmarks Game - Go). However, a larger-than-expected portion of new Gophers is made up of dynamic/interpreted language users who tend to be seeking relief from the cruft in their current languages and/or a more clear future within the horizontally-growing landscape of modern computing.
+ If you're building web apps, designing APIs, thrive on scalability, or you're simply curious about this fun new(ish) language, let's meetup.
+ • Meetup resources are available at www.euggo.org  + id: wttfjryznbcb + local_date: Oct 1, 2019 + local_time: "2019-10-01T12:00:00-07:00" + localizedcountry: USA + localizedlocation: Eugene, OR + name: Book Club + state: OR + thumbnailurl: https://secure.meetupstatic.com/photos/event/2/8/1/thumb_453660641.jpeg + url: https://www.meetup.com/EUG-Go/events/wttfjryznbcb +- city: Baltimore + country: USA + description: If you're interested in the Go Programming Language (aka Golang), + newbie, experienced or just curious, this is the meetup for you. We're an + inclusive group that aims for diversity in our membership, the talks we select + every month and your ideas for making this group thrive. Let's build an awesome + Go community in the Baltimore Metro Area. + id: twgcdqyznbcb + local_date: Oct 1, 2019 + local_time: "2019-10-01T18:30:00-04:00" + localizedcountry: USA + localizedlocation: Baltimore, MD + name: Baltimore Go Monthly Meeting + state: MD + thumbnailurl: https://secure.meetupstatic.com/photos/event/6/0/c/c/thumb_452184780.jpeg + url: https://www.meetup.com/BaltimoreGolang/events/twgcdqyznbcb +- city: Lehi + country: USA + description: |- + Join us on Slack!
+ The Utah Go User Group (#UTGO) is a community of people interested in software development and Google's Go programming language (Golang). Everyone is welcome.  We currently meet in Lehi. To discuss and vote on topic ideas, go to https://github.com/forgeutah/utah-go
+
+ id: wjdlfryznbcb + local_date: Oct 1, 2019 + local_time: "2019-10-01T18:15:00-06:00" + localizedcountry: USA + localizedlocation: Lehi, UT + name: More than you ever wanted to know about errors + state: UT + thumbnailurl: https://secure.meetupstatic.com/photos/event/c/d/0/7/thumb_452692487.jpeg + url: https://www.meetup.com/utahgophers/events/wjdlfryznbcb +- city: Stockholm + country: Sweden + description: |- + A group intended to enable golang nuts from Stockholm to meet up and share experiences. Join if you are interested in meeting other golang nuts for informal presentations and possibly even beer and pizza.
+ To email the group about relevant topics such as Go or recruiting Go developers, send to Go-Stockholm-list@meetup.com
+ Gopher originally drawn by Renée French.

+ Slack
+ Join us in the #stockholm channel on the Gophers Slack: https://invite.slack.golangbridge.org/

+ Code of Conduct
+ Go Stockholm operate under the Go Community Code of Conduct.
+ id: "262412256" + local_date: Oct 2, 2019 + local_time: "2019-10-02T17:30:00+02:00" + localizedcountry: Sweden + localizedlocation: Stockholm, Sweden + name: Go Meetup at Einride + state: "" + thumbnailurl: https://secure.meetupstatic.com/photos/event/b/f/2/3/thumb_463728931.jpeg + url: https://www.meetup.com/Go-Stockholm/events/262412256 +- city: Sheffield + country: United Kingdom + description: |- + We meet the first Thursday of every month to discuss interesting topics about the Go programming language.
+
+ id: "264783401" + local_date: Oct 3, 2019 + local_time: "2019-10-03T18:00:00+01:00" + localizedcountry: United Kingdom + localizedlocation: Sheffield, United Kingdom + name: GoSheffield - October + state: "" + thumbnailurl: "" + url: https://www.meetup.com/GoSheffield/events/264783401 +- city: Kyiv + country: Ukraine + description: Kyiv meetups for gophers. Let's share our experience! + id: "264614585" + local_date: Oct 4, 2019 + local_time: "2019-10-04T19:00:00+03:00" + localizedcountry: Ukraine + localizedlocation: Kyiv, Ukraine + name: Kyiv Go Meetup September 2019 + state: "" + thumbnailurl: "" + url: https://www.meetup.com/uagolang/events/264614585 +- city: Oslo + country: Norway + description: |- + Go Oslo User Group was founded in 2018 and is a community open for everyone interested in go, at all levels.
+ Beginner and veteran gophers gather to watch presentations, participate in workshops, eat and drink.
+

+ Welcome!
+ + id: "265143218" + local_date: Oct 9, 2019 + local_time: "2019-10-09T18:00:00+02:00" + localizedcountry: Norway + localizedlocation: Oslo, Norway + name: Go Oslo User Group October 2019 + state: "" + thumbnailurl: "" + url: https://www.meetup.com/Go-Oslo-User-Group/events/265143218 +- city: Berlin + country: Germany + description: |- + We are a group of Golang users. Our aim is to meet like minded people, share our experience with others and to promote the use of Go.
+ As Gophers and as Berliners, even if just visiting, we follow the Code of Conduct to make this a pleasant and inclusive environment for everyone:

+ https://golang.org/conduct
http://berlincodeofconduct.org
+ Follow us on twitter: @GDGBerlinGolang + id: "259852469" + local_date: Oct 9, 2019 + local_time: "2019-10-09T19:00:00+02:00" + localizedcountry: Germany + localizedlocation: Berlin, Germany + name: October Golang meetup + state: "" + thumbnailurl: https://secure.meetupstatic.com/photos/event/9/8/b/1/thumb_465459089.jpeg + url: https://www.meetup.com/golang-users-berlin/events/259852469 +- city: Manchester + country: United Kingdom + description: 'This is a group for anyone interested in the Go Programming language. + All skills levels are welcome: we'll explore blueprints, how-tos and build + some sample applications. Above all, this group is for sharing know-how and best-practices + among the community.' + id: tcljtqyznbmb + local_date: Oct 9, 2019 + local_time: "2019-10-09T18:30:00+01:00" + localizedcountry: United Kingdom + localizedlocation: Manchester, United Kingdom + name: Manchester Go meetup + state: "" + thumbnailurl: https://secure.meetupstatic.com/photos/event/e/4/7/e/thumb_455218494.jpeg + url: https://www.meetup.com/golang-mcr/events/tcljtqyznbmb diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index b5acf91a..ec0d7b76 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -496,11 +496,20 @@ a:hover { border-top: 1px solid #e0e0e0; } .LearnGo-eventThumbnail { - background-color: #d8d8d8; + align-content: center; + display: flex; height: 3rem; min-width: 3rem; width: 3rem; } +.LearnGo-eventThumbnail--noimage { + background-color: #d8d8d8; +} +.LearnGo-eventThumbnail img { + margin: auto; + max-height: 100%; + max-width: 100%; +} .LearnGo-eventBody { flex: auto; padding-left: 1rem; @@ -520,6 +529,10 @@ a:hover { font-size: 1.25rem; font-weight: normal; margin: 0; + max-width: 30rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .LearnGo-eventDescription { -webkit-box-orient: vertical; /* See webkit-line-clamp */ @@ -590,9 +603,17 @@ a.Footer-link { .Learn-books, .Learn-guided, .Learn-inPersonTraining, +.Learn-meetups, .Learn-online { padding: 0 1.5rem; } +.Learn-books, +.Learn-guided, +.Learn-inPersonTraining, +.Learn-meetups, +.Learn-online { + margin: 4rem 0; +} .Learn-title h1 { font-size: 2.625rem; line-height: 3rem; @@ -662,7 +683,6 @@ a.Footer-link { .Learn-subHeader { display: flex; justify-content: space-between; - margin-top: 1.5rem; width: 100%; } .Learn-viewMore { @@ -724,11 +744,11 @@ a.Footer-link { padding-left: 0; } .Learn-inPerson { + border-bottom: 1px solid #e0e0e0; flex: 1 1 500px; - margin: 0rem 0 0 1rem; /* Gutter between grid cells. */ + margin: 0 0 0 1rem; /* Gutter between grid cells. */ max-width: 31rem; padding-bottom: 1.25rem; - border-bottom: 1px solid #e0e0e0; } .Learn-inPerson:nth-child(1), .Learn-inPerson:nth-child(2) { @@ -740,3 +760,106 @@ a.Footer-link { .Learn-inPersonBlurb { margin: 0; } +.Learn-events { + flex: 1 0 100%; + list-style: none; + margin: 0.5rem 0 0; + padding: 0; + width: 100%; + border-top: 1px solid #e0e0e0; + border-bottom: 1px solid #e0e0e0; +} +.Learn-eventItem { + display: flex; + padding: 1rem 0; +} +.Learn-eventItem + .Learn-eventItem { + border-top: 1px solid #e0e0e0; +} +.Learn-eventThumbnail { + align-content: center; + display: flex; + height: 3rem; + min-width: 3rem; + width: 3rem; +} +.Learn-eventThumbnail--noimage { + background-color: #d8d8d8; +} +.Learn-eventThumbnail img { + margin: auto; + max-height: 100%; + max-width: 100%; +} +.Learn-eventBody { + flex: auto; + padding-left: 1rem; +} +.Learn-eventDate { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + width: 100%; +} +.Learn-eventDate p { + color: #6e7072; + margin: 0; +} +.Learn-eventName { + color: #007d9c; + font-size: 1.25rem; + font-weight: normal; + margin: 0; + max-width: 30rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.Learn-eventDescription { + -webkit-box-orient: vertical; /* See webkit-line-clamp */ + display: -webkit-box; /* See webkit-line-clamp */ + -webkit-line-clamp: 4; /* Elide flex text. webkit-line-clamp is broadly compatible with browsers. */ + overflow: hidden; + text-overflow: ellipsis; +} +.Learn-viewMore { + margin: 0; +} +@media only screen and (min-width: 57.7rem) { + .Learn-eventThumbnail { + height: 5.375rem; + min-width: 5.375rem; + width: 5.375rem; + } + .Learn-eventDate { + flex: 2; + flex-direction: column; + justify-content: center; + margin: 0 1rem; + min-width: 6rem; + } + .Learn-eventText { + display: flex; + flex: 2 1 23.4375rem; + flex-direction: column; + justify-content: space-around; + max-height: 5.375rem; + padding-right: 5rem; + } + .Learn-eventDescription { + -webkit-line-clamp: 2; /* see non-media-query definition. */ + margin: 0 0 0.5rem; + } + .Learn-viewMore { + align-self: center; + flex: 2; + text-align: right; + } + .Learn-eventBody { + display: flex; + flex-direction: row; + } + .Learn-eventItem { + padding: 1rem 0; + } +} diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index 5ed7cf35..6fa06154 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -182,71 +182,33 @@
    -
  • -
    -
    -
    -

    May Tue 08

    -

    London, U.K.

    + {{range first 3 $.Site.Data.events.all}} +
  • +
    + {{if .thumbnailurl}} + {{.name}} group photo. + {{end}}
    -
    -

    - Meetup Name -

    -

    - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt... -

    -
    -

    Learn more >

    -
- -
  • -
    -
    -
    -

    May Tue 08

    -

    London, U.K.

    -
    -
    -

    - Meetup Name -

    -

    - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et - dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex - ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu - fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt - mollit anim id est laborum. -

    -
    -

    Learn more >

    -
    -
  • -
  • -
    -
    -
    -

    May Tue 08

    -

    London, U.K.

    -
    -
    -

    - Meetup Name -

    -

    - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et - dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex - ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu - fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt - mollit anim id est laborum. -

    +
    +
    +

    {{.local_date}}

    +

    {{.city}}, {{.state}} {{.country}}

    +
    +
    +

    + {{.name}} +

    +

    + {{.description | safeHTML}} +

    +
    +

    Learn more >

    -

    Learn more >

    -
    -
  • + + {{end}} diff --git a/go.dev/themes/default/layouts/learn/section.html b/go.dev/themes/default/layouts/learn/section.html index 7fe94fbf..4086f14d 100644 --- a/go.dev/themes/default/layouts/learn/section.html +++ b/go.dev/themes/default/layouts/learn/section.html @@ -129,4 +129,40 @@ +
    +
    +
    +

    Meetups

    +

    + View More > +

    +
    +
      + {{range first 3 $.Site.Data.events.all}} +
    • +
      + {{if .thumbnailurl}} + {{.name}} group photo. + {{end}} +
      +
      +
      +

      {{.local_date}}

      +

      {{.city}}, {{.state}} {{.country}}

      +
      +
      +

      + {{.name}} +

      +

      + {{.description | safeHTML}} +

      +
      +

      Learn more >

      +
      +
    • + {{end}} +
    +
    +
    {{end}} -- cgit v1.3 From fcf51080721f0715879f3334caa26edf2f4d0c64 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Mon, 30 Sep 2019 17:03:47 -0400 Subject: [x/go.dev] all: remove firebase configuration from cloudbuild X-GoDev-Commit: 8b065d69de743a3e1150d29d297bc1fa35c11146 --- go.dev/app.yaml | 2 +- go.dev/cloudbuild.yaml | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/go.dev/app.yaml b/go.dev/app.yaml index 3e81af6e..e61c436c 100644 --- a/go.dev/app.yaml +++ b/go.dev/app.yaml @@ -1,7 +1,7 @@ runtime: python27 api_version: 1 threadsafe: true -service: go-dev-dev +service: go-dev handlers: - url: / diff --git a/go.dev/cloudbuild.yaml b/go.dev/cloudbuild.yaml index f52f839f..3728262b 100644 --- a/go.dev/cloudbuild.yaml +++ b/go.dev/cloudbuild.yaml @@ -1,21 +1,8 @@ steps: - - name: 'gcr.io/cloud-builders/docker' - args: ['build', '-f', 'Dockerfile.firebase', '-t', 'gcr.io/$PROJECT_ID/firebase', '.'] - name: 'gcr.io/cloud-builders/docker' args: ['build', '-f', 'Dockerfile.hugo', '-t', 'gcr.io/$PROJECT_ID/hugo', '.'] - name: 'gcr.io/$PROJECT_ID/hugo' - - name: 'gcr.io/$PROJECT_ID/firebase' - entrypoint: 'bash' - args: ['-c', 'firebase deploy -P $$PROJECT_ID --token $$FIREBASE_TOKEN'] - env: - - 'PROJECT_ID=$PROJECT_ID' - secretEnv: ['FIREBASE_TOKEN'] - name: "gcr.io/cloud-builders/gcloud" args: ["app", "deploy"] images: - - 'gcr.io/$PROJECT_ID/firebase' - 'gcr.io/$PROJECT_ID/hugo' -secrets: - - kmsKeyName: projects/go-dev-staging/locations/global/keyRings/default-ring/cryptoKeys/default-key - secretEnv: - FIREBASE_TOKEN: CiQACK2Cxmn6y6EYHlC2RF3D0tNSYx21qYOhYtJlxhnXEIC3QrkSVQA78cuPO23Kod2ov2uE7ud7O3Wul64INE3X/NMZfS/xe3CvdoM/i3tDx8WB8rHVB4rJkZE4jFCF0iM10FazcR8dXXAj9Wb7bvH6e1gGUQyUb2tpZXk= -- cgit v1.3 From 65efa542756e1020ce0f44886f8ec2f456b4a34c Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Wed, 2 Oct 2019 14:51:42 -0400 Subject: [x/go.dev] all: render nested index.html pages on appengine This change allows requests like /post or /learn to render the appropriate index.html file, while still being able to return files from the css and images directory. X-GoDev-Commit: e5eab4362ab3c9d3399db32d64a7a90a8eb6a8ea --- go.dev/app.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/go.dev/app.yaml b/go.dev/app.yaml index e61c436c..9227cf26 100644 --- a/go.dev/app.yaml +++ b/go.dev/app.yaml @@ -8,6 +8,13 @@ handlers: static_files: public/index.html upload: public/index.html -- url: /(.*) - static_files: public/\1 +# Special for static content so we do not try to append index.html to their paths. +- url: /(css|images)/(.*) + static_files: public/\1/\2 upload: public/(.*) + +# Handle arbitrary paths with an index.html +- url: /(.*) + static_files: public/\1/index.html + upload: public/(.*)/index.html + -- cgit v1.3 From 91be25e947fcb249dc57f70a5e10dd56d0596d94 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Fri, 27 Sep 2019 17:02:47 -0400 Subject: [x/go.dev] cmd/events: add utility for updating event content Adds a command to update event.yaml for rendering events in our Home and Learn pages. Times are rendered in the local time for the event. X-GoDev-Commit: 1e492202bb964c17b8a087c54019da84ff7ed3f2 --- go.dev/cmd/events/main.go | 302 +++++++++++++++++++++++++++++++++++++++++ go.dev/cmd/events/main_test.go | 66 +++++++++ go.dev/data/events.yaml | 152 ++++++++++++--------- go.dev/go.mod | 9 ++ go.dev/go.sum | 10 ++ 5 files changed, 478 insertions(+), 61 deletions(-) create mode 100644 go.dev/cmd/events/main.go create mode 100644 go.dev/cmd/events/main_test.go create mode 100644 go.dev/go.mod create mode 100644 go.dev/go.sum diff --git a/go.dev/cmd/events/main.go b/go.dev/cmd/events/main.go new file mode 100644 index 00000000..e2e97116 --- /dev/null +++ b/go.dev/cmd/events/main.go @@ -0,0 +1,302 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +package main + +import ( + "encoding/json" + "fmt" + "log" + "net/http" + "os" + "path" + "strings" + "time" + + "github.com/microcosm-cc/bluemonday" + "gopkg.in/yaml.v2" +) + +const ( + // eventLimit is the maximum number of events that will be output. + eventLimit = 15 + // groupsSummaryPath is an API endpoint that returns global Go groups. + // Fetching from this API path allows to sort groups by next upcoming event. + groupsSummaryPath = "/pro/go/es_groups_summary?location=global&order=next_event&desc=false" + // eventsHeader is a header comment for the output content. + eventsHeader = `# DO NOT EDIT: Autogenerated from cmd/events. +# To update, run: +# go run github.com/godevsite/go.dev/cmd/events > data/events.yaml` +) + +func main() { + c := &meetupAPI{ + baseURL: "https://api.meetup.com", + } + ue, err := getUpcomingEvents(c) + if err != nil { + log.Fatal(err) + } + printYAML(ue) +} + +type client interface { + getGroupsSummary() (*GroupsSummary, error) + getGroup(urlName string) (*Group, error) +} + +// getUpcomingEvents returns upcoming events globally. +func getUpcomingEvents(c client) (*UpcomingEvents, error) { + summary, err := c.getGroupsSummary() + if err != nil { + return nil, err + } + p := bluemonday.NewPolicy() + p.AllowStandardURLs() + p.AllowAttrs("href").OnElements("a") + p.AllowElements("br") + // Work around messy newlines in content. + r := strings.NewReplacer("\n", "
    \n", "<br>", "
    \n") + var events []EventData + for _, chapter := range summary.Chapters { + if len(events) >= eventLimit { + break + } + group, err := c.getGroup(chapter.URLName) + if err != nil || group.NextEvent == nil { + continue + } + tz, err := time.LoadLocation(group.Timezone) + if err != nil { + tz = time.UTC + } + // group.NextEvent.Time is in milliseconds since UTC epoch. + nextEventTime := time.Unix(group.NextEvent.Time/1000, 0).In(tz) + events = append(events, EventData{ + City: chapter.City, + Country: chapter.Country, + Description: r.Replace(p.Sanitize(chapter.Description)), // Event descriptions are often blank, use Group description. + ID: group.NextEvent.ID, + LocalDate: nextEventTime.Format("Jan 2, 2006"), + LocalTime: nextEventTime.Format(time.RFC3339), + LocalizedCountry: group.LocalizedCountryName, + LocalizedLocation: group.LocalizedLocation, + Name: group.NextEvent.Name, + State: chapter.State, + ThumbnailURL: chapter.GroupPhoto.ThumbLink, + URL: "https://www.meetup.com/" + path.Join(chapter.URLName, "events", group.NextEvent.ID), + }) + } + return &UpcomingEvents{All: events}, nil +} + +type meetupAPI struct { + baseURL string +} + +func (c *meetupAPI) getGroupsSummary() (*GroupsSummary, error) { + resp, err := http.Get(c.baseURL + groupsSummaryPath) + if err != nil { + return nil, fmt.Errorf("failed to get events from %q: %v", groupsSummaryPath, err) + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + return nil, fmt.Errorf("failed to get events from %q: %v", groupsSummaryPath, resp.Status) + } + var summary *GroupsSummary + d := json.NewDecoder(resp.Body) + if err := d.Decode(&summary); err != nil { + return summary, fmt.Errorf("failed to decode events from %q: %w", groupsSummaryPath, err) + } + return summary, nil +} + +// getGroup fetches group details, which are useful for getting details of the next upcoming event, and timezones. +func (c *meetupAPI) getGroup(urlName string) (*Group, error) { + u := c.baseURL + "/" + urlName + resp, err := http.Get(u) + if err != nil { + return nil, fmt.Errorf("failed to fetch group details from %q: %w", u, err) + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + return nil, fmt.Errorf("failed to fetch group details from %q: %v", u, resp.Status) + } + + var group Group + d := json.NewDecoder(resp.Body) + if err := d.Decode(&group); err != nil { + return nil, fmt.Errorf("failed to decode group from %q: %w", u, err) + } + return &group, nil +} + +func printYAML(v interface{}) { + fmt.Println(eventsHeader) + e := yaml.NewEncoder(os.Stdout) + defer e.Close() + if err := e.Encode(v); err != nil { + log.Fatalf("failed to encode event yaml: %v", err) + } +} + +// UpcomingEvents is a list of EventData written out to YAML for rendering in Hugo. +type UpcomingEvents struct { + All []EventData +} + +// EventData is the structure written out to YAML for rendering in Hugo. +type EventData struct { + City string + Country string + Description string + ID string + LocalDate string `yaml:"local_date"` + LocalTime string `yaml:"local_time"` + LocalizedCountry string + LocalizedLocation string + Name string + State string + ThumbnailURL string + URL string +} + +// GroupsSummary is the structure returned from /pro/go/es_groups_summary. +type GroupsSummary struct { + Chapters []*Chapter +} + +type Event struct { + Created int `json:"created"` + Description string `json:"description"` + Duration int `json:"duration"` + Fee *Fee `json:"fee"` + Group *Group `json:"group"` + LocalDate string `json:"local_date"` + LocalTime string `json:"local_time"` + ID string `json:"id"` + Link string `json:"link"` + Name string `json:"name"` + RSVPLimit int `json:"rsvp_limit"` + Status string `json:"status"` + Time int64 `json:"time"` + UTCOffset int `json:"utc_offset"` + Updated int `json:"updated"` + Venue *Venue `json:"venue"` + WaitlistCount int `json:"waitlist_count"` + YesRSVPCount int `json:"yes_rsvp_count"` +} + +type Venue struct { + Address1 string `json:"address_1"` + Address2 string `json:"address_2"` + Address3 string `json:"address_3"` + City string `json:"city"` + Country string `json:"country"` + ID int `json:"id"` + Lat float64 `json:"lat"` + LocalizedCountryName string `json:"localized_country_name"` + Lon float64 `json:"lon"` + Name string `json:"name"` + Repinned bool `json:"repinned"` + State string `json:"state"` + Zip string `json:"zip"` +} + +type Group struct { + Country string `json:"country"` + Created int `json:"created"` + Description string `json:"description"` + ID int `json:"id"` + JoinMode string `json:"join_mode"` + Lat float64 `json:"lat"` + LocalizedLocation string `json:"localized_location"` + LocalizedCountryName string `json:"localized_country_name"` + Lon float64 `json:"lon"` + Name string `json:"name"` + NextEvent *Event `json:"next_event"` + Region string `json:"region"` + Timezone string `json:"timezone"` + URLName string `json:"urlname"` + Who string `json:"who"` +} + +type Fee struct { + Accepts string `json:"accepts"` + Amount float64 `json:"amount"` + Currency string `json:"currency"` + Description string `json:"description"` + Label string `json:"label"` + Required bool `json:"required"` +} + +type Chapter struct { + AverageAge float64 `json:"average_age"` + Category []Category `json:"category"` + City string `json:"city"` + Country string `json:"country"` + Description string `json:"description"` + FoundedDate int64 `json:"founded_date"` + GenderFemale float64 `json:"gender_female"` + GenderMale float64 `json:"gender_male"` + GenderOther float64 `json:"gender_other"` + GenderUnknown float64 `json:"gender_unknown"` + GroupPhoto GroupPhoto `json:"group_photo"` + ID int `json:"id"` + LastEvent int64 `json:"last_event"` + Lat float64 `json:"lat"` + Lon float64 `json:"lon"` + MemberCount int `json:"member_count"` + Name string `json:"name"` + NextEvent int64 `json:"next_event"` + OrganizerPhoto OrganizerPhoto `json:"organizer_photo"` + Organizers []Organizer `json:"organizers"` + PastEvents int `json:"past_events"` + PastRSVPs int `json:"past_rsvps"` + ProJoinDate int64 `json:"pro_join_date"` + RSVPsPerEvent float64 `json:"rsvps_per_event"` + RepeatRSVPers int `json:"repeat_rsvpers"` + State string `json:"state"` + Status string `json:"status"` + Topics []Topic `json:"topics"` + URLName string `json:"urlname"` + UpcomingEvents int `json:"upcoming_events"` +} + +type Topic struct { + ID int `json:"id"` + Name string `json:"name"` + URLkey string `json:"urlkey"` + Lang string `json:"lang"` +} + +type Category struct { + ID int `json:"id"` + Name string `json:"name"` + Shortname string `json:"shortname"` + SortName string `json:"sort_name"` +} + +type Organizer struct { + Name string `json:"name"` + MemberID int `json:"member_id"` + Permission string `json:"permission"` +} + +type OrganizerPhoto struct { + BaseURL string `json:"base_url"` + HighresLink string `json:"highres_link"` + ID int `json:"id"` + PhotoLink string `json:"photo_link"` + ThumbLink string `json:"thumb_link"` + Type string `json:"type"` +} + +type GroupPhoto struct { + BaseURL string `json:"base_url"` + HighresLink string `json:"highres_link"` + ID int `json:"id"` + PhotoLink string `json:"photo_link"` + ThumbLink string `json:"thumb_link"` + Type string `json:"type"` +} diff --git a/go.dev/cmd/events/main_test.go b/go.dev/cmd/events/main_test.go new file mode 100644 index 00000000..4f729b21 --- /dev/null +++ b/go.dev/cmd/events/main_test.go @@ -0,0 +1,66 @@ +package main + +import ( + "fmt" + "testing" + + "github.com/google/go-cmp/cmp" +) + +var ( + noEventGroup = &Group{Name: "no event group"} + upcomingEventGroup = &Group{ + Name: "Upcoming Event Group", + Timezone: "Europe/Oslo", + NextEvent: &Event{ + ID: "12345", + Name: "Upcoming Event", + Time: 1262976000000, + }, + } + fakeGroups = map[string]*Group{ + "noEvent": noEventGroup, + "ueg": upcomingEventGroup, + } +) + +type fakeClient struct{} + +func (f fakeClient) getGroupsSummary() (*GroupsSummary, error) { + return &GroupsSummary{Chapters: []*Chapter{ + {URLName: "noEvent"}, + { + URLName: "ueg", + Description: "We host our own events\n", + }, + }}, nil +} + +func (f fakeClient) getGroup(urlName string) (*Group, error) { + g, ok := fakeGroups[urlName] + if !ok { + return nil, fmt.Errorf("no group %q", urlName) + } + return g, nil +} + +func TestGetUpcomingEvents(t *testing.T) { + want := &UpcomingEvents{All: []EventData{ + { + Name: "Upcoming Event", + ID: "12345", + Description: "We host our own events
    \n", + LocalDate: "Jan 8, 2010", + LocalTime: "2010-01-08T19:40:00+01:00", + URL: "https://www.meetup.com/ueg/events/12345", + }, + }} + f := fakeClient{} + got, err := getUpcomingEvents(f) + if err != nil { + t.Fatalf("getUpcomingEvents(%v) error = %v, wanted no error", f, err) + } + if diff := cmp.Diff(want, got); diff != "" { + t.Errorf("getUpcomingEvents(%v) mismatch (-want +got):\n%s", f, diff) + } +} diff --git a/go.dev/data/events.yaml b/go.dev/data/events.yaml index 53b145a2..ba9ac3cd 100644 --- a/go.dev/data/events.yaml +++ b/go.dev/data/events.yaml @@ -1,66 +1,7 @@ # DO NOT EDIT: Autogenerated from cmd/events. +# To update, run: +# go run github.com/godevsite/go.dev/cmd/events > data/events.yaml all: -- city: Pune - country: India - description: |- - WWG Pune is a chapter of Women Who Go.
    - We built this meetup to provide a better entry point to women who are interested in Go. We also want to provide a safe space for networking, learning and finding mentors. This group shall bring us together so we can continue to grow in Go.

    -

    - Even though any person can attend this meetup regardless of gender, we wish to empower the less-represented developers of the programming community.
    -

    - We would love for you to speak at Women Who Go! DM us at @wwg_pune about a short talk, demo, or whatever you have in mind! - id: "265180374" - local_date: Sep 28, 2019 - local_time: "2019-09-28T10:00:00+05:30" - localizedcountry: India - localizedlocation: Pune, India - name: Learning Golang Part 2 - Mastering the basics of Go - state: "" - thumbnailurl: "" - url: https://www.meetup.com/wwg_pune/events/265180374 -- city: Paris - country: France - description: |- - This is the Paris Chapter of Women Who Go: http://www.meetup.com/Women-Who-Go/ This group is an inclusive space for everyone.
    - This group is for you if any of the following:
    1. You identify as a woman, publicly or privately. 2. You have some interest in the Go programming language, or programming in general. - id: "264458143" - local_date: Sep 28, 2019 - local_time: "2019-09-28T10:00:00+02:00" - localizedcountry: France - localizedlocation: Paris, France - name: 'Workshop - Production ready cloud-native services with Go and Kubernetes ' - state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/2/d/3/b/thumb_480491579.jpeg - url: https://www.meetup.com/Women-Who-Go-Paris/events/264458143 -- city: Chennai - country: India - description: |- - A group for anyone using (want to use) golang for programming and development of software or engineering applications.
    - We are on slack #chennaigolang - id: "264717526" - local_date: Sep 28, 2019 - local_time: "2019-09-28T14:00:00+05:30" - localizedcountry: India - localizedlocation: Chennai, India - name: September Go Meetup - state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/9/1/b/e/thumb_449917310.jpeg - url: https://www.meetup.com/Chennai-golang-Meetup/events/264717526 -- city: Delhi - country: India - description: |- - You do not need to know Go, be a professional developer or enjoy talking to strangers in order to come hang out with us!
    - This group is for you if you are interested in Go, and are looking for a safe space to learn. Membership is restricted to women and gender minorities.
    - We would love for you to speak at Women Who Go! Contact delhi@womenwhogo.org about a short talk, demo, or whatever you have in mind! - id: "265075250" - local_date: Sep 29, 2019 - local_time: "2019-09-29T09:30:00+05:30" - localizedcountry: India - localizedlocation: Delhi, India - name: 'DevFest ' - state: "" - thumbnailurl: "" - url: https://www.meetup.com/New-Delhi-Women-Who-Go/events/265075250 - city: London country: United Kingdom description: |- @@ -217,3 +158,92 @@ all: state: "" thumbnailurl: https://secure.meetupstatic.com/photos/event/e/4/7/e/thumb_455218494.jpeg url: https://www.meetup.com/golang-mcr/events/tcljtqyznbmb +- city: Seattle + country: USA + description: |- + The Seattle Go User Group is a community for anyone interested in the Go programming language. 

    +

    + We provide opportunities to:
    + • Discuss Go and related topics 
    + • Socialize with people who are interested in Go
    + • Find or fill Go-related jobs 
    +

    + If you want to chat all things Go, feel free to join us on the Gopher slack. 
    + Invites can be found at https://invite.slack.golangbridge.org
    + There is a #seattle channel which can be joined by anyone, so come say hi!
    +

    + Our aim is to be a welcoming environment. As such all attendees, organizers and sponsors are required to follow the code of conduct. + id: dpshmpyznbmb + local_date: Oct 9, 2019 + local_time: "2019-10-09T13:00:00-07:00" + localizedcountry: USA + localizedlocation: Seattle, WA + name: Eastside Go Coffee + state: WA + thumbnailurl: https://secure.meetupstatic.com/photos/event/a/4/b/e/thumb_450342174.jpeg + url: https://www.meetup.com/golang/events/dpshmpyznbmb +- city: Hannover + country: Germany + description: |- + The place to meet Go(lang) enthusiasts from the Hannover region. Drop by if you are interested in Golang or back end stuff in general :-)
    +

    + Find recently announced talks at golang.wtf! + id: nhvmtqyznbfb + local_date: Oct 10, 2019 + local_time: "2019-10-10T19:00:00+02:00" + localizedcountry: Germany + localizedlocation: Hannover, Germany + name: Hannover Gophers - Vol. 15 + state: "" + thumbnailurl: https://secure.meetupstatic.com/photos/event/a/2/9/2/thumb_475541618.jpeg + url: https://www.meetup.com/Hannover-Gophers/events/nhvmtqyznbfb +- city: Lisbon + country: Portugal + description: "PortugalGophers is a Portugal based community for anyone interested + in the Go programming language.
    \n
    Our get together provides offline opportunities + to:
    ✅Discuss Go and related topics
    ✅ Socialise with friendly people who + are interested in Go
    ✅ Find or fill Go-related jobs 
    \n

    \nAll + attendees, organisers and sponsors are required to follow the Go community code + of conduct (https://golang.org/conduct). +

    If you would like to make a talk in one of our meetups, click here.
    \n\U0001F4E2Twitter 
    \n\U0001F4F9YouTube 
    \n
    " + id: "265144357" + local_date: Oct 10, 2019 + local_time: "2019-10-10T19:00:00+01:00" + localizedcountry: Portugal + localizedlocation: Lisbon, Portugal + name: October Gophers with Kat Zień + state: "" + thumbnailurl: https://secure.meetupstatic.com/photos/event/9/c/f/2/thumb_485200178.jpeg + url: https://www.meetup.com/PortugalGophers/events/265144357 +- city: Orlando + country: USA + description: Orlando's first meetup group dedicated to the Go Programming Language. + All skill levels are welcome - whether you're a beginner or a full-fledged + gopher. + id: blgfpqyznbnb + local_date: Oct 10, 2019 + local_time: "2019-10-10T19:00:00-04:00" + localizedcountry: USA + localizedlocation: Orlando, FL + name: Orlando Golang Monthly Meetup + state: FL + thumbnailurl: https://secure.meetupstatic.com/photos/event/9/7/c/4/thumb_441638852.jpeg + url: https://www.meetup.com/OrlanGo/events/blgfpqyznbnb +- city: Graz + country: Austria + description: |- + Die Programmiersprache Go hat einen Grazer "Stammtisch". 
    + Wir treffen uns jeden 2. Montag im Monat bei TAO Digital am Lendplatz.
    + Schau einfach vorbei oder besuche uns online unter GoGraz!
    + id: lbbhjlyznbtb + local_date: Oct 14, 2019 + local_time: "2019-10-14T19:00:00+02:00" + localizedcountry: Austria + localizedlocation: Graz, Austria + name: Go Language Usergroup Graz + state: "" + thumbnailurl: https://secure.meetupstatic.com/photos/event/3/3/e/0/thumb_459373280.jpeg + url: https://www.meetup.com/Graz-Open-Source-Meetup/events/lbbhjlyznbtb diff --git a/go.dev/go.mod b/go.dev/go.mod new file mode 100644 index 00000000..de83898c --- /dev/null +++ b/go.dev/go.mod @@ -0,0 +1,9 @@ +module github.com/godevsite/go.dev + +go 1.13 + +require ( + github.com/google/go-cmp v0.3.1 + github.com/microcosm-cc/bluemonday v1.0.2 + gopkg.in/yaml.v2 v2.2.2 +) diff --git a/go.dev/go.sum b/go.dev/go.sum new file mode 100644 index 00000000..23d783ed --- /dev/null +++ b/go.dev/go.sum @@ -0,0 +1,10 @@ +github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/microcosm-cc/bluemonday v1.0.2 h1:5lPfLTTAvAbtS0VqT+94yOtFnGfUWYyx0+iToC3Os3s= +github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -- cgit v1.3 From ba4e10bd28f4b37ecb3dcdbe64d02731f6e97e11 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 3 Oct 2019 14:58:07 -0400 Subject: [x/go.dev] learn: update book list and add images Updates book list to our latest list, and adds images. It might be worth structuring these as page bundles at some point. X-GoDev-Commit: 0644ecb99039f9d19f834af39de44b76ceeb753f --- go.dev/data/learn/books.yaml | 22 ++++++++++----------- go.dev/themes/default/assets/css/styles.css | 9 +++++++++ go.dev/themes/default/layouts/learn/section.html | 4 +++- .../static/images/learn/concurrency-in-go.jpeg | Bin 0 -> 30630 bytes .../images/learn/get-programming-with-go.jpeg | Bin 0 -> 87894 bytes .../images/learn/go-programming-blueprints.png | Bin 0 -> 128379 bytes .../images/learn/go-programming-language-book.png | Bin 0 -> 207447 bytes .../static/images/learn/introducing-go-book.png | Bin 0 -> 163286 bytes 8 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 go.dev/themes/default/static/images/learn/concurrency-in-go.jpeg create mode 100644 go.dev/themes/default/static/images/learn/get-programming-with-go.jpeg create mode 100644 go.dev/themes/default/static/images/learn/go-programming-blueprints.png create mode 100644 go.dev/themes/default/static/images/learn/go-programming-language-book.png create mode 100644 go.dev/themes/default/static/images/learn/introducing-go-book.png diff --git a/go.dev/data/learn/books.yaml b/go.dev/data/learn/books.yaml index 218640fd..1b276121 100644 --- a/go.dev/data/learn/books.yaml +++ b/go.dev/data/learn/books.yaml @@ -1,16 +1,16 @@ links: - title: The Go Programming Language url: https://www.gopl.io/ - thumbnail: - - title: An Introduction to Programming in Go - url: https://www.golang-book.com/books/intro - thumbnail: - - title: Go in Action - url: https://www.manning.com/books/go-in-action - thumbnail: + thumbnail: /images/learn/go-programming-language-book.png + - title: Get Programming with Go + url: https://www.manning.com/books/get-programming-with-go + thumbnail: /images/learn/get-programming-with-go.jpeg + - title: Go Programming Blueprints + url: https://github.com/matryer/goblueprints + thumbnail: /images/learn/go-programming-blueprints.png - title: Introducing Go url: http://shop.oreilly.com/product/0636920046516.do - thumbnail: - - title: Learn Go - url: https://github.com/gyuho/learn#contents - thumbnail: + thumbnail: /images/learn/introducing-go-book.png + - title: Concurrency in Go + url: https://www.oreilly.com/library/view/concurrency-in-go/9781491941294/ + thumbnail: /images/learn/concurrency-in-go.jpeg diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index ec0d7b76..5b730e92 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -731,8 +731,17 @@ a.Footer-link { width: 16.5rem; } .Learn-tileThumbnail--book { + align-items: center; + display: flex; + height: 13rem; + justify-content: center; + text-align: center; width: 9.625rem; } +.Learn-tileThumbnail--book img { + max-height: 100%; + max-width: 100%; +} .Learn-inPersonList { display: flex; flex: 1 0 100%; diff --git a/go.dev/themes/default/layouts/learn/section.html b/go.dev/themes/default/layouts/learn/section.html index 4086f14d..c2a3f0a4 100644 --- a/go.dev/themes/default/layouts/learn/section.html +++ b/go.dev/themes/default/layouts/learn/section.html @@ -84,7 +84,9 @@

    Featured Books

    - View More > + {{if gt (len $.Site.Data.learn.books.links) 5}} + View More > + {{end}}

      diff --git a/go.dev/themes/default/static/images/learn/concurrency-in-go.jpeg b/go.dev/themes/default/static/images/learn/concurrency-in-go.jpeg new file mode 100644 index 00000000..8e544491 Binary files /dev/null and b/go.dev/themes/default/static/images/learn/concurrency-in-go.jpeg differ diff --git a/go.dev/themes/default/static/images/learn/get-programming-with-go.jpeg b/go.dev/themes/default/static/images/learn/get-programming-with-go.jpeg new file mode 100644 index 00000000..f1ea94aa Binary files /dev/null and b/go.dev/themes/default/static/images/learn/get-programming-with-go.jpeg differ diff --git a/go.dev/themes/default/static/images/learn/go-programming-blueprints.png b/go.dev/themes/default/static/images/learn/go-programming-blueprints.png new file mode 100644 index 00000000..c95fdeda Binary files /dev/null and b/go.dev/themes/default/static/images/learn/go-programming-blueprints.png differ diff --git a/go.dev/themes/default/static/images/learn/go-programming-language-book.png b/go.dev/themes/default/static/images/learn/go-programming-language-book.png new file mode 100644 index 00000000..e2cd9924 Binary files /dev/null and b/go.dev/themes/default/static/images/learn/go-programming-language-book.png differ diff --git a/go.dev/themes/default/static/images/learn/introducing-go-book.png b/go.dev/themes/default/static/images/learn/introducing-go-book.png new file mode 100644 index 00000000..8c6150bd Binary files /dev/null and b/go.dev/themes/default/static/images/learn/introducing-go-book.png differ -- cgit v1.3 From 018a8d05adcea756c43edd21a8ae355f31152e6b Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 3 Oct 2019 15:50:41 -0400 Subject: [x/go.dev] learn: fix padding on books X-GoDev-Commit: e1329733fd94ffabd963cb7e419accebf7434c5b --- go.dev/themes/default/assets/css/styles.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index 5b730e92..d904ca0b 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -735,8 +735,7 @@ a.Footer-link { display: flex; height: 13rem; justify-content: center; - text-align: center; - width: 9.625rem; + width: fit-content; } .Learn-tileThumbnail--book img { max-height: 100%; -- cgit v1.3 From 51a75c6bef0396bf4a81d8723f9f7b1895c8d86b Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 3 Oct 2019 16:06:00 -0400 Subject: [x/go.dev] learn,home: add image for courses Also, correct our tile CSS for the learn page now that we have an image. X-GoDev-Commit: 96f147c44c1fb59ac00eb0df088d8c79b0f1802c --- go.dev/data/learn/courses.yaml | 2 +- go.dev/themes/default/assets/css/styles.css | 19 ++++++++++++++++--- go.dev/themes/default/layouts/index.html | 6 +++++- go.dev/themes/default/layouts/learn/section.html | 6 +++--- .../default/static/images/learn/codecademy.png | Bin 0 -> 65279 bytes 5 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 go.dev/themes/default/static/images/learn/codecademy.png diff --git a/go.dev/data/learn/courses.yaml b/go.dev/data/learn/courses.yaml index d893d4c9..6ed1d238 100644 --- a/go.dev/data/learn/courses.yaml +++ b/go.dev/data/learn/courses.yaml @@ -1,4 +1,4 @@ links: - title: Codecademy url: # - thumbnail: + thumbnail: /images/learn/codecademy.png diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index d904ca0b..d4292677 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -469,12 +469,21 @@ a:hover { text-align: center; } .LearnGo-courseImage { + align-items: center; background-color: #fff; border-radius: 0.3125rem; box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); + display: flex; height: 11rem; + justify-content: center; + margin: auto; max-width: 16.5rem; width: 16.5rem; + width: 16.5rem; +} +.LearnGo-courseImage img { + max-height: 100%; + max-width: 100%; } .LearnGo-events { background-color: #fff; @@ -723,18 +732,22 @@ a.Footer-link { width: 12.75rem; } .Learn-tileThumbnail { + align-items: center; background-color: #fff; border-radius: 0.3125rem; box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); + display: flex; height: 11rem; + justify-content: center; margin: auto; width: 16.5rem; } +.Learn-tileThumbnail img { + max-height: 100%; + max-width: 100%; +} .Learn-tileThumbnail--book { - align-items: center; - display: flex; height: 13rem; - justify-content: center; width: fit-content; } .Learn-tileThumbnail--book img { diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index 6fa06154..007d01ea 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -162,7 +162,11 @@

      Courses

      -

      View more courses >

      +

      + {{if gt (len $.Site.Data.learn.courses.links) 4}} + View More > + {{end}} +

        {{range first 4 $.Site.Data.learn.courses.links}} diff --git a/go.dev/themes/default/layouts/learn/section.html b/go.dev/themes/default/layouts/learn/section.html index c2a3f0a4..08e687e3 100644 --- a/go.dev/themes/default/layouts/learn/section.html +++ b/go.dev/themes/default/layouts/learn/section.html @@ -57,9 +57,9 @@

        Online Learning

        -

        - View More > -

        + {{if gt (len $.Site.Data.learn.courses.links) 4}} + View More > + {{end}}
          {{range first 4 $.Site.Data.learn.courses.links}} diff --git a/go.dev/themes/default/static/images/learn/codecademy.png b/go.dev/themes/default/static/images/learn/codecademy.png new file mode 100644 index 00000000..b07c7e82 Binary files /dev/null and b/go.dev/themes/default/static/images/learn/codecademy.png differ -- cgit v1.3 From 5730522fdafd430dff5807c64f2b5fa88a8f8d88 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 3 Oct 2019 17:20:08 -0400 Subject: [x/go.dev] solutions: add first two Use Cases This adds the first two Use Cases for go.dev, and renders them on the homepage. X-GoDev-Commit: 303483080e0e883159bd6ff3605065c38edb5c91 --- go.dev/content/solutions/cloud.md | 141 ++++++++++++++++++++++++ go.dev/content/solutions/devops.md | 181 +++++++++++++++++++++++++++++++ go.dev/themes/default/layouts/index.html | 53 +++------ 3 files changed, 335 insertions(+), 40 deletions(-) create mode 100644 go.dev/content/solutions/cloud.md create mode 100644 go.dev/content/solutions/devops.md diff --git a/go.dev/content/solutions/cloud.md b/go.dev/content/solutions/cloud.md new file mode 100644 index 00000000..5e37c392 --- /dev/null +++ b/go.dev/content/solutions/cloud.md @@ -0,0 +1,141 @@ +--- +title: "Go for Cloud Computing" +description: "Go was created to address concurrency needs for scaled applications, microservices, and cloud development." +date: 2019-10-03T16:26:31-04:00 +--- + +### _Go Helps Enterprises Build and Scale Cloud Computing Systems_ + +## **Why Use Go for Cloud Computing** + +As applications and processing move to the cloud, concurrency becomes a very big issue. Cloud computing systems, by +their very nature, share and scale resources. Coordinating access to shared resources is an issue that impacts every +application processing in the cloud, and requires programming languages “[explicitly geared to develop highly reliable +concurrent applications](https://tomassetti.me/best-programming-languages/).” + +Go was created to address exactly these concurrency needs for scaled applications, microservices, and cloud development. +In fact, over 75 percent of projects in the Cloud Native Computing Foundation ([CNCF](https://www.cncf.io/projects/)) +are written in Go. + +## **Who Uses Go for Cloud Computing** + +### **American Express** + +American Express uses Go to improve microservices and speed cloud development productivity. Go began at American Express +with the efforts of the payment processing platform team, focused on microservices, transaction routing, and load +balancing. By leveraging goroutines, the payment processing team has seen improved performance numbers in its real-time +transaction processing, and validated Go’s garbage collection as a huge improvement over other languages. + +Today, American Express also uses Go via: + +* Docker—a SaaS product, written in Go, that uses operating system level virtualization to develop and deliver +* software in containers hosted on a Docker Engine Kubernetes—an open-source container-orchestration system, written +* in Go, that follows a primary/replica architecture across clusters of American Express hosts Prometheus—an +* open-source software application written in Go used for real-time event monitoring and alerting + +This triumvirate of Go solutions has helped modernize American Express’s infrastructure and opened the door for Go as a +key player in the American Express payment ecosystem. + +### **AT&T** + +Within AT&T's DirectTV division, a microservices development team oversees VUD monitoring and analytics for the video +ingestion pipeline as it comes in from content providers. The team builds small microservices in Go as monitoring +points, checking when video content goes from one state to another throughout their system. Being able to re-write old +microservices in a cloud-friendly language like Go delivered a tremendous development cost-savings to AT&T. The team +also developed a Go SDK to support future Go development on AT&T's platform. + +The DirecTV division also hosts Kubernetes themselves and are looking at Knative (a Kubernetes-based platform to build, +deploy, and manage modern serverless workloads). + +### **Dropbox** + +Dropbox decided to migrate its performance-critical backends from Python to Go to leverage better concurrency support +and faster execution speed. Go delivers better performance for Dropbox engineering teams, making them more productive +with a standard library, debugging tools that work, and proving it is easier to both write and consume services in Go. + +Today, Dropbox has over 500 million users and most of the company's infrastructure is written in Go—over 1.3 million +lines of Go and every Dropbox engineer hired goes through Go training during onboarding. + +### **MercadoLibre** + +MercadoLibre uses Go to scale its eCommerce empire. Go produces efficient code that readily scales as MercadoLibre’s +online commerce grows and supports the company as a boon for developers—improving their productivity while streamlining +and expanding MercadoLibre services. + +Go started with the core APIs team, which builds and maintains the largest APIs at the center of MercadoLibre’s +microservices solutions. The API team converted their architecture to Go to great performance benefits, and one large Go +program is now able to run 100,000 requests per machine with just 24 megabytes of memory. + +MercadoLibre leverages Go’s expressive and clean syntax to make it easier for developers to write programs that get the +most out of the company’s multicore and networked machines. And while speed in development yields cost efficiency for +the company, developers individually benefit from the swift learning curve Go delivers. Not only are MercadoLibre's very +experienced developers able to build highly critical applications very, very quickly with Go, but even new programmers +have been able to produce significant solutions. + +## **How to Use Go for Cloud Computing** + +Go's strengths shine when it comes to building services. Its speed and built-in support for concurrency result in fast +and efficient services, while static typing, robust tooling, and emphasis on simplicity and readability help build +reliable and maintainable code. + +Go has a strong ecosystem supporting service development. The[ standard library](https://golang.org/pkg/) includes +packages for common needs like HTTP servers and clients, JSON/XML parsing, SQL databases, and a range of +security/encryption functionality, while the Go runtime includes tools for[ race +detection](https://golang.org/doc/articles/race_detector.html),[ +benchmarking](https://golang.org/pkg/testing/#hdr-Benchmarks)/profiling, code generation, and static code analysis. + +The major Cloud providers ([GCP](https://cloud.google.com/go/home),[ AWS](https://aws.amazon.com/sdk-for-go/),[ +Azure](https://docs.microsoft.com/en-us/azure/go/)) have Go APIs for their services, and popular open source libraries +provide support for API tooling ([Swagger](https://github.com/go-swagger/go-swagger)), transport ([protocol +buffers](https://github.com/golang/protobuf),[ gRPC](https://grpc.io/docs/quickstart/go/)), monitoring +([OpenCensus](https://godoc.org/go.opencensus.io)), Object-Relational Mapping ([gORM](https://gorm.io/)), and +authentication ([JWT](https://github.com/dgrijalva/jwt-go)). The open source community has also provided several service +frameworks, including[ Go Kit](https://gokit.io/),[ Go Micro](https://micro.mu/docs/go-micro.html), and[ +Gizmo](https://github.com/nytimes/gizmo), which can be a great way to get started quickly. + +Service developers often make a tradeoff between development cycle time and server performance. Go's fast build times +make iterative development possible, while still yielding the benefits of fast compiled code. Plus, Go servers tend to +have lower memory and CPU utilization, making them cheaper to run in pay-as-you-go deployments + +Overall, Go's mission to make it easy to write simple, reliable, and efficient software means it is a great choice for +developing services. + +## **Go Solutions to Legacy Challenges** + +Historically, challenges facing cloud computing systems have included the need for highly concurrent and distributed +processing, multi-nodes and multi-cores, the lack of shared memory, and the very major bottleneck of single-threaded +applications. + +Further, cloud engineering teams want to be able to develop cloud applications locally, they want to be able to develop +cross-cloud applications with a simple idiomatic interface, and they want to be able to run both on-premises and on the +cloud. + +"Go was designed to be scalable to large systems and usable without an IDE, but also productive and being especially +good at networking and concurrency," notes Federico Tomassetti in his[ +blog](https://tomassetti.me/best-programming-languages/). "Other than a well-thought design, it has some specific +features for concurrency like a type of light-weight processes called goroutines." + +Goroutines do not have names; they are just anonymous workers. They expose no unique identifier, name, or data structure +to the programmer. Some people are surprised by this, expecting the go statement to return some item that can be used to +access and control the goroutine later. + +The fundamental reason goroutines are anonymous is so that the full Go language is available when programming concurrent +code. By contrast, the usage patterns that develop when threads and goroutines are named can restrict what a library +using them can do. + +For example, once one names a goroutine and constructs a model around it, it becomes special, and one would be tempted +to associate _all_ computation with that goroutine—ignoring the possibility of using multiple, possibly shared +goroutines for the processing. If the net/http package associated per-request state with a goroutine, clients would be +unable to use more goroutines when serving a request. + +Go solves the problems of modern cloud development, delivering a standard idiomatic APIs designed around user needs, +plus out-of-the-box support for multiple cloud environments (including on-premises), the ability to write and test +locally (run in production), and open cloud development . . . granting development teams the power to choose and the +power to move. + +## **Resources for Learning More** + +* Go.dev (when it’s live) +* http://linuxgizmos.com/latest-edgex-iot-middleware-release-gets-smaller-faster-and-more-secure/ or similar? +* https://ewanvalentine.io/microservices-in-golang-part-1/ (through part 10) is a pretty nice walk-through of Go with +* microservices (using go-micro). Do we want to cite? Similarly,[ https://awesome-go.com/](https://awesome-go.com/) diff --git a/go.dev/content/solutions/devops.md b/go.dev/content/solutions/devops.md new file mode 100644 index 00000000..2c394583 --- /dev/null +++ b/go.dev/content/solutions/devops.md @@ -0,0 +1,181 @@ +--- +title: "Go for Development Operations & Site Reliability Engineering (SRE)" +linkTitle: "Development Operations & Site Reliability Engineering" +description: "Go Helps Enterprises Automate and Scale for CI/CD" +date: 2019-10-03T17:16:43-04:00 +--- + +### _Go Helps Enterprises Automate and Scale for CI/CD_ + + +## **Why Use Go for DevOps & SRE** + +Development Operations (DevOps) teams help engineering organizations automate tasks and improve their continuous +integration and continuous delivery and deployment (CI/CD) process. DevOps can topple developmental silos and implement +tooling and automation to enhance software development, deployment, and support. + + + +Site Reliability Engineering (SRE) was born at Google to make the company’s “large-scale sites more reliable, efficient, +and scalable,”[ writes Silvia Fressard](https://opensource.com/article/18/10/what-site-reliability-engineer), an +independent DevOps consultant. “And the practices they developed responded so well to Google’s needs that other big tech +companies, such as Amazon and Netflix, also adopted them.” SRE requires a mix of development and operations skills, and +“[empowers software developers](https://stackify.com/site-reliability-engineering/) to own the ongoing daily operation +of their applications in production.” + + + +Go serves both siblings, DevOps and SRE, with its fast build times and lean syntax—readily supporting automation while +scaling for speed and code maintainability as development infrastructure grows over time. + + +## **Who Uses Go for DevOps & SRE** + + +### **Docker** + +Docker is a software-as-a-service (SaaS) product, written in Go, that uses operating-system level virtualization to +develop and deliver software in containers hosted on a Docker Engine. DevOps/SRE teams leverage Docker to “[drive secure +automation and deployment at massive scale](https://www.docker.com/solutions/cicd),” supporting their CI/CD efforts. + + + + +### **Google** + +Google leverages Go for the Google Cloud Platform (GCP), as well as at the heart of Kubernetes—an open-source +container-orchestration system, written in Go, for automating application deployment, scaling, and management. At[ +Google](https://landing.google.com/sre/), SRE's "protect, provide for, and progress the software and systems behind all +of Google’s public services—Google Search, Ads, Gmail, Android, YouTube, and App Engine, to name just a few—with an +ever-watchful eye on their availability, latency, performance, and capacity… they keep important, revenue-critical +systems up and running.” + + +### **IBM** + +IBM’s DevOps teams are heavily invested in Docker and Kubernetes, plus other DevOps and CI/CD tools written in Go as +found on the company’s [GitHub](https://github.com/IBM?utf8=%E2%9C%93&q=&type=&language=go). IBM engineering +organizations leverage Red Hat's cloud platform, [OpenShift](https://www.openshift.com), written primarily in Go, and +Red Hat's new addition, [CoreOS](https://coreos.com). CoreOS, also written in Go, delivers one of the best enterprise +Kubernetes distributions available in Tectonic—bringing automated operations, Open Cloud Services, Prometheus +monitoring, and more to simplify Kubernetes deployments, reduce engineering operating costs, and speed time to +production. + + +### **Microsoft** + +Microsoft DevOps includes the company's fully managed Azure Kubernetes Service +([AKS](https://azure.microsoft.com/en-us/services/kubernetes-service/)). AKS was designed to make deploying and managing +containerized applications easy by offering serverless Kubernetes, an integrated CI/CD experience, and enterprise-grade +security and governance. + +Like IBM, Microsoft is also leveraging Red Hat's OpenShift, written in Go, via [Azure Red Hat +OpenShift](https://azure.microsoft.com/en-us/services/openshift/) services. This Microsoft solution provides DevOps +teams with OpenShift clusters to maintain regulatory compliance and focus on application development. + +[summary of how Microsoft uses Go for DevOps/SRE? Does Robert van Gent have details?] + + +### **Terraform** + +Terraform is a[ tool for building, changing, and versioning infrastructure](https://www.terraform.io/intro/index.html) +safely and efficiently. It can manage existing and popular service providers as well as custom in-house solutions. +Written in Go, Terraform supports a number of cloud infrastructure providers such as AWS, IBM Cloud, GCP, and Microsoft +Azure. From a DevOps/SRE perspective, Terraform describes infrastructure as code using a high-level configuration +syntax. It leverages execution plans and resource graphs to automate changes to infrastructure with minimal human +interaction. + + +## **How to Use Go for DevOps & SRE** + +Go has been enthusiastically adopted by the DevOps and SRE communities. As previously noted, many underpinnings of the +modern cloud environment are themselves written in Go—including Docker, Etcd, Istio, Kubernetes, Prometheus, Terraform, +and many others. + +[do we want text for featured users/projects, or just logos? links?] + +[can we say that Google has switched to recommend Go for all new SRE code?] + +DevOps/SRE teams write software ranging from small one-time scripts, to command-line interfaces (CLI), to complex +automation and services where Go excels for all of them: + + + +* For small scripts, Go's fast build times and automatic formatter (gofmt) enable rapid iteration. Go’s extensive +* standard library—including packages for common needs like HTTP, file I/O, time, regular expressions, exec, and +* JSON/CSV formats—lets DevOps/SREs get right into their business logic. Plus, Go's static type system and explicit +* error handling make even small scripts more robust. For CLIs, every site reliability engineer has written “one-time +* use” scripts that turned into CLIs used by dozens of other engineers every day. And small deployment automation +* scripts turn into rollout management services. With Go, DevOps/SREs are in a great position to be successful when +* software scope inevitably creeps. For larger applications, Go's garbage collector means DevOps/SRE teams don't have +* to worry about memory management. And Go’s automatic documentation generator (godoc) makes code self-documenting. + + + +With Go, DevOps/SREs seek to “balance the risk of unavailability with the goals of rapid innovation and efficient +service operations,"[ says Marc Alvidrez](https://landing.google.com/sre/), engineer at Google. "So that users’ overall +happiness—with features, service, and performance—is optimized." + +[Robert van Gent notes that he’s not sure what to put here for "key solutions" other than linkifying some of the things +like gofmt, godoc, standard library pkgs. The range of software here is large and overlaps with CLIs and Services.] + + +## **Go Solutions to Legacy Challenges** + +Traditionally, “DevOps has been more about collaboration between developer and operations. It has also focused more on +deployments,"[ says Matt Watson](https://stackify.com/site-reliability-engineering/), founder and CEO of Stackify. "Site +reliability engineering is more focused on operations and monitoring. Depending on how you define DevOps, it could be +related or not." + + + +Across deployment, operations, and monitoring, DevOps/SRE teams strive to achieve simplicity, reliability, and speed +with their systems. But in complex development environments, such disparate goals are hard to unite. Go helps by +allowing engineers to focus on_ building_, even as they optimize for deployment and support. + + + +For simplicity, Go delivers code readability, built in testing/profiling/benchmarking, a standard library, and a +homogenous environment—statically linked—[ meaning](https://blog.gopheracademy.com/advent-2018/go-devops/) “there’s no +need for external libraries, copy dependencies or worry for imports. All the code and its dependencies are in the +binary, so that’s all you need to distribute.” + + + +For reliability, open source Go delivers pointers, error handling, and safe Type, meaning string operations on an int +cannot happen, because it will be caught by the compiler. + + + +For speed, Go delivers fast compilation and machine-code execution, small binary sizes, superior garbage collection, and +import-defined dependences, meaning all dependencies are included in the binary. For a list of practical Go benchmarks, +visit this[ list of performance benchmarks](https://stackimpact.com/blog/practical-golang-benchmarks/) in various +functionalities. + + + +"With systems becoming distributed and more complex—spread over a group of services (or microservices),"[ writes Natalie +Pistunovich](https://blog.gopheracademy.com/advent-2018/go-devops/), engineering manager at Fraugster. "Observability is +becoming a trade that helps keep you on track with the system’s health." + + + +Many of the modern tooling apps, for DevOps/SRE and for observability, are written in Go. For example: + + + +* [Grafana](https://grafana.com/) [Helm](https://helm.sh/) for Kubernetes [Istio](https://istio.io/) +* [Jaeger](https://www.jaegertracing.io/) [The Open Tracing Project](https://opentracing.io/) + + + +As DevOps/SRE teams automate the processes between software development and IT teams, Go can help them build, test, and +release software faster and more reliably. Scaling infrastructure and development for CI/CD is critical to many large +technology firms today, and Go is the right language for enterprises looking to scale successfully. + + +## **Resources for Learning More** + + + +* Go.dev (when it’s live) https://github.com/golang-migrate/migrate diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index 007d01ea..a84fb17f 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -64,51 +64,24 @@
        + {{$solutions := index (where .Pages "Section" "solutions") 0}}

        Use Cases

        -
        - -

        Web Development

        -

        - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut -

        -

        - Learn More > -

        -
        -
        - -

        Command Line Interfaces

        -

        - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut -

        -

        - Learn More > -

        -
        -
        - -

        Networking and Services

        -

        - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut -

        -

        - Learn More > -

        -
        -
        - -

        Operations

        -

        - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut -

        -

        - Learn More > -

        -
        + {{range $solutions.Pages}} +
        + +

        {{.LinkTitle}}

        +

        + {{.Description}} +

        +

        + Learn More > +

        +
        + {{end}}
        -- cgit v1.3 From cf38ebad742df2555e6f4969b739ab38669ee0f5 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 3 Oct 2019 18:19:35 -0400 Subject: [x/go.dev] all: determine active navigation based on section This change uses the toplevel section of a piece of content to highlight the appropriate navigation item. It also adds a very basic list page, instead of having a totally blank list page. X-GoDev-Commit: ce32ffae2daa8421e566379755fb1fbc7f4d221b --- go.dev/themes/default/layouts/_default/baseof.html | 6 +++--- go.dev/themes/default/layouts/_default/list.html | 15 +++++++++++++++ go.dev/themes/default/layouts/index.html | 20 ++++++++++---------- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/go.dev/themes/default/layouts/_default/baseof.html b/go.dev/themes/default/layouts/_default/baseof.html index 3ddb3233..bd54bb04 100644 --- a/go.dev/themes/default/layouts/_default/baseof.html +++ b/go.dev/themes/default/layouts/_default/baseof.html @@ -21,8 +21,8 @@ @@ -55,4 +55,4 @@ -
    \ No newline at end of file + diff --git a/go.dev/themes/default/layouts/_default/list.html b/go.dev/themes/default/layouts/_default/list.html index e69de29b..5459afae 100644 --- a/go.dev/themes/default/layouts/_default/list.html +++ b/go.dev/themes/default/layouts/_default/list.html @@ -0,0 +1,15 @@ +{{define "main"}} +
    +

    {{.Title}}

    + {{range .Params.authors}} + + {{end}} + + {{.Content}} + {{range .Pages}} +

    + {{.Title}} +

    + {{end}} +
    +{{end}} diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index a84fb17f..66dad154 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -71,16 +71,16 @@

    Use Cases

    {{range $solutions.Pages}} -
    - -

    {{.LinkTitle}}

    -

    - {{.Description}} -

    -

    - Learn More > -

    -
    +
    + +

    {{.LinkTitle}}

    +

    + {{.Description}} +

    +

    + Learn More > +

    +
    {{end}} -- cgit v1.3 From 83de04be855c29ae14807983c03aaf46bf0b1918 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Fri, 4 Oct 2019 14:47:10 -0400 Subject: [x/go.dev] solutions: add series for Use Cases and Case Studies X-GoDev-Commit: 235db34fbffa28cb8d9f752936dbaa12fa0ee0ef --- go.dev/content/solutions/cloud.md | 1 + go.dev/content/solutions/devops.md | 1 + go.dev/themes/default/layouts/_default/list.html | 8 ++++---- go.dev/themes/default/layouts/index.html | 4 ++-- .../themes/default/layouts/solutions/section.html | 22 ++++++++++++++++++++++ 5 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 go.dev/themes/default/layouts/solutions/section.html diff --git a/go.dev/content/solutions/cloud.md b/go.dev/content/solutions/cloud.md index 5e37c392..c69cf7c7 100644 --- a/go.dev/content/solutions/cloud.md +++ b/go.dev/content/solutions/cloud.md @@ -2,6 +2,7 @@ title: "Go for Cloud Computing" description: "Go was created to address concurrency needs for scaled applications, microservices, and cloud development." date: 2019-10-03T16:26:31-04:00 +series: Use Cases --- ### _Go Helps Enterprises Build and Scale Cloud Computing Systems_ diff --git a/go.dev/content/solutions/devops.md b/go.dev/content/solutions/devops.md index 2c394583..6a2264fa 100644 --- a/go.dev/content/solutions/devops.md +++ b/go.dev/content/solutions/devops.md @@ -3,6 +3,7 @@ title: "Go for Development Operations & Site Reliability Engineering (SRE)" linkTitle: "Development Operations & Site Reliability Engineering" description: "Go Helps Enterprises Automate and Scale for CI/CD" date: 2019-10-03T17:16:43-04:00 +series: Use Cases --- ### _Go Helps Enterprises Automate and Scale for CI/CD_ diff --git a/go.dev/themes/default/layouts/_default/list.html b/go.dev/themes/default/layouts/_default/list.html index 5459afae..9cce67b3 100644 --- a/go.dev/themes/default/layouts/_default/list.html +++ b/go.dev/themes/default/layouts/_default/list.html @@ -5,11 +5,11 @@ {{end}} - {{.Content}} + {{.Content}} {{range .Pages}} -

    - {{.Title}} -

    +

    + {{.Title}} +

    {{end}} {{end}} diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index 66dad154..bb3af78c 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -70,7 +70,7 @@

    Use Cases

    - {{range $solutions.Pages}} + {{range where $solutions.Pages "Params.series" "Use Cases"}}

    {{.LinkTitle}}

    @@ -148,7 +148,7 @@
    {{if .thumbnail}} - {{.title}} thumbnail. + {{.title}} thumbnail. {{end}}

    {{.title}}

    diff --git a/go.dev/themes/default/layouts/solutions/section.html b/go.dev/themes/default/layouts/solutions/section.html new file mode 100644 index 00000000..de149d1d --- /dev/null +++ b/go.dev/themes/default/layouts/solutions/section.html @@ -0,0 +1,22 @@ +{{define "main"}} +
    +{{end}} -- cgit v1.3 From 077dbe2e8dcceb5a9aa86304accf43462c38657b Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Fri, 4 Oct 2019 15:59:13 -0400 Subject: [x/go.dev] home,solutions: add MercadoLibre Case Study X-GoDev-Commit: 970cfb802410242001be348d6ad5a7b5c670cefc --- go.dev/content/solutions/cloud.md | 2 +- go.dev/content/solutions/mercadolibre/index.md | 179 +++++++++++++++++++++++++ go.dev/content/solutions/mercadolibre/logo.png | Bin 0 -> 47150 bytes go.dev/content/solutions/mercadolibre/logo.svg | 119 ++++++++++++++++ go.dev/themes/default/layouts/index.html | 46 ++----- 5 files changed, 309 insertions(+), 37 deletions(-) create mode 100644 go.dev/content/solutions/mercadolibre/index.md create mode 100644 go.dev/content/solutions/mercadolibre/logo.png create mode 100644 go.dev/content/solutions/mercadolibre/logo.svg diff --git a/go.dev/content/solutions/cloud.md b/go.dev/content/solutions/cloud.md index c69cf7c7..a396a5b9 100644 --- a/go.dev/content/solutions/cloud.md +++ b/go.dev/content/solutions/cloud.md @@ -1,6 +1,6 @@ --- title: "Go for Cloud Computing" -description: "Go was created to address concurrency needs for scaled applications, microservices, and cloud development." +description: "Go Helps Enterprises Build and Scale Cloud Computing Systems" date: 2019-10-03T16:26:31-04:00 series: Use Cases --- diff --git a/go.dev/content/solutions/mercadolibre/index.md b/go.dev/content/solutions/mercadolibre/index.md new file mode 100644 index 00000000..67d0bf7e --- /dev/null +++ b/go.dev/content/solutions/mercadolibre/index.md @@ -0,0 +1,179 @@ +--- +title: "MercadoLibre Grows with Go" +description: "" +date: 2019-10-03T16:26:31-04:00 +series: Case Studies +resources: +- name: logo + src: logo.svg + alt: MercadoLibre +--- +## MercadoLibre Grows with Go + + +### Go Helps Integrated Ecosystem Attract Developers and Scale eCommerce + +MercadoLibre, Inc. hosts the largest online commerce ecosystem in Latin America and is present in 18 countries. Founded +in 1999 and headquartered in Argentina, the company has turned to Go to help it scale and modernize its ecosystem. Go +provides clean, efficient code that readily scales as MercadoLibre’s online commerce grows, and increases developer +productivity by allowing their engineers to serve their ever-increasing audience while writing less code. + + +## **MERCADOLIBRE TAPS GO FOR SCALE** + +Back in 2015, there was a growing sense within MercadoLibre that their existing API framework, on Groovy and Grails, was +reaching its limits and the company needed a different platform to continue scaling. MercadoLibre’s platform was (and +continues) to expand exponentially, which created a lot of extra work for its developers: Both Groovy and Grails require +a lot of decisions from developers and Groovy is a dynamic programming language. This was not a good combination for +quickly scaling growth, as MercadoLibre needed very experienced developers in this very resource intensive environment +to develop and tune to achieve desired performance. Test execution times were slow, and build and deploy times were +slow. Thus, the need for code efficiency and scalability became as important as the need for speed in code development. + + +### **Go Improves System Efficiency** + +As one example of Go’s contributions to network efficiency, the core API team builds and maintains the largest APIs at +the center of the company’s microservices solutions. This team creates user APIs, which in turn are used by the +MercadoLibre Marketplace, by the MercadoPago FinTech platform, by MercadoLibre’s shipping and logistics solutions, and +other hosted solutions. With the high service levels demanded by these solutions—the average user API has between eight +and ten million requests per minute—the team employs Go to serve them at less than ten milliseconds per request. + + + +The API team also deploys Docker containers—a software-as-a-service (SaaS) product, also written in Go—to virtualize +their development and readily deploy their microservices via the Docker Engine. This system supports larger, +mission-critical APIs that handle **more than** **20 million requests per minute in Go.** + + + +One API made important use of Go’s concurrency primitives to efficiently multiplex IDs from several services. The team +was able to accomplish this with just a few lines of Go code, and the success of this API convinced the core API team to +migrate more and more microservices to Go. The end result for MercadoLibre has been improved cost-efficiencies and +system response times. + + +### **Go for Scalability** + +Historically, much of the company’s stack was based on Grails and Groovy backed by relational databases. However this +big framework with multiple layers was soon found encountering scalability issues. + +Converting that legacy architecture to Go as a new, very thin framework for building APIs streamlined those intermediate +layers and yielded great performance benefits. For example, one large Go service is now able to **run 70,000 requests +per machine with just 20 MB of RAM. ** + +“Go was just marvelous for us,” explains Eric Kohan, Software Engineering Manager at MercadoLibre. “It’s very powerful +and very easy to learn, and with backend infrastructure has been great for us in terms of scalability.” + +Using **Go allowed MercadoLibre to cut the number of servers** they use for this service to one-eighth the original +number (from 32 servers down to four), plus each server can operate with less power (originally four CPU cores, now down +to two CPU cores). With Go, the company **obviated 88 percent of their servers and cut CPU on the remaining ones in +half**—producing a tremendous cost-savings. + +Sitting between developers and the cloud providers, MercadoLibre uses a platform called Fury—a platform-as-a-service +tool for building, deploying, monitoring, and managing services in a cloud-agnostic way. As a result, any team that +wants to create a new service in Go has access to proven templates for a variety of service types, and can quickly spin +up a repository in GitHub with starter code, a Docker image for the service, and a deployment pipeline. The end result +is a system that allows engineers to focus on building innovative services while avoiding the tedious stages of setting +up a new project—all while effectively standardizing the build and deployment pipelines. + +Today, **roughly half of Mercadolibre's traffic is handled by Go applications.** + + +## **MERCADOLIBRE USES GO FOR DEVELOPERS** + +The programming _lingua francas_ for MercadoLibre’s infrastructure are currently Go and Java. Every app, every program, +every microservice is hosted on its own GitHub repository, plus the company uses an additional GitHub repository of +toolkits to solve new problems and allow clients to interact with its services. + + + +These extensive and well-curated Go and Java toolkits allow programmers to develop new apps quickly and with great +support. Plus, in a community of more than 2,800 developers, MercadoLibre has multiple internal groups available for +chat and guidance on deploying Go, whether across different development centers or different countries. The company also +fosters internal working groups to provide training sessions for new MercadoLibre Go developers, and hosts Go meetups +for external developers to help build a broader community of Latin American Go developers. + + +### **Go as a Recruiting Tool** + +MercadoLibre’s Go advocacy has also become a strong recruiting tool for the company. MercadoLibre was among the first +companies using Go in Argentina, and is perhaps the largest in Latin America using the language so widely in production. +Headquartered in Buenos Aires, with many start-ups and emerging technology companies nearby, MercadoLibre's adoption of +Go has shaped the market for developers across the Pampas. + +"We really see eye-to-eye with the larger philosophy of the language," Kohan explains. "We love Go's simplicity, and we +find that having its very explicit error handling has been a gain for developers because it results in safer, more +stable code in production." + + + +Buenos Aires is today a very competitive market for programmers, offering computer programmers many employment options, +and the high demand for technology in the region drives great salaries, great benefits, and the ability to be selective +when choosing an employer. As such, MercadoLibre—like all employers of engineers and programmers in the region—strives +to provide an exciting workplace and strong career path. Go has proven to be a key differentiator for MercadoLibre: the +company organizes Go workshops for external developers so they can come and learn Go, and when they enjoy what they are +doing and the people they talk to, they quickly recognize MercadoLibre as an enticing place to work. + + +### **Go Enabling Developers** + +MercadoLibre employs Go for its simplicity with systems at scale, but that simplicity is also why the company's +developers love Go. + + + +"I think that **the** **tour of Go is by far the best introduction to a language that I’ve seen**," says Kohan. "It’s +really simple and it gives you a fair overview of probably 80 percent of the language. When we want to get developers to +learn Go, and to get to production fast, we tell them to start with the tour of Go." + + + +The company also uses web pages like[ Go by Example](https://gobyexample.com/) and[ Effective +Go](https://golang.org/doc/effective_go.html) to educate new programmers, and shares representative internal APIs +written in Go to speed understanding and proficiency. MercadoLibre developers get the resources they need to embrace the +language, then leverage their own skills and enthusiasm to start programming. + + + +"Go has been great for writing business logic," says Federico Martin Roasio, Technical Project Lead at MercadoLibre. +"And we are the team that writes those APIs." + + + +MercadoLibre leverages Go’s expressive and clean syntax to make it easier for developers to write programs that run +efficiently on modern cloud platforms. And while speed in development yields cost efficiency for the company, developers +individually benefit from the swift learning curve Go delivers. Not only are MercadoLibre's experienced engineers able +to build highly critical applications very quickly with Go, but even entry-level engineers have been able to write +services that, in other languages, MercadoLibre would only trust to more senior developers. For example, a key set of +user APIs—handling almost ten million requests per minute—were developed by entry-level software engineers, many of whom +only knew about programming from recent courses at university. Similarly, MercadoLibre has seen developers already +proficient with other programming languages (such as Java or .NET or Ruby) learn Go fast enough start writing production +services in just a few weeks. + +With Go, MercadoLibre’s **build times are three times (3x) faster** and their** test suite runs an amazing 24 times +faster**. This means the company’s developers can make a change, then build and test that change much faster than they +could before. + +And dropping MercadoLibre’s test suite runtimes from 90-seconds to **just 3-seconds with Go** was a huge boon for its +developers—allowing them to keep focus (and context) while the much faster tests complete. + + + +Leveraging this success, MercadoLibre is committed not only to ongoing education for its programmers, but ongoing Go +education. The company sends key engineering leaders to GopherCon and other Go events each year, MercadoLibre’s +infrastructure and security teams encourage all the development teams to keep Go versions up to date, and the company +has a team developing a_ Go-meli-toolkit_: A complete Go library to interface all the services provided by Fury. + + +## **GETTING YOUR ENTERPRISE STARTED WITH GO** + +Just as MercadoLibre started with a proof-of-concept project to implement Go, dozens of other large enterprises are +adopting Go as well. Beyond MercadoLibre, there are approximately two million developers using Go worldwide—spanning +banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as Amazon, Apple, +Cisco, Disney, Dropbox, Epic Games, Facebook, GE, IBM, Microsoft, Netflix, Square, Stripe, Uber, Walmart, and of course +Google. + + + +To learn more about how Go can help your enterprise build reliable, scalable software as it does at MercadoLibre, visit +Go.dev today. diff --git a/go.dev/content/solutions/mercadolibre/logo.png b/go.dev/content/solutions/mercadolibre/logo.png new file mode 100644 index 00000000..337ecea7 Binary files /dev/null and b/go.dev/content/solutions/mercadolibre/logo.png differ diff --git a/go.dev/content/solutions/mercadolibre/logo.svg b/go.dev/content/solutions/mercadolibre/logo.svg new file mode 100644 index 00000000..3fccb14c --- /dev/null +++ b/go.dev/content/solutions/mercadolibre/logo.svg @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index bb3af78c..1b6a8ca2 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -18,48 +18,22 @@
    + {{$solutions := index (where .Pages "Section" "solutions") 0}}

    Who Uses Go

    Lorem ipsum dolor sit amet, consectetur adipiscing elit,

    -- cgit v1.3 From 82f776e524ba3a90c91aca2876f1dd7b4e2b78e4 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Fri, 4 Oct 2019 16:00:03 -0400 Subject: [x/go.dev] solutions: tweak Cloud Computing Use Case text X-GoDev-Commit: e576eecd2a4b2b5263d9b06e984b899a74b15bd5 --- go.dev/content/solutions/cloud.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.dev/content/solutions/cloud.md b/go.dev/content/solutions/cloud.md index a396a5b9..93a5ea89 100644 --- a/go.dev/content/solutions/cloud.md +++ b/go.dev/content/solutions/cloud.md @@ -1,7 +1,7 @@ --- title: "Go for Cloud Computing" description: "Go Helps Enterprises Build and Scale Cloud Computing Systems" -date: 2019-10-03T16:26:31-04:00 +date: 2019-10-04T15:26:31-04:00 series: Use Cases --- -- cgit v1.3 From 622c14cddcf4df8b260271a2f4ada4b22f548cc0 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Fri, 4 Oct 2019 16:44:50 -0400 Subject: [x/go.dev] home: correct alt text on Case Study logos X-GoDev-Commit: 679cbc577bb236a470b6a00d773d5c550828c9a5 --- go.dev/content/solutions/mercadolibre/index.md | 3 ++- go.dev/themes/default/layouts/index.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.dev/content/solutions/mercadolibre/index.md b/go.dev/content/solutions/mercadolibre/index.md index 67d0bf7e..35d33b6c 100644 --- a/go.dev/content/solutions/mercadolibre/index.md +++ b/go.dev/content/solutions/mercadolibre/index.md @@ -6,7 +6,8 @@ series: Case Studies resources: - name: logo src: logo.svg - alt: MercadoLibre + params: + alt: MercadoLibre --- ## MercadoLibre Grows with Go diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index 1b6a8ca2..4c0e5a4c 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -29,7 +29,7 @@
  • {{$logo := .Resources.GetMatch "logo"}} - +

    View case study

  • -- cgit v1.3 From d5f5a08e1b1f5fa82a68d6126e83f700583132e2 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Wed, 2 Oct 2019 17:55:30 -0400 Subject: [x/go.dev] home,learn: update events during deployment This change runs cmd/events during the Cloud Build deployment, ensuring we deploy with the latest event data. Tested with cloud-build-local X-GoDev-Commit: 0b61109a666bd99a8a6ddcba3b2bc05d1cd33e7d --- go.dev/cloudbuild.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/go.dev/cloudbuild.yaml b/go.dev/cloudbuild.yaml index 3728262b..07d91b06 100644 --- a/go.dev/cloudbuild.yaml +++ b/go.dev/cloudbuild.yaml @@ -1,4 +1,9 @@ steps: + - name: 'mirror.gcr.io/library/golang' + entrypoint: bash + args: + - -c + - go run ./cmd/events/ > ./data/events.yaml - name: 'gcr.io/cloud-builders/docker' args: ['build', '-f', 'Dockerfile.hugo', '-t', 'gcr.io/$PROJECT_ID/hugo', '.'] - name: 'gcr.io/$PROJECT_ID/hugo' -- cgit v1.3 From e432c51f6616621bd420de6302abd89f0b355995 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Fri, 4 Oct 2019 16:23:14 -0400 Subject: [x/go.dev] all: add AppEngine handler support for page bundles, trailing slash The trailing slash substitution seems to require a separate rule, unfortunately. Update the static content rule to work with page bundle content. X-GoDev-Commit: 449d5c8a9281aa7c432fc6401c98b2befe7d5bce --- go.dev/app.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/go.dev/app.yaml b/go.dev/app.yaml index 9227cf26..40994198 100644 --- a/go.dev/app.yaml +++ b/go.dev/app.yaml @@ -8,11 +8,16 @@ handlers: static_files: public/index.html upload: public/index.html -# Special for static content so we do not try to append index.html to their paths. -- url: /(css|images)/(.*) - static_files: public/\1/\2 +# Special handler for static content in themes or page bundles. +- url: /(.*)\.(png|svg|css|jpeg|jpg|xml|html)$ + static_files: public/\1.\2 upload: public/(.*) +# Handle arbitrary paths with an index.html, special casing the trailing slash. +- url: /(.*)/ + static_files: public/\1/index.html + upload: public/(.*)/index.html + # Handle arbitrary paths with an index.html - url: /(.*) static_files: public/\1/index.html -- cgit v1.3 From 47025fee35d87a753369e2d6e266f44eeb3b3095 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Tue, 8 Oct 2019 14:50:34 -0400 Subject: [x/go.dev] solutions: add styling for header and Use Cases Update the solutions page to add desktop and mobile styling for Use Cases. Reorganizes Use Case content to allow for images to be bundled in. X-GoDev-Commit: 5acaba4cbfa27726189df6cc70356fd6a6ee3745 --- go.dev/content/solutions/cloud.md | 142 ---------------- go.dev/content/solutions/cloud/globe.png | Bin 0 -> 20012 bytes go.dev/content/solutions/cloud/index.md | 147 ++++++++++++++++ go.dev/content/solutions/devops.md | 182 -------------------- go.dev/content/solutions/devops/cog.png | Bin 0 -> 4056 bytes go.dev/content/solutions/devops/index.md | 187 +++++++++++++++++++++ go.dev/themes/default/assets/css/styles.css | 78 +++++++++ .../themes/default/layouts/solutions/section.html | 54 ++++-- 8 files changed, 454 insertions(+), 336 deletions(-) delete mode 100644 go.dev/content/solutions/cloud.md create mode 100644 go.dev/content/solutions/cloud/globe.png create mode 100644 go.dev/content/solutions/cloud/index.md delete mode 100644 go.dev/content/solutions/devops.md create mode 100644 go.dev/content/solutions/devops/cog.png create mode 100644 go.dev/content/solutions/devops/index.md diff --git a/go.dev/content/solutions/cloud.md b/go.dev/content/solutions/cloud.md deleted file mode 100644 index 93a5ea89..00000000 --- a/go.dev/content/solutions/cloud.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -title: "Go for Cloud Computing" -description: "Go Helps Enterprises Build and Scale Cloud Computing Systems" -date: 2019-10-04T15:26:31-04:00 -series: Use Cases ---- - -### _Go Helps Enterprises Build and Scale Cloud Computing Systems_ - -## **Why Use Go for Cloud Computing** - -As applications and processing move to the cloud, concurrency becomes a very big issue. Cloud computing systems, by -their very nature, share and scale resources. Coordinating access to shared resources is an issue that impacts every -application processing in the cloud, and requires programming languages “[explicitly geared to develop highly reliable -concurrent applications](https://tomassetti.me/best-programming-languages/).” - -Go was created to address exactly these concurrency needs for scaled applications, microservices, and cloud development. -In fact, over 75 percent of projects in the Cloud Native Computing Foundation ([CNCF](https://www.cncf.io/projects/)) -are written in Go. - -## **Who Uses Go for Cloud Computing** - -### **American Express** - -American Express uses Go to improve microservices and speed cloud development productivity. Go began at American Express -with the efforts of the payment processing platform team, focused on microservices, transaction routing, and load -balancing. By leveraging goroutines, the payment processing team has seen improved performance numbers in its real-time -transaction processing, and validated Go’s garbage collection as a huge improvement over other languages. - -Today, American Express also uses Go via: - -* Docker—a SaaS product, written in Go, that uses operating system level virtualization to develop and deliver -* software in containers hosted on a Docker Engine Kubernetes—an open-source container-orchestration system, written -* in Go, that follows a primary/replica architecture across clusters of American Express hosts Prometheus—an -* open-source software application written in Go used for real-time event monitoring and alerting - -This triumvirate of Go solutions has helped modernize American Express’s infrastructure and opened the door for Go as a -key player in the American Express payment ecosystem. - -### **AT&T** - -Within AT&T's DirectTV division, a microservices development team oversees VUD monitoring and analytics for the video -ingestion pipeline as it comes in from content providers. The team builds small microservices in Go as monitoring -points, checking when video content goes from one state to another throughout their system. Being able to re-write old -microservices in a cloud-friendly language like Go delivered a tremendous development cost-savings to AT&T. The team -also developed a Go SDK to support future Go development on AT&T's platform. - -The DirecTV division also hosts Kubernetes themselves and are looking at Knative (a Kubernetes-based platform to build, -deploy, and manage modern serverless workloads). - -### **Dropbox** - -Dropbox decided to migrate its performance-critical backends from Python to Go to leverage better concurrency support -and faster execution speed. Go delivers better performance for Dropbox engineering teams, making them more productive -with a standard library, debugging tools that work, and proving it is easier to both write and consume services in Go. - -Today, Dropbox has over 500 million users and most of the company's infrastructure is written in Go—over 1.3 million -lines of Go and every Dropbox engineer hired goes through Go training during onboarding. - -### **MercadoLibre** - -MercadoLibre uses Go to scale its eCommerce empire. Go produces efficient code that readily scales as MercadoLibre’s -online commerce grows and supports the company as a boon for developers—improving their productivity while streamlining -and expanding MercadoLibre services. - -Go started with the core APIs team, which builds and maintains the largest APIs at the center of MercadoLibre’s -microservices solutions. The API team converted their architecture to Go to great performance benefits, and one large Go -program is now able to run 100,000 requests per machine with just 24 megabytes of memory. - -MercadoLibre leverages Go’s expressive and clean syntax to make it easier for developers to write programs that get the -most out of the company’s multicore and networked machines. And while speed in development yields cost efficiency for -the company, developers individually benefit from the swift learning curve Go delivers. Not only are MercadoLibre's very -experienced developers able to build highly critical applications very, very quickly with Go, but even new programmers -have been able to produce significant solutions. - -## **How to Use Go for Cloud Computing** - -Go's strengths shine when it comes to building services. Its speed and built-in support for concurrency result in fast -and efficient services, while static typing, robust tooling, and emphasis on simplicity and readability help build -reliable and maintainable code. - -Go has a strong ecosystem supporting service development. The[ standard library](https://golang.org/pkg/) includes -packages for common needs like HTTP servers and clients, JSON/XML parsing, SQL databases, and a range of -security/encryption functionality, while the Go runtime includes tools for[ race -detection](https://golang.org/doc/articles/race_detector.html),[ -benchmarking](https://golang.org/pkg/testing/#hdr-Benchmarks)/profiling, code generation, and static code analysis. - -The major Cloud providers ([GCP](https://cloud.google.com/go/home),[ AWS](https://aws.amazon.com/sdk-for-go/),[ -Azure](https://docs.microsoft.com/en-us/azure/go/)) have Go APIs for their services, and popular open source libraries -provide support for API tooling ([Swagger](https://github.com/go-swagger/go-swagger)), transport ([protocol -buffers](https://github.com/golang/protobuf),[ gRPC](https://grpc.io/docs/quickstart/go/)), monitoring -([OpenCensus](https://godoc.org/go.opencensus.io)), Object-Relational Mapping ([gORM](https://gorm.io/)), and -authentication ([JWT](https://github.com/dgrijalva/jwt-go)). The open source community has also provided several service -frameworks, including[ Go Kit](https://gokit.io/),[ Go Micro](https://micro.mu/docs/go-micro.html), and[ -Gizmo](https://github.com/nytimes/gizmo), which can be a great way to get started quickly. - -Service developers often make a tradeoff between development cycle time and server performance. Go's fast build times -make iterative development possible, while still yielding the benefits of fast compiled code. Plus, Go servers tend to -have lower memory and CPU utilization, making them cheaper to run in pay-as-you-go deployments - -Overall, Go's mission to make it easy to write simple, reliable, and efficient software means it is a great choice for -developing services. - -## **Go Solutions to Legacy Challenges** - -Historically, challenges facing cloud computing systems have included the need for highly concurrent and distributed -processing, multi-nodes and multi-cores, the lack of shared memory, and the very major bottleneck of single-threaded -applications. - -Further, cloud engineering teams want to be able to develop cloud applications locally, they want to be able to develop -cross-cloud applications with a simple idiomatic interface, and they want to be able to run both on-premises and on the -cloud. - -"Go was designed to be scalable to large systems and usable without an IDE, but also productive and being especially -good at networking and concurrency," notes Federico Tomassetti in his[ -blog](https://tomassetti.me/best-programming-languages/). "Other than a well-thought design, it has some specific -features for concurrency like a type of light-weight processes called goroutines." - -Goroutines do not have names; they are just anonymous workers. They expose no unique identifier, name, or data structure -to the programmer. Some people are surprised by this, expecting the go statement to return some item that can be used to -access and control the goroutine later. - -The fundamental reason goroutines are anonymous is so that the full Go language is available when programming concurrent -code. By contrast, the usage patterns that develop when threads and goroutines are named can restrict what a library -using them can do. - -For example, once one names a goroutine and constructs a model around it, it becomes special, and one would be tempted -to associate _all_ computation with that goroutine—ignoring the possibility of using multiple, possibly shared -goroutines for the processing. If the net/http package associated per-request state with a goroutine, clients would be -unable to use more goroutines when serving a request. - -Go solves the problems of modern cloud development, delivering a standard idiomatic APIs designed around user needs, -plus out-of-the-box support for multiple cloud environments (including on-premises), the ability to write and test -locally (run in production), and open cloud development . . . granting development teams the power to choose and the -power to move. - -## **Resources for Learning More** - -* Go.dev (when it’s live) -* http://linuxgizmos.com/latest-edgex-iot-middleware-release-gets-smaller-faster-and-more-secure/ or similar? -* https://ewanvalentine.io/microservices-in-golang-part-1/ (through part 10) is a pretty nice walk-through of Go with -* microservices (using go-micro). Do we want to cite? Similarly,[ https://awesome-go.com/](https://awesome-go.com/) diff --git a/go.dev/content/solutions/cloud/globe.png b/go.dev/content/solutions/cloud/globe.png new file mode 100644 index 00000000..bf497235 Binary files /dev/null and b/go.dev/content/solutions/cloud/globe.png differ diff --git a/go.dev/content/solutions/cloud/index.md b/go.dev/content/solutions/cloud/index.md new file mode 100644 index 00000000..2aed8507 --- /dev/null +++ b/go.dev/content/solutions/cloud/index.md @@ -0,0 +1,147 @@ +--- +title: "Go for Cloud Computing" +description: "Go Helps Enterprises Build and Scale Cloud Computing Systems" +date: 2019-10-04T15:26:31-04:00 +series: Use Cases +resources: +- name: icon + src: globe.png + params: + alt: globe +--- + +### _Go Helps Enterprises Build and Scale Cloud Computing Systems_ + +## **Why Use Go for Cloud Computing** + +As applications and processing move to the cloud, concurrency becomes a very big issue. Cloud computing systems, by +their very nature, share and scale resources. Coordinating access to shared resources is an issue that impacts every +application processing in the cloud, and requires programming languages “[explicitly geared to develop highly reliable +concurrent applications](https://tomassetti.me/best-programming-languages/).” + +Go was created to address exactly these concurrency needs for scaled applications, microservices, and cloud development. +In fact, over 75 percent of projects in the Cloud Native Computing Foundation ([CNCF](https://www.cncf.io/projects/)) +are written in Go. + +## **Who Uses Go for Cloud Computing** + +### **American Express** + +American Express uses Go to improve microservices and speed cloud development productivity. Go began at American Express +with the efforts of the payment processing platform team, focused on microservices, transaction routing, and load +balancing. By leveraging goroutines, the payment processing team has seen improved performance numbers in its real-time +transaction processing, and validated Go’s garbage collection as a huge improvement over other languages. + +Today, American Express also uses Go via: + +* Docker—a SaaS product, written in Go, that uses operating system level virtualization to develop and deliver +* software in containers hosted on a Docker Engine Kubernetes—an open-source container-orchestration system, written +* in Go, that follows a primary/replica architecture across clusters of American Express hosts Prometheus—an +* open-source software application written in Go used for real-time event monitoring and alerting + +This triumvirate of Go solutions has helped modernize American Express’s infrastructure and opened the door for Go as a +key player in the American Express payment ecosystem. + +### **AT&T** + +Within AT&T's DirectTV division, a microservices development team oversees VUD monitoring and analytics for the video +ingestion pipeline as it comes in from content providers. The team builds small microservices in Go as monitoring +points, checking when video content goes from one state to another throughout their system. Being able to re-write old +microservices in a cloud-friendly language like Go delivered a tremendous development cost-savings to AT&T. The team +also developed a Go SDK to support future Go development on AT&T's platform. + +The DirecTV division also hosts Kubernetes themselves and are looking at Knative (a Kubernetes-based platform to build, +deploy, and manage modern serverless workloads). + +### **Dropbox** + +Dropbox decided to migrate its performance-critical backends from Python to Go to leverage better concurrency support +and faster execution speed. Go delivers better performance for Dropbox engineering teams, making them more productive +with a standard library, debugging tools that work, and proving it is easier to both write and consume services in Go. + +Today, Dropbox has over 500 million users and most of the company's infrastructure is written in Go—over 1.3 million +lines of Go and every Dropbox engineer hired goes through Go training during onboarding. + +### **MercadoLibre** + +MercadoLibre uses Go to scale its eCommerce empire. Go produces efficient code that readily scales as MercadoLibre’s +online commerce grows and supports the company as a boon for developers—improving their productivity while streamlining +and expanding MercadoLibre services. + +Go started with the core APIs team, which builds and maintains the largest APIs at the center of MercadoLibre’s +microservices solutions. The API team converted their architecture to Go to great performance benefits, and one large Go +program is now able to run 100,000 requests per machine with just 24 megabytes of memory. + +MercadoLibre leverages Go’s expressive and clean syntax to make it easier for developers to write programs that get the +most out of the company’s multicore and networked machines. And while speed in development yields cost efficiency for +the company, developers individually benefit from the swift learning curve Go delivers. Not only are MercadoLibre's very +experienced developers able to build highly critical applications very, very quickly with Go, but even new programmers +have been able to produce significant solutions. + +## **How to Use Go for Cloud Computing** + +Go's strengths shine when it comes to building services. Its speed and built-in support for concurrency result in fast +and efficient services, while static typing, robust tooling, and emphasis on simplicity and readability help build +reliable and maintainable code. + +Go has a strong ecosystem supporting service development. The[ standard library](https://golang.org/pkg/) includes +packages for common needs like HTTP servers and clients, JSON/XML parsing, SQL databases, and a range of +security/encryption functionality, while the Go runtime includes tools for[ race +detection](https://golang.org/doc/articles/race_detector.html),[ +benchmarking](https://golang.org/pkg/testing/#hdr-Benchmarks)/profiling, code generation, and static code analysis. + +The major Cloud providers ([GCP](https://cloud.google.com/go/home),[ AWS](https://aws.amazon.com/sdk-for-go/),[ +Azure](https://docs.microsoft.com/en-us/azure/go/)) have Go APIs for their services, and popular open source libraries +provide support for API tooling ([Swagger](https://github.com/go-swagger/go-swagger)), transport ([protocol +buffers](https://github.com/golang/protobuf),[ gRPC](https://grpc.io/docs/quickstart/go/)), monitoring +([OpenCensus](https://godoc.org/go.opencensus.io)), Object-Relational Mapping ([gORM](https://gorm.io/)), and +authentication ([JWT](https://github.com/dgrijalva/jwt-go)). The open source community has also provided several service +frameworks, including[ Go Kit](https://gokit.io/),[ Go Micro](https://micro.mu/docs/go-micro.html), and[ +Gizmo](https://github.com/nytimes/gizmo), which can be a great way to get started quickly. + +Service developers often make a tradeoff between development cycle time and server performance. Go's fast build times +make iterative development possible, while still yielding the benefits of fast compiled code. Plus, Go servers tend to +have lower memory and CPU utilization, making them cheaper to run in pay-as-you-go deployments + +Overall, Go's mission to make it easy to write simple, reliable, and efficient software means it is a great choice for +developing services. + +## **Go Solutions to Legacy Challenges** + +Historically, challenges facing cloud computing systems have included the need for highly concurrent and distributed +processing, multi-nodes and multi-cores, the lack of shared memory, and the very major bottleneck of single-threaded +applications. + +Further, cloud engineering teams want to be able to develop cloud applications locally, they want to be able to develop +cross-cloud applications with a simple idiomatic interface, and they want to be able to run both on-premises and on the +cloud. + +"Go was designed to be scalable to large systems and usable without an IDE, but also productive and being especially +good at networking and concurrency," notes Federico Tomassetti in his[ +blog](https://tomassetti.me/best-programming-languages/). "Other than a well-thought design, it has some specific +features for concurrency like a type of light-weight processes called goroutines." + +Goroutines do not have names; they are just anonymous workers. They expose no unique identifier, name, or data structure +to the programmer. Some people are surprised by this, expecting the go statement to return some item that can be used to +access and control the goroutine later. + +The fundamental reason goroutines are anonymous is so that the full Go language is available when programming concurrent +code. By contrast, the usage patterns that develop when threads and goroutines are named can restrict what a library +using them can do. + +For example, once one names a goroutine and constructs a model around it, it becomes special, and one would be tempted +to associate _all_ computation with that goroutine—ignoring the possibility of using multiple, possibly shared +goroutines for the processing. If the net/http package associated per-request state with a goroutine, clients would be +unable to use more goroutines when serving a request. + +Go solves the problems of modern cloud development, delivering a standard idiomatic APIs designed around user needs, +plus out-of-the-box support for multiple cloud environments (including on-premises), the ability to write and test +locally (run in production), and open cloud development . . . granting development teams the power to choose and the +power to move. + +## **Resources for Learning More** + +* Go.dev (when it’s live) +* http://linuxgizmos.com/latest-edgex-iot-middleware-release-gets-smaller-faster-and-more-secure/ or similar? +* https://ewanvalentine.io/microservices-in-golang-part-1/ (through part 10) is a pretty nice walk-through of Go with +* microservices (using go-micro). Do we want to cite? Similarly,[ https://awesome-go.com/](https://awesome-go.com/) diff --git a/go.dev/content/solutions/devops.md b/go.dev/content/solutions/devops.md deleted file mode 100644 index 6a2264fa..00000000 --- a/go.dev/content/solutions/devops.md +++ /dev/null @@ -1,182 +0,0 @@ ---- -title: "Go for Development Operations & Site Reliability Engineering (SRE)" -linkTitle: "Development Operations & Site Reliability Engineering" -description: "Go Helps Enterprises Automate and Scale for CI/CD" -date: 2019-10-03T17:16:43-04:00 -series: Use Cases ---- - -### _Go Helps Enterprises Automate and Scale for CI/CD_ - - -## **Why Use Go for DevOps & SRE** - -Development Operations (DevOps) teams help engineering organizations automate tasks and improve their continuous -integration and continuous delivery and deployment (CI/CD) process. DevOps can topple developmental silos and implement -tooling and automation to enhance software development, deployment, and support. - - - -Site Reliability Engineering (SRE) was born at Google to make the company’s “large-scale sites more reliable, efficient, -and scalable,”[ writes Silvia Fressard](https://opensource.com/article/18/10/what-site-reliability-engineer), an -independent DevOps consultant. “And the practices they developed responded so well to Google’s needs that other big tech -companies, such as Amazon and Netflix, also adopted them.” SRE requires a mix of development and operations skills, and -“[empowers software developers](https://stackify.com/site-reliability-engineering/) to own the ongoing daily operation -of their applications in production.” - - - -Go serves both siblings, DevOps and SRE, with its fast build times and lean syntax—readily supporting automation while -scaling for speed and code maintainability as development infrastructure grows over time. - - -## **Who Uses Go for DevOps & SRE** - - -### **Docker** - -Docker is a software-as-a-service (SaaS) product, written in Go, that uses operating-system level virtualization to -develop and deliver software in containers hosted on a Docker Engine. DevOps/SRE teams leverage Docker to “[drive secure -automation and deployment at massive scale](https://www.docker.com/solutions/cicd),” supporting their CI/CD efforts. - - - - -### **Google** - -Google leverages Go for the Google Cloud Platform (GCP), as well as at the heart of Kubernetes—an open-source -container-orchestration system, written in Go, for automating application deployment, scaling, and management. At[ -Google](https://landing.google.com/sre/), SRE's "protect, provide for, and progress the software and systems behind all -of Google’s public services—Google Search, Ads, Gmail, Android, YouTube, and App Engine, to name just a few—with an -ever-watchful eye on their availability, latency, performance, and capacity… they keep important, revenue-critical -systems up and running.” - - -### **IBM** - -IBM’s DevOps teams are heavily invested in Docker and Kubernetes, plus other DevOps and CI/CD tools written in Go as -found on the company’s [GitHub](https://github.com/IBM?utf8=%E2%9C%93&q=&type=&language=go). IBM engineering -organizations leverage Red Hat's cloud platform, [OpenShift](https://www.openshift.com), written primarily in Go, and -Red Hat's new addition, [CoreOS](https://coreos.com). CoreOS, also written in Go, delivers one of the best enterprise -Kubernetes distributions available in Tectonic—bringing automated operations, Open Cloud Services, Prometheus -monitoring, and more to simplify Kubernetes deployments, reduce engineering operating costs, and speed time to -production. - - -### **Microsoft** - -Microsoft DevOps includes the company's fully managed Azure Kubernetes Service -([AKS](https://azure.microsoft.com/en-us/services/kubernetes-service/)). AKS was designed to make deploying and managing -containerized applications easy by offering serverless Kubernetes, an integrated CI/CD experience, and enterprise-grade -security and governance. - -Like IBM, Microsoft is also leveraging Red Hat's OpenShift, written in Go, via [Azure Red Hat -OpenShift](https://azure.microsoft.com/en-us/services/openshift/) services. This Microsoft solution provides DevOps -teams with OpenShift clusters to maintain regulatory compliance and focus on application development. - -[summary of how Microsoft uses Go for DevOps/SRE? Does Robert van Gent have details?] - - -### **Terraform** - -Terraform is a[ tool for building, changing, and versioning infrastructure](https://www.terraform.io/intro/index.html) -safely and efficiently. It can manage existing and popular service providers as well as custom in-house solutions. -Written in Go, Terraform supports a number of cloud infrastructure providers such as AWS, IBM Cloud, GCP, and Microsoft -Azure. From a DevOps/SRE perspective, Terraform describes infrastructure as code using a high-level configuration -syntax. It leverages execution plans and resource graphs to automate changes to infrastructure with minimal human -interaction. - - -## **How to Use Go for DevOps & SRE** - -Go has been enthusiastically adopted by the DevOps and SRE communities. As previously noted, many underpinnings of the -modern cloud environment are themselves written in Go—including Docker, Etcd, Istio, Kubernetes, Prometheus, Terraform, -and many others. - -[do we want text for featured users/projects, or just logos? links?] - -[can we say that Google has switched to recommend Go for all new SRE code?] - -DevOps/SRE teams write software ranging from small one-time scripts, to command-line interfaces (CLI), to complex -automation and services where Go excels for all of them: - - - -* For small scripts, Go's fast build times and automatic formatter (gofmt) enable rapid iteration. Go’s extensive -* standard library—including packages for common needs like HTTP, file I/O, time, regular expressions, exec, and -* JSON/CSV formats—lets DevOps/SREs get right into their business logic. Plus, Go's static type system and explicit -* error handling make even small scripts more robust. For CLIs, every site reliability engineer has written “one-time -* use” scripts that turned into CLIs used by dozens of other engineers every day. And small deployment automation -* scripts turn into rollout management services. With Go, DevOps/SREs are in a great position to be successful when -* software scope inevitably creeps. For larger applications, Go's garbage collector means DevOps/SRE teams don't have -* to worry about memory management. And Go’s automatic documentation generator (godoc) makes code self-documenting. - - - -With Go, DevOps/SREs seek to “balance the risk of unavailability with the goals of rapid innovation and efficient -service operations,"[ says Marc Alvidrez](https://landing.google.com/sre/), engineer at Google. "So that users’ overall -happiness—with features, service, and performance—is optimized." - -[Robert van Gent notes that he’s not sure what to put here for "key solutions" other than linkifying some of the things -like gofmt, godoc, standard library pkgs. The range of software here is large and overlaps with CLIs and Services.] - - -## **Go Solutions to Legacy Challenges** - -Traditionally, “DevOps has been more about collaboration between developer and operations. It has also focused more on -deployments,"[ says Matt Watson](https://stackify.com/site-reliability-engineering/), founder and CEO of Stackify. "Site -reliability engineering is more focused on operations and monitoring. Depending on how you define DevOps, it could be -related or not." - - - -Across deployment, operations, and monitoring, DevOps/SRE teams strive to achieve simplicity, reliability, and speed -with their systems. But in complex development environments, such disparate goals are hard to unite. Go helps by -allowing engineers to focus on_ building_, even as they optimize for deployment and support. - - - -For simplicity, Go delivers code readability, built in testing/profiling/benchmarking, a standard library, and a -homogenous environment—statically linked—[ meaning](https://blog.gopheracademy.com/advent-2018/go-devops/) “there’s no -need for external libraries, copy dependencies or worry for imports. All the code and its dependencies are in the -binary, so that’s all you need to distribute.” - - - -For reliability, open source Go delivers pointers, error handling, and safe Type, meaning string operations on an int -cannot happen, because it will be caught by the compiler. - - - -For speed, Go delivers fast compilation and machine-code execution, small binary sizes, superior garbage collection, and -import-defined dependences, meaning all dependencies are included in the binary. For a list of practical Go benchmarks, -visit this[ list of performance benchmarks](https://stackimpact.com/blog/practical-golang-benchmarks/) in various -functionalities. - - - -"With systems becoming distributed and more complex—spread over a group of services (or microservices),"[ writes Natalie -Pistunovich](https://blog.gopheracademy.com/advent-2018/go-devops/), engineering manager at Fraugster. "Observability is -becoming a trade that helps keep you on track with the system’s health." - - - -Many of the modern tooling apps, for DevOps/SRE and for observability, are written in Go. For example: - - - -* [Grafana](https://grafana.com/) [Helm](https://helm.sh/) for Kubernetes [Istio](https://istio.io/) -* [Jaeger](https://www.jaegertracing.io/) [The Open Tracing Project](https://opentracing.io/) - - - -As DevOps/SRE teams automate the processes between software development and IT teams, Go can help them build, test, and -release software faster and more reliably. Scaling infrastructure and development for CI/CD is critical to many large -technology firms today, and Go is the right language for enterprises looking to scale successfully. - - -## **Resources for Learning More** - - - -* Go.dev (when it’s live) https://github.com/golang-migrate/migrate diff --git a/go.dev/content/solutions/devops/cog.png b/go.dev/content/solutions/devops/cog.png new file mode 100644 index 00000000..145645e9 Binary files /dev/null and b/go.dev/content/solutions/devops/cog.png differ diff --git a/go.dev/content/solutions/devops/index.md b/go.dev/content/solutions/devops/index.md new file mode 100644 index 00000000..38094b26 --- /dev/null +++ b/go.dev/content/solutions/devops/index.md @@ -0,0 +1,187 @@ +--- +title: "Go for Development Operations & Site Reliability Engineering (SRE)" +linkTitle: "DevOps & Site Reliability" +description: "Go Helps Enterprises Automate and Scale for CI/CD" +date: 2019-10-03T17:16:43-04:00 +series: Use Cases +resources: +- name: icon + src: cog.png + params: + alt: cog +--- + +### _Go Helps Enterprises Automate and Scale for CI/CD_ + + +## **Why Use Go for DevOps & SRE** + +Development Operations (DevOps) teams help engineering organizations automate tasks and improve their continuous +integration and continuous delivery and deployment (CI/CD) process. DevOps can topple developmental silos and implement +tooling and automation to enhance software development, deployment, and support. + + + +Site Reliability Engineering (SRE) was born at Google to make the company’s “large-scale sites more reliable, efficient, +and scalable,”[ writes Silvia Fressard](https://opensource.com/article/18/10/what-site-reliability-engineer), an +independent DevOps consultant. “And the practices they developed responded so well to Google’s needs that other big tech +companies, such as Amazon and Netflix, also adopted them.” SRE requires a mix of development and operations skills, and +“[empowers software developers](https://stackify.com/site-reliability-engineering/) to own the ongoing daily operation +of their applications in production.” + + + +Go serves both siblings, DevOps and SRE, with its fast build times and lean syntax—readily supporting automation while +scaling for speed and code maintainability as development infrastructure grows over time. + + +## **Who Uses Go for DevOps & SRE** + + +### **Docker** + +Docker is a software-as-a-service (SaaS) product, written in Go, that uses operating-system level virtualization to +develop and deliver software in containers hosted on a Docker Engine. DevOps/SRE teams leverage Docker to “[drive secure +automation and deployment at massive scale](https://www.docker.com/solutions/cicd),” supporting their CI/CD efforts. + + + + +### **Google** + +Google leverages Go for the Google Cloud Platform (GCP), as well as at the heart of Kubernetes—an open-source +container-orchestration system, written in Go, for automating application deployment, scaling, and management. At[ +Google](https://landing.google.com/sre/), SRE's "protect, provide for, and progress the software and systems behind all +of Google’s public services—Google Search, Ads, Gmail, Android, YouTube, and App Engine, to name just a few—with an +ever-watchful eye on their availability, latency, performance, and capacity… they keep important, revenue-critical +systems up and running.” + + +### **IBM** + +IBM’s DevOps teams are heavily invested in Docker and Kubernetes, plus other DevOps and CI/CD tools written in Go as +found on the company’s [GitHub](https://github.com/IBM?utf8=%E2%9C%93&q=&type=&language=go). IBM engineering +organizations leverage Red Hat's cloud platform, [OpenShift](https://www.openshift.com), written primarily in Go, and +Red Hat's new addition, [CoreOS](https://coreos.com). CoreOS, also written in Go, delivers one of the best enterprise +Kubernetes distributions available in Tectonic—bringing automated operations, Open Cloud Services, Prometheus +monitoring, and more to simplify Kubernetes deployments, reduce engineering operating costs, and speed time to +production. + + +### **Microsoft** + +Microsoft DevOps includes the company's fully managed Azure Kubernetes Service +([AKS](https://azure.microsoft.com/en-us/services/kubernetes-service/)). AKS was designed to make deploying and managing +containerized applications easy by offering serverless Kubernetes, an integrated CI/CD experience, and enterprise-grade +security and governance. + +Like IBM, Microsoft is also leveraging Red Hat's OpenShift, written in Go, via [Azure Red Hat +OpenShift](https://azure.microsoft.com/en-us/services/openshift/) services. This Microsoft solution provides DevOps +teams with OpenShift clusters to maintain regulatory compliance and focus on application development. + +[summary of how Microsoft uses Go for DevOps/SRE? Does Robert van Gent have details?] + + +### **Terraform** + +Terraform is a[ tool for building, changing, and versioning infrastructure](https://www.terraform.io/intro/index.html) +safely and efficiently. It can manage existing and popular service providers as well as custom in-house solutions. +Written in Go, Terraform supports a number of cloud infrastructure providers such as AWS, IBM Cloud, GCP, and Microsoft +Azure. From a DevOps/SRE perspective, Terraform describes infrastructure as code using a high-level configuration +syntax. It leverages execution plans and resource graphs to automate changes to infrastructure with minimal human +interaction. + + +## **How to Use Go for DevOps & SRE** + +Go has been enthusiastically adopted by the DevOps and SRE communities. As previously noted, many underpinnings of the +modern cloud environment are themselves written in Go—including Docker, Etcd, Istio, Kubernetes, Prometheus, Terraform, +and many others. + +[do we want text for featured users/projects, or just logos? links?] + +[can we say that Google has switched to recommend Go for all new SRE code?] + +DevOps/SRE teams write software ranging from small one-time scripts, to command-line interfaces (CLI), to complex +automation and services where Go excels for all of them: + + + +* For small scripts, Go's fast build times and automatic formatter (gofmt) enable rapid iteration. Go’s extensive +* standard library—including packages for common needs like HTTP, file I/O, time, regular expressions, exec, and +* JSON/CSV formats—lets DevOps/SREs get right into their business logic. Plus, Go's static type system and explicit +* error handling make even small scripts more robust. For CLIs, every site reliability engineer has written “one-time +* use” scripts that turned into CLIs used by dozens of other engineers every day. And small deployment automation +* scripts turn into rollout management services. With Go, DevOps/SREs are in a great position to be successful when +* software scope inevitably creeps. For larger applications, Go's garbage collector means DevOps/SRE teams don't have +* to worry about memory management. And Go’s automatic documentation generator (godoc) makes code self-documenting. + + + +With Go, DevOps/SREs seek to “balance the risk of unavailability with the goals of rapid innovation and efficient +service operations,"[ says Marc Alvidrez](https://landing.google.com/sre/), engineer at Google. "So that users’ overall +happiness—with features, service, and performance—is optimized." + +[Robert van Gent notes that he’s not sure what to put here for "key solutions" other than linkifying some of the things +like gofmt, godoc, standard library pkgs. The range of software here is large and overlaps with CLIs and Services.] + + +## **Go Solutions to Legacy Challenges** + +Traditionally, “DevOps has been more about collaboration between developer and operations. It has also focused more on +deployments,"[ says Matt Watson](https://stackify.com/site-reliability-engineering/), founder and CEO of Stackify. "Site +reliability engineering is more focused on operations and monitoring. Depending on how you define DevOps, it could be +related or not." + + + +Across deployment, operations, and monitoring, DevOps/SRE teams strive to achieve simplicity, reliability, and speed +with their systems. But in complex development environments, such disparate goals are hard to unite. Go helps by +allowing engineers to focus on_ building_, even as they optimize for deployment and support. + + + +For simplicity, Go delivers code readability, built in testing/profiling/benchmarking, a standard library, and a +homogenous environment—statically linked—[ meaning](https://blog.gopheracademy.com/advent-2018/go-devops/) “there’s no +need for external libraries, copy dependencies or worry for imports. All the code and its dependencies are in the +binary, so that’s all you need to distribute.” + + + +For reliability, open source Go delivers pointers, error handling, and safe Type, meaning string operations on an int +cannot happen, because it will be caught by the compiler. + + + +For speed, Go delivers fast compilation and machine-code execution, small binary sizes, superior garbage collection, and +import-defined dependences, meaning all dependencies are included in the binary. For a list of practical Go benchmarks, +visit this[ list of performance benchmarks](https://stackimpact.com/blog/practical-golang-benchmarks/) in various +functionalities. + + + +"With systems becoming distributed and more complex—spread over a group of services (or microservices),"[ writes Natalie +Pistunovich](https://blog.gopheracademy.com/advent-2018/go-devops/), engineering manager at Fraugster. "Observability is +becoming a trade that helps keep you on track with the system’s health." + + + +Many of the modern tooling apps, for DevOps/SRE and for observability, are written in Go. For example: + + + +* [Grafana](https://grafana.com/) [Helm](https://helm.sh/) for Kubernetes [Istio](https://istio.io/) +* [Jaeger](https://www.jaegertracing.io/) [The Open Tracing Project](https://opentracing.io/) + + + +As DevOps/SRE teams automate the processes between software development and IT teams, Go can help them build, test, and +release software faster and more reliably. Scaling infrastructure and development for CI/CD is critical to many large +technology firms today, and Go is the right language for enterprises looking to scale successfully. + + +## **Resources for Learning More** + + + +* Go.dev (when it’s live) https://github.com/golang-migrate/migrate diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index d4292677..4a016562 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -884,3 +884,81 @@ a.Footer-link { padding: 1rem 0; } } +.Solutions-title, +.Solutions-headline, +.Solutions-useCases { + padding: 0 1.5rem; +} +.Solutions-title h1 { + font-size: 2.625rem; + line-height: 2rem; +} +.Solutions-headline { + background-color: #fefadd; +} +.Solutions-headline p { + font-size: 1.5rem; + max-width: 23rem; + padding: 2rem 0; +} +.Solutions-useCasesHeader h2 { + letter-spacing: 0.125rem; + text-transform: uppercase; +} +.Solutions-useCaseList { + display: flex; + flex: 1 0 100%; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; + list-style: none; + margin: 0 0 1rem -1rem; + padding-left: 0; +} +.Solutions-useCase { + display: flex; + flex: 1; + margin: 1rem 0 0 1rem; /* Gutter between grid cells. */ + padding: 1.4rem; +} +.Solutions-useCase { + border-radius: 0.625rem; + box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); +} +@media only screen and (min-width: 57.7rem) { + .Solutions-useCase { + border-radius: 0; + box-shadow: none; + } + .Solutions-useCase:hover { + border-radius: 0.625rem; + box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); + transition: all 0.2s ease-in-out; + } +} +.Solutions-useCaseLogo { + height: 3.875rem; + width: 3.875rem; +} +.Solutions-useCaseTitle { + margin: .75rem 0 0; +} +.Solutions-useCaseHeader { + align-items: center; + display: flex; + flex-direction: column; + justify-content: center; + max-width: 14rem; + text-align: center; +} +.Solutions-useCaseBody { + display: flex; + flex-direction: column; + justify-content: center; + margin: 0 1rem; +} +.Solutions-useCaseAction { + font-size: 1.125rem; + font-weight: bold; + margin-bottom: 0; +} diff --git a/go.dev/themes/default/layouts/solutions/section.html b/go.dev/themes/default/layouts/solutions/section.html index de149d1d..d5001a2e 100644 --- a/go.dev/themes/default/layouts/solutions/section.html +++ b/go.dev/themes/default/layouts/solutions/section.html @@ -1,17 +1,47 @@ {{define "main"}} +
    +
    +

    Solutions

    +
    +
    +
    +
    +

    + Learn about how Go can help your development process +

    +
    +
    +
    +
    +
    +

    Use Cases

    +
    +
      + {{range where .Pages "Params.series" "Use Cases"}} +
    • +
      + +

      {{.LinkTitle}}

      +
      +
      +

      + {{.Description}} +

      +

      + Learn More > +

      +
      +
    • + {{end}} +
    +
    +
    -

    {{.Title}}

    - {{range .Params.authors}} - - {{end}} - - {{.Content}} -

    Use Cases

    - {{range where .Pages "Params.series" "Use Cases"}} -

    - {{.Title}} -

    - {{end}}

    Case Studies

    {{range where .Pages "Params.series" "Case Studies"}}

    -- cgit v1.3 From 3373f6a544a95af82d3e11e8cacd6398ea5f18ef Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Wed, 9 Oct 2019 14:56:46 -0400 Subject: [x/go.dev] home: add icons for Use Cases on the homepage This adds special, white icons for the Use Cases on the homepage, as the background is a dark green gradient. X-GoDev-Commit: d525ba7af43b8013e5c09b00eefe947327168128 --- go.dev/content/solutions/cloud/globe-white.png | Bin 0 -> 3105 bytes go.dev/content/solutions/cloud/index.md | 4 ++++ go.dev/content/solutions/devops/cog-white.png | Bin 0 -> 3727 bytes go.dev/content/solutions/devops/index.md | 4 ++++ go.dev/themes/default/assets/css/styles.css | 7 +++++++ go.dev/themes/default/layouts/index.html | 7 ++++++- 6 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 go.dev/content/solutions/cloud/globe-white.png create mode 100644 go.dev/content/solutions/devops/cog-white.png diff --git a/go.dev/content/solutions/cloud/globe-white.png b/go.dev/content/solutions/cloud/globe-white.png new file mode 100644 index 00000000..2f22bf20 Binary files /dev/null and b/go.dev/content/solutions/cloud/globe-white.png differ diff --git a/go.dev/content/solutions/cloud/index.md b/go.dev/content/solutions/cloud/index.md index 2aed8507..2b586531 100644 --- a/go.dev/content/solutions/cloud/index.md +++ b/go.dev/content/solutions/cloud/index.md @@ -8,6 +8,10 @@ resources: src: globe.png params: alt: globe +- name: icon-white + src: globe-white.png + params: + alt: globe --- ### _Go Helps Enterprises Build and Scale Cloud Computing Systems_ diff --git a/go.dev/content/solutions/devops/cog-white.png b/go.dev/content/solutions/devops/cog-white.png new file mode 100644 index 00000000..43b3374d Binary files /dev/null and b/go.dev/content/solutions/devops/cog-white.png differ diff --git a/go.dev/content/solutions/devops/index.md b/go.dev/content/solutions/devops/index.md index 38094b26..6d2bbd00 100644 --- a/go.dev/content/solutions/devops/index.md +++ b/go.dev/content/solutions/devops/index.md @@ -9,6 +9,10 @@ resources: src: cog.png params: alt: cog +- name: icon-white + src: cog-white.png + params: + alt: cog --- ### _Go Helps Enterprises Automate and Scale for CI/CD_ diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index 4a016562..cec68048 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -368,12 +368,19 @@ a:hover { padding: 1em 0 0 1em; /* Gutter between grid cells. */ } .UseCase-logo { + align-items: center; background: linear-gradient(10.64deg, #007d9c 0%, #00a29c 100%); border-radius: 50%; + display: flex; height: 3.75rem; + justify-content: center; margin: auto; width: 3.75rem; } +.UseCase-logo img { + height: 2.625rem; + width: 2.625rem; +} .UseCase-title { text-align: center; } diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index 4c0e5a4c..c679fe4b 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -46,7 +46,12 @@ {{range where $solutions.Pages "Params.series" "Use Cases"}}
    - +

    {{.LinkTitle}}

    {{.Description}} -- cgit v1.3 From d6b7d304e52ceac2f5934b85a2a6617a60572757 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Fri, 11 Oct 2019 16:54:51 -0400 Subject: [x/go.dev] solutions: add Case Studies section Implemented the same as the homepage, as there are open questions about the design for the Solutions page. Change-Id: I8015d603a893ea303ff9aa13c69aa1d8123773f6 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go.dev/+/571223 Reviewed-by: Andrew Bonventre X-GoDev-Commit: 10c6f43002ef71f6222ad0760595400852eadaf4 --- go.dev/themes/default/assets/css/styles.css | 70 +++++++++++++++++++++- .../themes/default/layouts/solutions/section.html | 28 ++++++--- 2 files changed, 87 insertions(+), 11 deletions(-) diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index cec68048..59f23436 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -308,9 +308,9 @@ a:hover { .WhoUses-caseStudy { display: flex; flex: 0 1 11.375rem; + height: 11.6875rem; justify-content: center; margin: 1em; - min-height: 11.6875rem; } .WhoUses-caseStudy p { margin-bottom: 0; @@ -893,9 +893,14 @@ a.Footer-link { } .Solutions-title, .Solutions-headline, -.Solutions-useCases { +.Solutions-useCases, +.Solutions-caseStudies { padding: 0 1.5rem; } +.Solutions-useCases, +.Solutions-caseStudies { + margin-bottom: 6.25rem; +} .Solutions-title h1 { font-size: 2.625rem; line-height: 2rem; @@ -908,7 +913,8 @@ a.Footer-link { max-width: 23rem; padding: 2rem 0; } -.Solutions-useCasesHeader h2 { +.Solutions-useCasesHeader h2, +.Solutions-caseStudiesHeader h2 { letter-spacing: 0.125rem; text-transform: uppercase; } @@ -969,3 +975,61 @@ a.Footer-link { font-weight: bold; margin-bottom: 0; } +.Solutions-caseStudyList { + display: flex; + flex-wrap: wrap; + justify-content: space-evenly; + list-style: none; + margin: 0 0 1rem -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ + padding: 0; +} +.Solutions-caseStudy { + margin: 1rem 0 0 1rem; +} +.Solutions-caseStudy p { + flex: 0; +} +.Solutions-caseStudy a:link, +.Solutions-caseStudy a:visited { + border-radius: 0.625rem; + box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); /* padding: 0.25rem 1.5rem; */ + display: inline-flex; + flex-direction: column; + height: 11.375rem; + text-align: center; + width: 11.375rem; +} +.Solutions-caseStudyLogo { + display: flex; + flex: 1; + justify-content: center; +} +.Solutions-caseStudyLogo img { + align-self: center; + max-height: 7.5rem; + max-width: 7.5rem; +} +@media only screen and (min-width: 57.7rem) { + .Solutions-caseStudy { + flex: 0 1 33%; + margin: 0; + } + .Solutions-caseStudy a:link, + .Solutions-caseStudy a:visited { + box-shadow: 0 0.125rem 0.5rem 0 transparent; + color: transparent; + } + .Solutions-caseStudy a:link:hover, + .Solutions-caseStudy a:visited:hover { + box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); + color: #6e7072; + transition: all 0.2s ease-in-out; + } +} +@media only screen and (min-width: 66.75rem) { + .Solutions-caseStudy { + flex: 1; + padding: 1rem 0 0 1rem; /* Gutter between grid cells. */ + text-align: center; + } +} diff --git a/go.dev/themes/default/layouts/solutions/section.html b/go.dev/themes/default/layouts/solutions/section.html index d5001a2e..a93fa0da 100644 --- a/go.dev/themes/default/layouts/solutions/section.html +++ b/go.dev/themes/default/layouts/solutions/section.html @@ -41,12 +41,24 @@

    -
    -

    Case Studies

    - {{range where .Pages "Params.series" "Case Studies"}} -

    - {{.Title}} -

    - {{end}} -
    +
    +
    +
    +

    Who Uses Go

    +
    + +
    +
    {{end}} -- cgit v1.3 From c279e3af48453c90e25303ead169b78ab9fc7a0e Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Mon, 14 Oct 2019 16:43:57 -0400 Subject: [x/go.dev] all: add cloudbuild.ci.yaml for Cloud Build This configuration will be used on change requests to the repository. It elides the deployment step from the primary cloudbuild.yaml, but ensures that our Go code, and hugo configuration, is valid. Change-Id: Ic28432809a4446863d32b4f2ecf9631296695bb9 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go.dev/+/572683 Reviewed-by: Julie Qiu X-GoDev-Commit: b3681ad1998a70604f97dc5bde2cf37cfeedb359 --- go.dev/cloudbuild.ci.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 go.dev/cloudbuild.ci.yaml diff --git a/go.dev/cloudbuild.ci.yaml b/go.dev/cloudbuild.ci.yaml new file mode 100644 index 00000000..fe1843fc --- /dev/null +++ b/go.dev/cloudbuild.ci.yaml @@ -0,0 +1,11 @@ +steps: + - name: 'mirror.gcr.io/library/golang' + entrypoint: bash + args: + - -c + - go run ./cmd/events/ > ./data/events.yaml + - name: 'gcr.io/cloud-builders/docker' + args: ['build', '-f', 'Dockerfile.hugo', '-t', 'gcr.io/$PROJECT_ID/hugo', '.'] + - name: 'gcr.io/$PROJECT_ID/hugo' +images: + - 'gcr.io/$PROJECT_ID/hugo' -- cgit v1.3 From 624776173a420f5c7a2e2a719a02bdb41754a7e7 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Mon, 14 Oct 2019 18:58:09 -0400 Subject: [x/go.dev] data: refresh event data Change-Id: Ibf4b037c1e97fa12cc91f7630783a78a423dc1c9 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go.dev/+/573156 CI-Result: Cloud Build Reviewed-by: Alexander Rakoczy X-GoDev-Commit: be2bc6d5cac516c003259b475fd0e29c3f371e58 --- go.dev/data/events.yaml | 401 ++++++++++++++++++++++++------------------------ 1 file changed, 199 insertions(+), 202 deletions(-) diff --git a/go.dev/data/events.yaml b/go.dev/data/events.yaml index ba9ac3cd..28554350 100644 --- a/go.dev/data/events.yaml +++ b/go.dev/data/events.yaml @@ -2,22 +2,45 @@ # To update, run: # go run github.com/godevsite/go.dev/cmd/events > data/events.yaml all: -- city: London - country: United Kingdom +- city: Jakarta + country: Indonesia description: |- - The London Gophers Study Group is a London-based community for people that would like to study the Go programming language in a supportive environment. We are a sister group to the LondonGophers.
    - For more information see our README.
    - We follow the Go Code of Conduct, in summary:
    - - Treat everyone with respect and kindness.
    - Be thoughtful in how you communicate.
    - Don’t be destructive or inflammatory. - id: "264953347" - local_date: Oct 1, 2019 - local_time: "2019-10-01T18:30:00+01:00" - localizedcountry: United Kingdom - localizedlocation: London, United Kingdom - name: September Go Study Group hosted by Cloudreach + A meetup group to discuss the Go Programming Language in Jakarta. 
    + (from golang.org) 
    + The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. + id: "265309911" + local_date: Oct 15, 2019 + local_time: "2019-10-15T19:00:00+07:00" + localizedcountry: Indonesia + localizedlocation: Jakarta, Indonesia + name: 'Meetup: Profiling Applications, and Face Similarity Detection with Go' state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/5/0/1/8/thumb_480620504.jpeg - url: https://www.meetup.com/LondonGophersStudyGroup/events/264953347 + thumbnailurl: https://secure.meetupstatic.com/photos/event/9/a/f/b/thumb_449379675.jpeg + url: https://www.meetup.com/GoJakarta/events/265309911 +- city: Athens + country: Greece + description: |- + Welcome to Athens Gophers.
    + This is a group for all those interested in learning about and working with the Go programming language (Golang).
    +

    + Anyone interested in Co-organizing or Presenting in future meetups, please get in contact.
    +

    +

    + About Us:

    + As gophers we follow the Code of Conduct to make this a pleasant and inclusive environment for everyone:
    + https://golang.org/conduct
    + Follow us on twitter: @AthensGolang (https://twitter.com/AthensGolang), 
    + or come join us in #greece on Slack at https://invite.slack.golangbridge.org
    +
    + id: "265470647" + local_date: Oct 15, 2019 + local_time: "2019-10-15T19:00:00+03:00" + localizedcountry: Greece + localizedlocation: Athens, Greece + name: 6th Athens Gophers Meetup + state: "" + thumbnailurl: "" + url: https://www.meetup.com/Athens-Gophers/events/265470647 - city: Eugene country: USA description: |- @@ -25,225 +48,199 @@ all: Go is a Google-funded language for massively-scalable distributed systems that is statically typed and compiled. It has quickly stabilized and is running head-to-head with C++, Java, C#, etc. (The Computer Language Benchmarks Game - Go). However, a larger-than-expected portion of new Gophers is made up of dynamic/interpreted language users who tend to be seeking relief from the cruft in their current languages and/or a more clear future within the horizontally-growing landscape of modern computing.
    If you're building web apps, designing APIs, thrive on scalability, or you're simply curious about this fun new(ish) language, let's meetup.
    • Meetup resources are available at www.euggo.org  - id: wttfjryznbcb - local_date: Oct 1, 2019 - local_time: "2019-10-01T12:00:00-07:00" + id: wttfjryznbtb + local_date: Oct 15, 2019 + local_time: "2019-10-15T12:00:00-07:00" localizedcountry: USA localizedlocation: Eugene, OR name: Book Club state: OR thumbnailurl: https://secure.meetupstatic.com/photos/event/2/8/1/thumb_453660641.jpeg - url: https://www.meetup.com/EUG-Go/events/wttfjryznbcb -- city: Baltimore - country: USA - description: If you're interested in the Go Programming Language (aka Golang), - newbie, experienced or just curious, this is the meetup for you. We're an - inclusive group that aims for diversity in our membership, the talks we select - every month and your ideas for making this group thrive. Let's build an awesome - Go community in the Baltimore Metro Area. - id: twgcdqyznbcb - local_date: Oct 1, 2019 - local_time: "2019-10-01T18:30:00-04:00" - localizedcountry: USA - localizedlocation: Baltimore, MD - name: Baltimore Go Monthly Meeting - state: MD - thumbnailurl: https://secure.meetupstatic.com/photos/event/6/0/c/c/thumb_452184780.jpeg - url: https://www.meetup.com/BaltimoreGolang/events/twgcdqyznbcb -- city: Lehi + url: https://www.meetup.com/EUG-Go/events/wttfjryznbtb +- city: Ann Arbor country: USA description: |- - Join us on Slack!
    - The Utah Go User Group (#UTGO) is a community of people interested in software development and Google's Go programming language (Golang). Everyone is welcome.  We currently meet in Lehi. To discuss and vote on topic ideas, go to https://github.com/forgeutah/utah-go
    -
    - id: wjdlfryznbcb - local_date: Oct 1, 2019 - local_time: "2019-10-01T18:15:00-06:00" + A forum for people working in or around Ann Arbor with Go to discuss ideas, issues and share solutions. We will start to put together meetings as the group grows and topics are suggested. 
    + We seek to enable underrepresented people in tech to use Go as a tool to learn and teach programming, and, ultimately, to empower underrepresented groups in tech to help increase diversity in the Go community.  No prior programming language is needed to attend!

    + Submit a talk proposal, or come join us in #a2go channel in the gophers slack  https://invite.slack.golangbridge.org/ .

    A2Go Golang adopts the Go Code of Conduct (https://golang.org/conduct#code). Harassment, bullying, and discrimination are unacceptable here and if you witness or experience those or other harmful behaviors, please let the organizers know. The Code of Conduct extends to related events like after-meeting bar trips.
    + id: "264721689" + local_date: Oct 15, 2019 + local_time: "2019-10-15T18:00:00-04:00" localizedcountry: USA - localizedlocation: Lehi, UT - name: More than you ever wanted to know about errors - state: UT - thumbnailurl: https://secure.meetupstatic.com/photos/event/c/d/0/7/thumb_452692487.jpeg - url: https://www.meetup.com/utahgophers/events/wjdlfryznbcb -- city: Stockholm - country: Sweden + localizedlocation: Ann Arbor, MI + name: Monthly Meeting + state: MI + thumbnailurl: https://secure.meetupstatic.com/photos/event/1/c/f/3/thumb_483787411.jpeg + url: https://www.meetup.com/A2Go-Golang-developer-meetup/events/264721689 +- city: Ottawa + country: Canada description: |- - A group intended to enable golang nuts from Stockholm to meet up and share experiences. Join if you are interested in meeting other golang nuts for informal presentations and possibly even beer and pizza.
    - To email the group about relevant topics such as Go or recruiting Go developers, send to Go-Stockholm-list@meetup.com
    - Gopher originally drawn by Renée French.

    - Slack
    - Join us in the #stockholm channel on the Gophers Slack: https://invite.slack.golangbridge.org/

    - Code of Conduct
    - Go Stockholm operate under the Go Community Code of Conduct.
    - id: "262412256" - local_date: Oct 2, 2019 - local_time: "2019-10-02T17:30:00+02:00" - localizedcountry: Sweden - localizedlocation: Stockholm, Sweden - name: Go Meetup at Einride - state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/b/f/2/3/thumb_463728931.jpeg - url: https://www.meetup.com/Go-Stockholm/events/262412256 -- city: Sheffield + Calling all Ottawa Gophers!
    + We get together once a month to discuss the state of the union in Go land, bring in speakers to discuss their projects and generally share a drink and a bite with colleagues. New to Go or a hardened Gopher, all are welcome! + id: "264371478" + local_date: Oct 15, 2019 + local_time: "2019-10-15T18:00:00-04:00" + localizedcountry: Canada + localizedlocation: Ottawa, ON + name: Go Ottawa! October 2019 + state: "ON" + thumbnailurl: "" + url: https://www.meetup.com/Ottawa-Go-Meetup/events/264371478 +- city: London country: United Kingdom description: |- - We meet the first Thursday of every month to discuss interesting topics about the Go programming language.
    -
    - id: "264783401" - local_date: Oct 3, 2019 - local_time: "2019-10-03T18:00:00+01:00" + London Gophers (https://gophers.london), aka Go London User Group (GLUG), is a London-based community for anyone interested in the Go programming language.

    London Gophers provides opportunities to:

    - Discuss Go and related topics
    - Socialise with friendly people who are interested in Go
    - Find or fill Go-related jobs

    We want London Gophers to be a diverse and inclusive community. As such all attendees, organisers and sponsors are required to follow the Go community code of conduct
    +
    Twitter  - https://twitter.com/LondonGophers
    YouTube - https://www.youtube.com/c/LondonGophers
    GitHub - https://github.com/go-london-user-group 
    + id: "264779288" + local_date: Oct 16, 2019 + local_time: "2019-10-16T18:30:00+01:00" localizedcountry: United Kingdom - localizedlocation: Sheffield, United Kingdom - name: GoSheffield - October - state: "" - thumbnailurl: "" - url: https://www.meetup.com/GoSheffield/events/264783401 -- city: Kyiv - country: Ukraine - description: Kyiv meetups for gophers. Let's share our experience! - id: "264614585" - local_date: Oct 4, 2019 - local_time: "2019-10-04T19:00:00+03:00" - localizedcountry: Ukraine - localizedlocation: Kyiv, Ukraine - name: Kyiv Go Meetup September 2019 + localizedlocation: London, United Kingdom + name: October Gophers state: "" - thumbnailurl: "" - url: https://www.meetup.com/uagolang/events/264614585 -- city: Oslo - country: Norway + thumbnailurl: https://secure.meetupstatic.com/photos/event/4/3/d/thumb_465781085.jpeg + url: https://www.meetup.com/LondonGophers/events/264779288 +- city: Reston + country: USA description: |- - Go Oslo User Group was founded in 2018 and is a community open for everyone interested in go, at all levels.
    - Beginner and veteran gophers gather to watch presentations, participate in workshops, eat and drink.
    -

    - Welcome!
    - - id: "265143218" - local_date: Oct 9, 2019 - local_time: "2019-10-09T18:00:00+02:00" - localizedcountry: Norway - localizedlocation: Oslo, Norway - name: Go Oslo User Group October 2019 - state: "" - thumbnailurl: "" - url: https://www.meetup.com/Go-Oslo-User-Group/events/265143218 -- city: Berlin - country: Germany + (from golang.org)

    +
    + The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. + id: sfsjmpyznbvb + local_date: Oct 16, 2019 + local_time: "2019-10-16T18:45:00-04:00" + localizedcountry: USA + localizedlocation: Reston, VA + name: Monthly Meetup + state: VA + thumbnailurl: https://secure.meetupstatic.com/photos/event/7/f/7/thumb_433982039.jpeg + url: https://www.meetup.com/Golang-Reston/events/sfsjmpyznbvb +- city: Austin + country: USA description: |- - We are a group of Golang users. Our aim is to meet like minded people, share our experience with others and to promote the use of Go.
    - As Gophers and as Berliners, even if just visiting, we follow the Code of Conduct to make this a pleasant and inclusive environment for everyone:

    - https://golang.org/conduct
    http://berlincodeofconduct.org
    - Follow us on twitter: @GDGBerlinGolang - id: "259852469" - local_date: Oct 9, 2019 - local_time: "2019-10-09T19:00:00+02:00" - localizedcountry: Germany - localizedlocation: Berlin, Germany - name: October Golang meetup - state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/9/8/b/1/thumb_465459089.jpeg - url: https://www.meetup.com/golang-users-berlin/events/259852469 -- city: Manchester - country: United Kingdom - description: 'This is a group for anyone interested in the Go Programming language. - All skills levels are welcome: we'll explore blueprints, how-tos and build - some sample applications. Above all, this group is for sharing know-how and best-practices - among the community.' - id: tcljtqyznbmb - local_date: Oct 9, 2019 - local_time: "2019-10-09T18:30:00+01:00" - localizedcountry: United Kingdom - localizedlocation: Manchester, United Kingdom - name: Manchester Go meetup - state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/e/4/7/e/thumb_455218494.jpeg - url: https://www.meetup.com/golang-mcr/events/tcljtqyznbmb -- city: Seattle + A user group to meet and discuss the Go programming language (golang). Meetups are typically held on third Wednesdays at 6:30. Follow us on Twitter @atxgolang and join our chat rooms: #atx on Gopher Slack or #atxgolang on Freenode.
    + Please read the Code of Conduct.
    + Thank you to Capital Factory for sponsoring event space in 2019 for Austin Go Language User Group. Capital Factory is the center of gravity for entrepreneurs in Texas. They meet the best entrepreneurs in Texas and introduce them to their first investors, employees, mentors and customers.
    + Logo credit: The cowboy gopher image is a modified adaptation of Renée French's copyrighted gopher images and is Creative Commons Attributions 3.0 licensed.
    + Photo credit: Constantine @ATxTE

    + From golang.org:
    + The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. + id: ntwrdryznbvb + local_date: Oct 16, 2019 + local_time: "2019-10-16T19:00:00-05:00" + localizedcountry: USA + localizedlocation: Austin, TX + name: October Lightning Talks + state: TX + thumbnailurl: https://secure.meetupstatic.com/photos/event/4/7/1/e/thumb_462978206.jpeg + url: https://www.meetup.com/atxgolang/events/ntwrdryznbvb +- city: San Francisco country: USA description: |- - The Seattle Go User Group is a community for anyone interested in the Go programming language. 

    -

    - We provide opportunities to:
    - • Discuss Go and related topics 
    - • Socialize with people who are interested in Go
    - • Find or fill Go-related jobs 
    -

    - If you want to chat all things Go, feel free to join us on the Gopher slack. 
    - Invites can be found at https://invite.slack.golangbridge.org
    - There is a #seattle channel which can be joined by anyone, so come say hi!
    -

    - Our aim is to be a welcoming environment. As such all attendees, organizers and sponsors are required to follow the code of conduct. - id: dpshmpyznbmb - local_date: Oct 9, 2019 - local_time: "2019-10-09T13:00:00-07:00" + A meetup group to discuss the Go Programming Language.
    + (from golang.org)
    + The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. + id: "262495822" + local_date: Oct 16, 2019 + local_time: "2019-10-16T18:00:00-07:00" localizedcountry: USA - localizedlocation: Seattle, WA - name: Eastside Go Coffee - state: WA - thumbnailurl: https://secure.meetupstatic.com/photos/event/a/4/b/e/thumb_450342174.jpeg - url: https://www.meetup.com/golang/events/dpshmpyznbmb -- city: Hannover - country: Germany + localizedlocation: San Francisco, CA + name: '[GoSF] All about Microservices (Docker & Kubernetes) +Decentralized Storage + w/Go' + state: CA + thumbnailurl: https://secure.meetupstatic.com/photos/event/5/a/d/3/thumb_442823251.jpeg + url: https://www.meetup.com/golangsf/events/262495822 +- city: Amsterdam + country: Netherlands description: |- - The place to meet Go(lang) enthusiasts from the Hannover region. Drop by if you are interested in Golang or back end stuff in general :-)
    -

    - Find recently announced talks at golang.wtf! - id: nhvmtqyznbfb - local_date: Oct 10, 2019 - local_time: "2019-10-10T19:00:00+02:00" - localizedcountry: Germany - localizedlocation: Hannover, Germany - name: Hannover Gophers - Vol. 15 - state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/a/2/9/2/thumb_475541618.jpeg - url: https://www.meetup.com/Hannover-Gophers/events/nhvmtqyznbfb -- city: Lisbon - country: Portugal - description: "PortugalGophers is a Portugal based community for anyone interested - in the Go programming language.
    \n
    Our get together provides offline opportunities - to:
    ✅Discuss Go and related topics
    ✅ Socialise with friendly people who - are interested in Go
    ✅ Find or fill Go-related jobs 
    \n

    \nAll - attendees, organisers and sponsors are required to follow the Go community code - of conduct (https://golang.org/conduct). -

    If you would like to make a talk in one of our meetups, click here.
    \n\U0001F4E2Twitter 
    \n\U0001F4F9YouTube 
    \n
    " - id: "265144357" - local_date: Oct 10, 2019 - local_time: "2019-10-10T19:00:00+01:00" - localizedcountry: Portugal - localizedlocation: Lisbon, Portugal - name: October Gophers with Kat Zień + This group is for everybody who is interested in the Go programming language (https://golang.org/). We organize meetups with technical talks and social events. Contact us if you're interested in hosting a meetup or giving a talk!

    +

    + Slides of past meetups:
    + https://github.com/goamsterdam/meetups
    +

    + Join us on slack:
    + https://invite.slack.golangbridge.org
    + /join #amsterdam
    +
    + id: "265308416" + local_date: Oct 17, 2019 + local_time: "2019-10-17T18:00:00+02:00" + localizedcountry: Netherlands + localizedlocation: Amsterdam, Netherlands + name: Go meetup @ Schuberg Philis (Schiphol-Rijk) state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/9/c/f/2/thumb_485200178.jpeg - url: https://www.meetup.com/PortugalGophers/events/265144357 + thumbnailurl: https://secure.meetupstatic.com/photos/event/9/d/a/0/thumb_213520352.jpeg + url: https://www.meetup.com/golang-amsterdam/events/265308416 - city: Orlando country: USA description: Orlando's first meetup group dedicated to the Go Programming Language. All skill levels are welcome - whether you're a beginner or a full-fledged gopher. id: blgfpqyznbnb - local_date: Oct 10, 2019 - local_time: "2019-10-10T19:00:00-04:00" + local_date: Oct 17, 2019 + local_time: "2019-10-17T19:00:00-04:00" localizedcountry: USA localizedlocation: Orlando, FL name: Orlando Golang Monthly Meetup state: FL thumbnailurl: https://secure.meetupstatic.com/photos/event/9/7/c/4/thumb_441638852.jpeg url: https://www.meetup.com/OrlanGo/events/blgfpqyznbnb -- city: Graz - country: Austria +- city: New York + country: USA + description: | + Go Language meetups and more in the greatest city in the world!
    +
    + Our purpose is to help build the Go community within NYC. We are here to support individuals by providing a safe platform for them to speak, listen, and learn. When not hosting a meetup, we will help promote and support our partner groups and events to help build awareness for all things Go in NYC.
    + Follow us on twitter at @golangnyc.
    + id: "264955744" + local_date: Oct 17, 2019 + local_time: "2019-10-17T19:00:00-04:00" + localizedcountry: USA + localizedlocation: New York, NY + name: Golang NYC Meetup October + state: NY + thumbnailurl: https://secure.meetupstatic.com/photos/event/7/d/3/1/thumb_464912049.jpeg + url: https://www.meetup.com/golanguagenewyork/events/264955744 +- city: Boulder + country: USA + description: Come meet and learn from other Boulder-based gophers! + id: rbjqgryznbwb + local_date: Oct 17, 2019 + local_time: "2019-10-17T17:30:00-06:00" + localizedcountry: USA + localizedlocation: Boulder, CO + name: Boulder Monthly Go Meetup + state: CO + thumbnailurl: https://secure.meetupstatic.com/photos/event/4/a/e/f/thumb_460759183.jpeg + url: https://www.meetup.com/Boulder-Gophers/events/rbjqgryznbwb +- city: Englewood + country: USA + description: |- + If you want to learn or share your experiences or explore more about Go language, please join us over beer and pizza. Here are some resources you might want to check if you are new to Go:
    + First you should take the language tour: http://tour.golang.org/
    Then, you should visit:
    - https://golang.org/doc/code.html To learn how to organize your Go workspace
    - https://golang.org/doc/effective_go.html which would help you be more effective at writing Go
    - https://golang.org/ref/spec will help you learn more about the language itself
    - https://golang.org/doc/#articles For a lot more reading material
    + There are some awesome websites as well:
    - https://blog.gopheracademy.com Well great resources for Gophers in general
    - http://gotime.fm For a weekly podcast of Go awesomeness
    - https://gobyexample.com If you are looking for examples of how to do things in Go
    - http://go-database-sql.org If you are looking for how to use SQL databases in Go
    - http://gophervids.appspot.com For a list of Go related videos from various authors
    + Finally, https://github.com/golang/go/wiki#learning-more-about-go will give a list of more resources to learn Go + id: grnphryznbwb + local_date: Oct 17, 2019 + local_time: "2019-10-17T18:00:00-06:00" + localizedcountry: USA + localizedlocation: Englewood, CO + name: DTC Go Monthly meetup + state: CO + thumbnailurl: https://secure.meetupstatic.com/photos/event/6/0/e/d/thumb_459744813.jpeg + url: https://www.meetup.com/Denver-Go-Programming-Language-Meetup/events/grnphryznbwb +- city: Darmstadt + country: Germany description: |- - Die Programmiersprache Go hat einen Grazer "Stammtisch". 
    - Wir treffen uns jeden 2. Montag im Monat bei TAO Digital am Lendplatz.
    - Schau einfach vorbei oder besuche uns online unter GoGraz!
    - id: lbbhjlyznbtb - local_date: Oct 14, 2019 - local_time: "2019-10-14T19:00:00+02:00" - localizedcountry: Austria - localizedlocation: Graz, Austria - name: Go Language Usergroup Graz + GoBridge is focused on Go aka golang and part of the non-profit Bridge Foundry. The idea is to build bridges between underrepresented minorities in Tech to increase the diversity in Tech and Go in special. For more details about GoBridge, check out the official webpage
    + We will use this meetup for organizing events with this aim in mind and provide events for learning and exchange. As part of GoBridge, all our events will follow the Code of Conduct
    + If you have any question, feel free to contact us. + id: "265237018" + local_date: Oct 18, 2019 + local_time: "2019-10-18T17:00:00+02:00" + localizedcountry: Germany + localizedlocation: Darmstadt, Germany + name: 'Hacktoberfest Frankfurt ' state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/3/3/e/0/thumb_459373280.jpeg - url: https://www.meetup.com/Graz-Open-Source-Meetup/events/lbbhjlyznbtb + thumbnailurl: https://secure.meetupstatic.com/photos/event/c/5/7/f/thumb_479450559.jpeg + url: https://www.meetup.com/GoBridge-Frankfurt-Rhein-Main/events/265237018 -- cgit v1.3 From c4681701d22bb1998cd2d8f13e2d8aa03960e935 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Mon, 14 Oct 2019 18:23:42 -0400 Subject: [x/go.dev] all: remove firebase configuration The app is hosted exclusively on appengine now. Change-Id: Iafc210269d47fd2882277a9c52967db4f4eb86c4 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go.dev/+/573155 CI-Result: Cloud Build Reviewed-by: Alexander Rakoczy X-GoDev-Commit: 867b7d419cb795c99b543faa99e90e6a404b457a --- go.dev/.firebaserc | 6 ------ go.dev/Dockerfile.firebase | 5 ----- go.dev/config.toml | 4 ---- go.dev/firebase.json | 32 -------------------------------- 4 files changed, 47 deletions(-) delete mode 100644 go.dev/.firebaserc delete mode 100644 go.dev/Dockerfile.firebase delete mode 100644 go.dev/config.toml delete mode 100644 go.dev/firebase.json diff --git a/go.dev/.firebaserc b/go.dev/.firebaserc deleted file mode 100644 index 663d35d0..00000000 --- a/go.dev/.firebaserc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "projects": { - "staging": "go-dev-staging", - "prod": "go-dev-prod" - } -} diff --git a/go.dev/Dockerfile.firebase b/go.dev/Dockerfile.firebase deleted file mode 100644 index b4cce494..00000000 --- a/go.dev/Dockerfile.firebase +++ /dev/null @@ -1,5 +0,0 @@ -FROM node:10 - -RUN npm install -g firebase-tools - -ENTRYPOINT ["/usr/local/bin/firebase"] diff --git a/go.dev/config.toml b/go.dev/config.toml deleted file mode 100644 index 67155947..00000000 --- a/go.dev/config.toml +++ /dev/null @@ -1,4 +0,0 @@ -baseURL = "https://go-dev-staging.app/" -languageCode = "en" -title = "go.dev" -theme = "default" diff --git a/go.dev/firebase.json b/go.dev/firebase.json deleted file mode 100644 index b005700b..00000000 --- a/go.dev/firebase.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "hosting": { - "public": "public", - "ignore": [ - "firebase.json", - "**/.*", - "**/node_modules/**" - ], - "redirects": [ - { - "source": "/explore", - "destination": "https://go-discovery.appspot.com/", - "type": 302 - }, - { - "source": "/explore/:explore*", - "destination": "https://go-discovery.appspot.com/:explore", - "type": 302 - }, - { - "source": "/pkg", - "destination": "https://go-discovery.appspot.com/", - "type": 302 - }, - { - "source": "/pkg/:pkg*", - "destination": "https://go-discovery.appspot.com/pkg/:pkg", - "type": 302 - } - ] - } -} -- cgit v1.3 From 5c8dd24ab777beeca6e20178438d6a3ddb40f694 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Mon, 14 Oct 2019 23:30:49 +0000 Subject: [x/go.dev] Revert "all: remove firebase configuration" This reverts commit 867b7d419cb795c99b543faa99e90e6a404b457a. Reason for revert: accidentally reverted hugo configuration. Change-Id: I60fb1e1b44e654bbc42f3156548d033badffcebd Reviewed-on: https://team-review.git.corp.google.com/c/golang/go.dev/+/573157 CI-Result: Cloud Build Reviewed-by: Alexander Rakoczy X-GoDev-Commit: 833c72b10b9f4ceef84632d3612ba86ec7503ee3 --- go.dev/.firebaserc | 6 ++++++ go.dev/Dockerfile.firebase | 5 +++++ go.dev/config.toml | 4 ++++ go.dev/firebase.json | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 go.dev/.firebaserc create mode 100644 go.dev/Dockerfile.firebase create mode 100644 go.dev/config.toml create mode 100644 go.dev/firebase.json diff --git a/go.dev/.firebaserc b/go.dev/.firebaserc new file mode 100644 index 00000000..663d35d0 --- /dev/null +++ b/go.dev/.firebaserc @@ -0,0 +1,6 @@ +{ + "projects": { + "staging": "go-dev-staging", + "prod": "go-dev-prod" + } +} diff --git a/go.dev/Dockerfile.firebase b/go.dev/Dockerfile.firebase new file mode 100644 index 00000000..b4cce494 --- /dev/null +++ b/go.dev/Dockerfile.firebase @@ -0,0 +1,5 @@ +FROM node:10 + +RUN npm install -g firebase-tools + +ENTRYPOINT ["/usr/local/bin/firebase"] diff --git a/go.dev/config.toml b/go.dev/config.toml new file mode 100644 index 00000000..67155947 --- /dev/null +++ b/go.dev/config.toml @@ -0,0 +1,4 @@ +baseURL = "https://go-dev-staging.app/" +languageCode = "en" +title = "go.dev" +theme = "default" diff --git a/go.dev/firebase.json b/go.dev/firebase.json new file mode 100644 index 00000000..b005700b --- /dev/null +++ b/go.dev/firebase.json @@ -0,0 +1,32 @@ +{ + "hosting": { + "public": "public", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "redirects": [ + { + "source": "/explore", + "destination": "https://go-discovery.appspot.com/", + "type": 302 + }, + { + "source": "/explore/:explore*", + "destination": "https://go-discovery.appspot.com/:explore", + "type": 302 + }, + { + "source": "/pkg", + "destination": "https://go-discovery.appspot.com/", + "type": 302 + }, + { + "source": "/pkg/:pkg*", + "destination": "https://go-discovery.appspot.com/pkg/:pkg", + "type": 302 + } + ] + } +} -- cgit v1.3 From 9b827872efebc285cc581ea02047229737c7a5d6 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Tue, 15 Oct 2019 16:09:53 -0400 Subject: [x/go.dev] home: elide event text on mobile Event text was overflowing the container for long event titles on smaller screens. In flexbox, for text to elide correctly, the flex child needs to have a min-width of zero for the overflow + flex calculations to work correctly. Fixes b/142725466 Change-Id: I668f20b99fabc6512cfc307ddcd00e382da5e7e3 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go.dev/+/574213 CI-Result: Cloud Build Reviewed-by: Andrew Bonventre X-GoDev-Commit: 97976a030fb60cb705277146ab30e91320575b40 --- go.dev/themes/default/assets/css/styles.css | 40 ++++++++++++++++------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index 59f23436..df18b741 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -504,37 +504,36 @@ a:hover { width: 100%; } .LearnGo-eventItem { + align-items: flex-start; display: flex; - padding: 1rem 0; margin: 0 1rem; + padding: 1rem 0; } .LearnGo-eventItem + .LearnGo-eventItem { border-top: 1px solid #e0e0e0; } .LearnGo-eventThumbnail { - align-content: center; display: flex; - height: 3rem; - min-width: 3rem; - width: 3rem; + flex: 0 0 3rem; + margin-right: 1rem; } .LearnGo-eventThumbnail--noimage { background-color: #d8d8d8; } .LearnGo-eventThumbnail img { - margin: auto; - max-height: 100%; - max-width: 100%; + height: auto; + width: 3rem; } .LearnGo-eventBody { - flex: auto; - padding-left: 1rem; + display: inline-flex; + flex: 1; + flex-direction: column; + min-width: 0; } .LearnGo-eventDate { display: flex; flex-wrap: wrap; justify-content: space-between; - width: 100%; } .LearnGo-eventDate p { color: #6e7072; @@ -545,7 +544,6 @@ a:hover { font-size: 1.25rem; font-weight: normal; margin: 0; - max-width: 30rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -559,19 +557,23 @@ a:hover { } .LearnGo-viewMore { margin: 0; + min-width: 6.25rem; } @media only screen and (min-width: 57.7rem) { .LearnGo-eventThumbnail { - height: 5.375rem; + height: auto; + min-width: 5.375rem; + } + .LearnGo-eventThumbnail img { + height: auto; min-width: 5.375rem; - width: 5.375rem; } .LearnGo-eventDate { - flex: 2; + flex: 0; flex-direction: column; justify-content: center; margin: 0 1rem; - min-width: 6rem; + min-width: 9rem; } .LearnGo-eventText { display: flex; @@ -579,7 +581,8 @@ a:hover { flex-direction: column; justify-content: space-around; max-height: 5.375rem; - padding-right: 5rem; + min-width: 0; + padding-right: 2rem; } .LearnGo-eventDescription { -webkit-line-clamp: 2; /* see non-media-query definition. */ @@ -595,8 +598,9 @@ a:hover { flex-direction: row; } .LearnGo-eventItem { - padding: 1rem 0; + align-items: center; margin: 0 3rem; + padding: 1rem 0; } } .Footer-links { -- cgit v1.3 From c26a053bba0a6d6159bdb89580c8e12fe27a15c0 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Wed, 16 Oct 2019 15:39:50 -0400 Subject: [x/go.dev] cmd/frontend: redirect /explore to discovery site This adds an application for redirecting /explore requests to the correct discovery site, depending on which domain is requested. All static content should be served by appengine itself. The static handler only is necessary for testing locally. Fixes b/142726792 Change-Id: I5ae6a5630c6f01c55a705ff4fde037fd37de6fad Reviewed-on: https://team-review.git.corp.google.com/c/golang/go.dev/+/575223 CI-Result: Cloud Build Reviewed-by: Andrew Bonventre X-GoDev-Commit: a83e60d5df3afba145bc26f18ff6f20b7e340b21 --- go.dev/app.yaml | 14 +++++++++++--- go.dev/cloudbuild.ci.yaml | 5 +++++ go.dev/cmd/frontend/main.go | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 go.dev/cmd/frontend/main.go diff --git a/go.dev/app.yaml b/go.dev/app.yaml index 40994198..698cc1b3 100644 --- a/go.dev/app.yaml +++ b/go.dev/app.yaml @@ -1,13 +1,17 @@ -runtime: python27 -api_version: 1 -threadsafe: true +runtime: go113 service: go-dev +main: ./cmd/frontend handlers: - url: / static_files: public/index.html upload: public/index.html +- url: /explore + secure: always + redirect_http_response_code: 301 + script: auto + # Special handler for static content in themes or page bundles. - url: /(.*)\.(png|svg|css|jpeg|jpg|xml|html)$ static_files: public/\1.\2 @@ -23,3 +27,7 @@ handlers: static_files: public/\1/index.html upload: public/(.*)/index.html +- url: /.* + secure: always + redirect_http_response_code: 301 + script: auto diff --git a/go.dev/cloudbuild.ci.yaml b/go.dev/cloudbuild.ci.yaml index fe1843fc..7543a83b 100644 --- a/go.dev/cloudbuild.ci.yaml +++ b/go.dev/cloudbuild.ci.yaml @@ -1,4 +1,9 @@ steps: + - name: 'mirror.gcr.io/library/golang' + entrypoint: bash + args: + - -c + - go test ./... - name: 'mirror.gcr.io/library/golang' entrypoint: bash args: diff --git a/go.dev/cmd/frontend/main.go b/go.dev/cmd/frontend/main.go new file mode 100644 index 00000000..9c95504c --- /dev/null +++ b/go.dev/cmd/frontend/main.go @@ -0,0 +1,41 @@ +package main + +import ( + "log" + "net" + "net/http" + "os" +) + +func main() { + fs := http.FileServer(http.Dir("public/")) + http.Handle("/", fs) + http.HandleFunc("/explore", exploreHandler) + + p := listenPort() + l, err := net.Listen("tcp", ":" + p) + if err != nil { + log.Fatalf("net.Listen(%q, %q) = _, %v", "tcp", p, err) + } + defer l.Close() + log.Printf("Listening on http://%v/\n", l.Addr().String()) + log.Print(http.Serve(l, nil)) +} + +func listenPort() string { + if p := os.Getenv("PORT"); p != "" { + return p + } + return "0" +} + +func exploreHandler(w http.ResponseWriter, r *http.Request) { + switch r.Host { + case "dev.go.dev": + http.Redirect(w, r, "https://dev-pkg.go.dev/", http.StatusFound) + case "staging.go.dev": + http.Redirect(w, r, "https://staging-pkg.go.dev/", http.StatusFound) + default: + http.Redirect(w, r, "https://pkg.go.dev/", http.StatusFound) + } +} -- cgit v1.3 From 354a006e663ae2174aa548ca9d634d07b5db969b Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Wed, 16 Oct 2019 14:19:20 -0400 Subject: [x/go.dev] all: rename module away from deleted repository Change-Id: Ib655e22d787729081359276e51cf44d12bd7284f X-GoDev-Commit: bc403b7d4be82852ec1674f913a2e6d24f68e457 --- go.dev/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.dev/go.mod b/go.dev/go.mod index de83898c..b110aefe 100644 --- a/go.dev/go.mod +++ b/go.dev/go.mod @@ -1,4 +1,4 @@ -module github.com/godevsite/go.dev +module golang.org/x/go.dev go 1.13 -- cgit v1.3 From 4e8a0ccbdf7c1bec7848477574e0203e99ea9cc4 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 17 Oct 2019 20:39:03 -0400 Subject: [x/go.dev] readme: add Contributing and Deploying documentation Change-Id: I3450cdd52de6bd7bd95b0eea9e9c1ace3caef6d9 X-GoDev-Commit: 7ad37cc90e1b93064602e5c5c5022a85099bbcc9 --- go.dev/README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/go.dev/README.md b/go.dev/README.md index 7dfca122..9b01a4ea 100644 --- a/go.dev/README.md +++ b/go.dev/README.md @@ -1 +1,14 @@ -# go.dev \ No newline at end of file +# go.dev + +## Contributing + +- `data/learn` contains links for the Learn pages, as all content is currently external. +- `content/solutions` contains Use Cases and Case Studies. + - Please include relevant resources using the same `name` attribute for images. +- `themes/default` contains the site layout. + +## Deploying + +All commits targeting `master` will trigger a CI test defined in `cloudbuild.ci.yaml`. + +All commits pushed to `master` will be automatically deployed to https://dev.go.dev. -- cgit v1.3 From b4fd557094c16ca162c8b56e6a50511d015f85f1 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Mon, 21 Oct 2019 15:36:45 -0400 Subject: [x/go.dev] home: use SVG for star icon This changes the star icon for the Who Uses Go section to an SVG from a specific unicode character, ensuring it renders correctly everywhere. Fixes b/142726050 Change-Id: I471cf4c5ba9fa84d3fd6f2fd461b4352ec662365 X-GoDev-Commit: 4cc10f999a064a733ec3ec500439d17ac8af74dc --- go.dev/themes/default/assets/css/styles.css | 9 ++++++--- go.dev/themes/default/layouts/index.html | 12 +++++++++--- go.dev/themes/default/static/images/star-24px.svg | 1 + 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 go.dev/themes/default/static/images/star-24px.svg diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index df18b741..30cf4f2b 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -415,16 +415,19 @@ a:hover { margin: 0; } .WhyGo-reasonIcon { + align-items: center; background: linear-gradient(10.64deg, #007d9c 0%, #00a29c 100%); border-radius: 50%; color: white; - font-size: 1.4rem; + display: flex; height: 1.5rem; - line-height: 1.4rem; + justify-content: center; margin-top: .125rem; min-width: 1.5rem; text-align: center; - width: 1.5rem; +} +.WhyGo-reasonIcon img { + height: 20px; } .WhyGo-gopher { flex: 1 1 50%; diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index c679fe4b..97317e11 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -71,7 +71,9 @@
    • - +

      Scalability

      @@ -81,7 +83,9 @@

    • - +

      Microservices

      @@ -91,7 +95,9 @@

    • - +

      Efficiency

      diff --git a/go.dev/themes/default/static/images/star-24px.svg b/go.dev/themes/default/static/images/star-24px.svg new file mode 100644 index 00000000..ead6a268 --- /dev/null +++ b/go.dev/themes/default/static/images/star-24px.svg @@ -0,0 +1 @@ + -- cgit v1.3 From 0b5d199174d8b249c242d150030a72a2dade89bd Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Mon, 21 Oct 2019 15:51:20 -0400 Subject: [x/go.dev] home: fix image scaling for tall event images Tall event images weren't being bounded to their container, causing the layout to overflow on desktop. Change-Id: I2e47e150d30fb2c563fba2cc30e5e6caf52f906a X-GoDev-Commit: b53aab8f5d38302e17756e0e5eaab25646ee377b --- go.dev/data/events.yaml | 415 ++++++++++++++-------------- go.dev/themes/default/assets/css/styles.css | 10 +- 2 files changed, 211 insertions(+), 214 deletions(-) diff --git a/go.dev/data/events.yaml b/go.dev/data/events.yaml index 28554350..cf2acf9a 100644 --- a/go.dev/data/events.yaml +++ b/go.dev/data/events.yaml @@ -2,45 +2,135 @@ # To update, run: # go run github.com/godevsite/go.dev/cmd/events > data/events.yaml all: -- city: Jakarta - country: Indonesia +- city: Bournemouth + country: United Kingdom description: |- - A meetup group to discuss the Go Programming Language in Jakarta. 
      - (from golang.org) 
      - The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. - id: "265309911" - local_date: Oct 15, 2019 - local_time: "2019-10-15T19:00:00+07:00" - localizedcountry: Indonesia - localizedlocation: Jakarta, Indonesia - name: 'Meetup: Profiling Applications, and Face Similarity Detection with Go' + Golang Dorset
      + is a user group for people interested in the
      + Go programming language and assorted related technologies and methodologies (kubernetes / docker / DevOps etc)

      + We aim to meet every month in central Bournemouth.
      ---

      + We want to give everyone a chance to learn, or improve their skills with Go by practicing it, organizing workshops and talks, and mingling along like-minded individuals.
      + Any level of proficiency (or none at all) is welcome. 
      + All code and slides from examples are available in the github repo github.com/golangdorset 

      + Join us on Slack!
      + id: mbdwhryznbcc + local_date: Oct 21, 2019 + local_time: "2019-10-21T19:00:00+01:00" + localizedcountry: United Kingdom + localizedlocation: Bournemouth, United Kingdom + name: Golang Dorset Monthly Meetup state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/9/a/f/b/thumb_449379675.jpeg - url: https://www.meetup.com/GoJakarta/events/265309911 -- city: Athens - country: Greece + thumbnailurl: "" + url: https://www.meetup.com/Golang-Dorset/events/mbdwhryznbcc +- city: Göteborg + country: Sweden + description: A community for anyone interested in the Go (golang) programming language + - and related topics - in, and around Gothenburg, Sweden. + id: "265583393" + local_date: Oct 22, 2019 + local_time: "2019-10-22T17:30:00+02:00" + localizedcountry: Sweden + localizedlocation: Göteborg, Sweden + name: Concurrency @ Zimpler + state: "" + thumbnailurl: https://secure.meetupstatic.com/photos/event/6/9/a/thumb_466021690.jpeg + url: https://www.meetup.com/sweden-go-west/events/265583393 +- city: Tel Aviv-Yafo + country: Israel + description: |- + This is the group for programmers who are interested in the High Performance, Scalable, lightweight, cross platform development tool that also promises ease of programming, agility and the fun you don't usually get using a low-level language. Welcome to the Israeli Go language Group.
      + If you'd like to give a talk, please add yourself to the trello board + id: "254097017" + local_date: Oct 22, 2019 + local_time: "2019-10-22T18:30:00+03:00" + localizedcountry: Israel + localizedlocation: Tel Aviv-Yafo, Israel + name: Go Israel October 2019 Meetup + state: "" + thumbnailurl: https://secure.meetupstatic.com/photos/event/a/9/6/9/thumb_477523369.jpeg + url: https://www.meetup.com/Go-Israel/events/254097017 +- city: Sofia + country: Bulgaria + description: An open meetup for everybody and anybody interested in Golang, CSP, + software development. Experienced & aspiring software developers as well as + actual gophers are all welcome! + id: "265376069" + local_date: Oct 22, 2019 + local_time: "2019-10-22T19:00:00+03:00" + localizedcountry: Bulgaria + localizedlocation: Sofia, Bulgaria + name: Dos and don'ts on Golang Interfaces + state: "" + thumbnailurl: https://secure.meetupstatic.com/photos/event/3/d/e/6/thumb_462375846.jpeg + url: https://www.meetup.com/Golang-Bulgaria/events/265376069 +- city: Zagreb + country: Croatia + description: |- + Ovo je grupa za sve zainteresirane za Go programski jezik.
      + Prošli talkovi se mogu naći na:
      + • github repou
      + • snimke na YouTube kanalu

      + Prati na nas twitteru i na facebooku.
      + Družimo se i na gophers.slack.com - tamo smo u kanalu #croatia. + id: "265507175" + local_date: Oct 22, 2019 + local_time: "2019-10-22T18:00:00+02:00" + localizedcountry: Croatia + localizedlocation: Zagreb, Croatia + name: GoTalks 22.10.2019. + state: "" + thumbnailurl: https://secure.meetupstatic.com/photos/event/7/2/5/2/thumb_462749266.jpeg + url: https://www.meetup.com/Golang-ZG/events/265507175 +- city: Bristol + country: United Kingdom description: |- - Welcome to Athens Gophers.
      - This is a group for all those interested in learning about and working with the Go programming language (Golang).
      +


      - Anyone interested in Co-organizing or Presenting in future meetups, please get in contact.
      -

      -

      - About Us:

      - As gophers we follow the Code of Conduct to make this a pleasant and inclusive environment for everyone:
      - https://golang.org/conduct
      - Follow us on twitter: @AthensGolang (https://twitter.com/AthensGolang), 
      - or come join us in #greece on Slack at https://invite.slack.golangbridge.org
      -
      - id: "265470647" - local_date: Oct 15, 2019 - local_time: "2019-10-15T19:00:00+03:00" - localizedcountry: Greece - localizedlocation: Athens, Greece - name: 6th Athens Gophers Meetup + Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
      + We are a small group, ready to learn from each other, if you like to code and talk about it then join us and help us to grow and prosper...
      + King Leonidas: You have many slaves, Xerxes, but few warriors. It won't be long before they fear my spears more than your whips... + id: "264616451" + local_date: Oct 22, 2019 + local_time: "2019-10-22T18:00:00+01:00" + localizedcountry: United Kingdom + localizedlocation: Bristol, United Kingdom + name: Go(ctober) - OpenAPI and Go 1.13 state: "" thumbnailurl: "" - url: https://www.meetup.com/Athens-Gophers/events/265470647 + url: https://www.meetup.com/golang-bristol/events/264616451 +- city: Cambridge + country: United Kingdom + description: |- + About Cambridge Gophers
      + We are in phase zero, forming. Our initial aim is to gather some gophers and work our how we want to share experiences and ideas. We hope to run workshops, talks and discussions once a month with the prime directives of learning and involvement from group members.
      + twitter: @CambGophers
      + slack: https://gophers.slack.com/messages/cambridgeuk/
      + join slack: https://gophersinvite.herokuapp.com/
      + About Go

      + The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. + id: "265281185" + local_date: Oct 22, 2019 + local_time: "2019-10-22T18:30:00+01:00" + localizedcountry: United Kingdom + localizedlocation: Cambridge, United Kingdom + name: 'October meetup: Laszlo Papp shows us how to write a Slack bot in Go' + state: "" + thumbnailurl: https://secure.meetupstatic.com/photos/event/5/7/9/9/thumb_447382425.jpeg + url: https://www.meetup.com/Cambridge-Gophers/events/265281185 +- city: Newcastle Upon Tyne + country: United Kingdom + description: This is a group for anyone in the North East of England who's interested + in the Go programming language. We usually meet up in Newcastle on the fourth + Tuesday of every month at Campus North, Carliol Square. + id: qtpnmqyznbdc + local_date: Oct 22, 2019 + local_time: "2019-10-22T18:30:00+01:00" + localizedcountry: United Kingdom + localizedlocation: Newcastle Upon Tyne, United Kingdom + name: better testing of Go commands with testscript + state: "" + thumbnailurl: "" + url: https://www.meetup.com/Golang-North-East/events/qtpnmqyznbdc - city: Eugene country: USA description: |- @@ -48,199 +138,102 @@ all: Go is a Google-funded language for massively-scalable distributed systems that is statically typed and compiled. It has quickly stabilized and is running head-to-head with C++, Java, C#, etc. (The Computer Language Benchmarks Game - Go). However, a larger-than-expected portion of new Gophers is made up of dynamic/interpreted language users who tend to be seeking relief from the cruft in their current languages and/or a more clear future within the horizontally-growing landscape of modern computing.
      If you're building web apps, designing APIs, thrive on scalability, or you're simply curious about this fun new(ish) language, let's meetup.
      • Meetup resources are available at www.euggo.org  - id: wttfjryznbtb - local_date: Oct 15, 2019 - local_time: "2019-10-15T12:00:00-07:00" + id: jdbjkryznbdc + local_date: Oct 22, 2019 + local_time: "2019-10-22T12:00:00-07:00" localizedcountry: USA localizedlocation: Eugene, OR name: Book Club state: OR thumbnailurl: https://secure.meetupstatic.com/photos/event/2/8/1/thumb_453660641.jpeg - url: https://www.meetup.com/EUG-Go/events/wttfjryznbtb -- city: Ann Arbor + url: https://www.meetup.com/EUG-Go/events/jdbjkryznbdc +- city: Sunnyvale country: USA - description: |- - A forum for people working in or around Ann Arbor with Go to discuss ideas, issues and share solutions. We will start to put together meetings as the group grows and topics are suggested. 
      - We seek to enable underrepresented people in tech to use Go as a tool to learn and teach programming, and, ultimately, to empower underrepresented groups in tech to help increase diversity in the Go community.  No prior programming language is needed to attend!

      - Submit a talk proposal, or come join us in #a2go channel in the gophers slack  https://invite.slack.golangbridge.org/ .

      A2Go Golang adopts the Go Code of Conduct (https://golang.org/conduct#code). Harassment, bullying, and discrimination are unacceptable here and if you witness or experience those or other harmful behaviors, please let the organizers know. The Code of Conduct extends to related events like after-meeting bar trips.
      - id: "264721689" - local_date: Oct 15, 2019 - local_time: "2019-10-15T18:00:00-04:00" + description: This is a private group for all organizers of Go Developer Meetups + globally that are part of the Go + Developer Network (GDN). Over time, we will establish a cadence of global + online meetups on a monthly basis and in person regional meetups on an annual + basis. + id: "265601177" + local_date: Oct 22, 2019 + local_time: "2019-10-22T12:45:00-07:00" localizedcountry: USA - localizedlocation: Ann Arbor, MI - name: Monthly Meeting - state: MI - thumbnailurl: https://secure.meetupstatic.com/photos/event/1/c/f/3/thumb_483787411.jpeg - url: https://www.meetup.com/A2Go-Golang-developer-meetup/events/264721689 -- city: Ottawa - country: Canada - description: |- - Calling all Ottawa Gophers!
      - We get together once a month to discuss the state of the union in Go land, bring in speakers to discuss their projects and generally share a drink and a bite with colleagues. New to Go or a hardened Gopher, all are welcome! - id: "264371478" - local_date: Oct 15, 2019 - local_time: "2019-10-15T18:00:00-04:00" - localizedcountry: Canada - localizedlocation: Ottawa, ON - name: Go Ottawa! October 2019 - state: "ON" + localizedlocation: Sunnyvale, CA + name: GDN Lunch at GoLab in Florence at 12:45pm local time + state: CA thumbnailurl: "" - url: https://www.meetup.com/Ottawa-Go-Meetup/events/264371478 -- city: London - country: United Kingdom - description: |- - London Gophers (https://gophers.london), aka Go London User Group (GLUG), is a London-based community for anyone interested in the Go programming language.

      London Gophers provides opportunities to:

      - Discuss Go and related topics
      - Socialise with friendly people who are interested in Go
      - Find or fill Go-related jobs

      We want London Gophers to be a diverse and inclusive community. As such all attendees, organisers and sponsors are required to follow the Go community code of conduct
      -
      Twitter  - https://twitter.com/LondonGophers
      YouTube - https://www.youtube.com/c/LondonGophers
      GitHub - https://github.com/go-london-user-group 
      - id: "264779288" - local_date: Oct 16, 2019 - local_time: "2019-10-16T18:30:00+01:00" - localizedcountry: United Kingdom - localizedlocation: London, United Kingdom - name: October Gophers - state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/4/3/d/thumb_465781085.jpeg - url: https://www.meetup.com/LondonGophers/events/264779288 -- city: Reston + url: https://www.meetup.com/Go-Meetup-Organisers/events/265601177 +- city: Norfolk country: USA description: |- - (from golang.org)

      -
      - The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. - id: sfsjmpyznbvb - local_date: Oct 16, 2019 - local_time: "2019-10-16T18:45:00-04:00" + This is a group for anyone interested in the Go programming language. Not just Go but anything that has to do with Go (i.e. Kubernetes, Docker, Terraform, etc). All skill levels are welcome.
      +

      + This community abides by the Go Community Code of Conduct.   + id: "265405417" + local_date: Oct 22, 2019 + local_time: "2019-10-22T18:00:00-04:00" localizedcountry: USA - localizedlocation: Reston, VA - name: Monthly Meetup + localizedlocation: Norfolk, VA + name: Building Rest APIs with Go and TDD state: VA - thumbnailurl: https://secure.meetupstatic.com/photos/event/7/f/7/thumb_433982039.jpeg - url: https://www.meetup.com/Golang-Reston/events/sfsjmpyznbvb -- city: Austin - country: USA + thumbnailurl: "" + url: https://www.meetup.com/Norfolk-Go-Meetup-Group/events/265405417 +- city: Canberra + country: Australia + description: Canberra Gophers will meet every month to talk about software development + using the Go programming language. Please join if you have an interest in Go or + if you are using Go in your work. + id: "264916785" + local_date: Oct 23, 2019 + local_time: "2019-10-23T17:45:00+11:00" + localizedcountry: Australia + localizedlocation: Canberra, Australia + name: Canberra Gophers October 2019 + state: "" + thumbnailurl: "" + url: https://www.meetup.com/Canberra-Gophers/events/264916785 +- city: Melbourne + country: Australia description: |- - A user group to meet and discuss the Go programming language (golang). Meetups are typically held on third Wednesdays at 6:30. Follow us on Twitter @atxgolang and join our chat rooms: #atx on Gopher Slack or #atxgolang on Freenode.
      - Please read the Code of Conduct.
      - Thank you to Capital Factory for sponsoring event space in 2019 for Austin Go Language User Group. Capital Factory is the center of gravity for entrepreneurs in Texas. They meet the best entrepreneurs in Texas and introduce them to their first investors, employees, mentors and customers.
      - Logo credit: The cowboy gopher image is a modified adaptation of Renée French's copyrighted gopher images and is Creative Commons Attributions 3.0 licensed.
      - Photo credit: Constantine @ATxTE

      - From golang.org:
      - The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. - id: ntwrdryznbvb - local_date: Oct 16, 2019 - local_time: "2019-10-16T19:00:00-05:00" - localizedcountry: USA - localizedlocation: Austin, TX - name: October Lightning Talks - state: TX - thumbnailurl: https://secure.meetupstatic.com/photos/event/4/7/1/e/thumb_462978206.jpeg - url: https://www.meetup.com/atxgolang/events/ntwrdryznbvb -- city: San Francisco - country: USA + We run fun and interesting events.
      + If you want to organise events, let us know and we'll make you an event organizer.
      + NOTE: We were formally called "Melbourne Young Professionals", but since it doesn't represent who we are, the name has changed to "Let's Go"
      +
      + id: "265628686" + local_date: Oct 23, 2019 + local_time: "2019-10-23T19:00:00+11:00" + localizedcountry: Australia + localizedlocation: Melbourne, Australia + name: Begin your fitness journey - Self Defence Based Fitness -Thornbury + state: "" + thumbnailurl: "" + url: https://www.meetup.com/letsgo-melbourne/events/265628686 +- city: Jakarta + country: Indonesia description: |- - A meetup group to discuss the Go Programming Language.
      - (from golang.org)
      + A meetup group to discuss the Go Programming Language in Jakarta. 
      + (from golang.org) 
      The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. - id: "262495822" - local_date: Oct 16, 2019 - local_time: "2019-10-16T18:00:00-07:00" - localizedcountry: USA - localizedlocation: San Francisco, CA - name: '[GoSF] All about Microservices (Docker & Kubernetes) +Decentralized Storage - w/Go' - state: CA - thumbnailurl: https://secure.meetupstatic.com/photos/event/5/a/d/3/thumb_442823251.jpeg - url: https://www.meetup.com/golangsf/events/262495822 -- city: Amsterdam - country: Netherlands - description: |- - This group is for everybody who is interested in the Go programming language (https://golang.org/). We organize meetups with technical talks and social events. Contact us if you're interested in hosting a meetup or giving a talk!

      -

      - Slides of past meetups:
      - https://github.com/goamsterdam/meetups
      -

      - Join us on slack:
      - https://invite.slack.golangbridge.org
      - /join #amsterdam
      -
      - id: "265308416" - local_date: Oct 17, 2019 - local_time: "2019-10-17T18:00:00+02:00" - localizedcountry: Netherlands - localizedlocation: Amsterdam, Netherlands - name: Go meetup @ Schuberg Philis (Schiphol-Rijk) + id: "264707301" + local_date: Oct 23, 2019 + local_time: "2019-10-23T17:00:00+07:00" + localizedcountry: Indonesia + localizedlocation: Jakarta, Indonesia + name: 'AWS Pop-up Loft: Deploying Go Apps on the Cloud' state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/9/d/a/0/thumb_213520352.jpeg - url: https://www.meetup.com/golang-amsterdam/events/265308416 -- city: Orlando - country: USA - description: Orlando's first meetup group dedicated to the Go Programming Language. - All skill levels are welcome - whether you're a beginner or a full-fledged - gopher. - id: blgfpqyznbnb - local_date: Oct 17, 2019 - local_time: "2019-10-17T19:00:00-04:00" - localizedcountry: USA - localizedlocation: Orlando, FL - name: Orlando Golang Monthly Meetup - state: FL - thumbnailurl: https://secure.meetupstatic.com/photos/event/9/7/c/4/thumb_441638852.jpeg - url: https://www.meetup.com/OrlanGo/events/blgfpqyznbnb -- city: New York - country: USA - description: | - Go Language meetups and more in the greatest city in the world!
      -
      - Our purpose is to help build the Go community within NYC. We are here to support individuals by providing a safe platform for them to speak, listen, and learn. When not hosting a meetup, we will help promote and support our partner groups and events to help build awareness for all things Go in NYC.
      - Follow us on twitter at @golangnyc.
      - id: "264955744" - local_date: Oct 17, 2019 - local_time: "2019-10-17T19:00:00-04:00" - localizedcountry: USA - localizedlocation: New York, NY - name: Golang NYC Meetup October - state: NY - thumbnailurl: https://secure.meetupstatic.com/photos/event/7/d/3/1/thumb_464912049.jpeg - url: https://www.meetup.com/golanguagenewyork/events/264955744 -- city: Boulder - country: USA - description: Come meet and learn from other Boulder-based gophers! - id: rbjqgryznbwb - local_date: Oct 17, 2019 - local_time: "2019-10-17T17:30:00-06:00" - localizedcountry: USA - localizedlocation: Boulder, CO - name: Boulder Monthly Go Meetup - state: CO - thumbnailurl: https://secure.meetupstatic.com/photos/event/4/a/e/f/thumb_460759183.jpeg - url: https://www.meetup.com/Boulder-Gophers/events/rbjqgryznbwb -- city: Englewood - country: USA - description: |- - If you want to learn or share your experiences or explore more about Go language, please join us over beer and pizza. Here are some resources you might want to check if you are new to Go:
      - First you should take the language tour: http://tour.golang.org/
      Then, you should visit:
      - https://golang.org/doc/code.html To learn how to organize your Go workspace
      - https://golang.org/doc/effective_go.html which would help you be more effective at writing Go
      - https://golang.org/ref/spec will help you learn more about the language itself
      - https://golang.org/doc/#articles For a lot more reading material
      - There are some awesome websites as well:
      - https://blog.gopheracademy.com Well great resources for Gophers in general
      - http://gotime.fm For a weekly podcast of Go awesomeness
      - https://gobyexample.com If you are looking for examples of how to do things in Go
      - http://go-database-sql.org If you are looking for how to use SQL databases in Go
      - http://gophervids.appspot.com For a list of Go related videos from various authors
      - Finally, https://github.com/golang/go/wiki#learning-more-about-go will give a list of more resources to learn Go - id: grnphryznbwb - local_date: Oct 17, 2019 - local_time: "2019-10-17T18:00:00-06:00" - localizedcountry: USA - localizedlocation: Englewood, CO - name: DTC Go Monthly meetup - state: CO - thumbnailurl: https://secure.meetupstatic.com/photos/event/6/0/e/d/thumb_459744813.jpeg - url: https://www.meetup.com/Denver-Go-Programming-Language-Meetup/events/grnphryznbwb -- city: Darmstadt - country: Germany + thumbnailurl: https://secure.meetupstatic.com/photos/event/9/a/f/b/thumb_449379675.jpeg + url: https://www.meetup.com/GoJakarta/events/264707301 +- city: Paris + country: France description: |- - GoBridge is focused on Go aka golang and part of the non-profit Bridge Foundry. The idea is to build bridges between underrepresented minorities in Tech to increase the diversity in Tech and Go in special. For more details about GoBridge, check out the official webpage
      - We will use this meetup for organizing events with this aim in mind and provide events for learning and exchange. As part of GoBridge, all our events will follow the Code of Conduct
      - If you have any question, feel free to contact us. - id: "265237018" - local_date: Oct 18, 2019 - local_time: "2019-10-18T17:00:00+02:00" - localizedcountry: Germany - localizedlocation: Darmstadt, Germany - name: 'Hacktoberfest Frankfurt ' + This is the Paris Chapter of Women Who Go: http://www.meetup.com/Women-Who-Go/ This group is an inclusive space for everyone.
      + This group is for you if any of the following:
      1. You identify as a woman, publicly or privately. 2. You have some interest in the Go programming language, or programming in general. + id: "265751019" + local_date: Oct 23, 2019 + local_time: "2019-10-23T19:00:00+02:00" + localizedcountry: France + localizedlocation: Paris, France + name: Créer vos applications serverless sur AWS avec Go state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/c/5/7/f/thumb_479450559.jpeg - url: https://www.meetup.com/GoBridge-Frankfurt-Rhein-Main/events/265237018 + thumbnailurl: https://secure.meetupstatic.com/photos/event/2/d/3/b/thumb_480491579.jpeg + url: https://www.meetup.com/Women-Who-Go-Paris/events/265751019 diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index 30cf4f2b..32b5c19e 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -564,12 +564,16 @@ a:hover { } @media only screen and (min-width: 57.7rem) { .LearnGo-eventThumbnail { - height: auto; - min-width: 5.375rem; + flex-basis: 5.375rem; + height: 5.375rem; } .LearnGo-eventThumbnail img { + display: block; height: auto; - min-width: 5.375rem; + margin: auto; + max-height: 100%; + max-width: 100%; + width: auto; } .LearnGo-eventDate { flex: 0; -- cgit v1.3 From 6489812976938ebfa034bf0e2765d57ced6ba787 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Mon, 21 Oct 2019 18:22:27 -0400 Subject: [x/go.dev] home: make hero background accessible The gradient caused contrast issues on links in the Hero and Header part of the homepage. Change-Id: I13aa486d92bea699da76520f5670ff20a18fef3f X-GoDev-Commit: fb8fea69c95a7d1231950e9700a3220ba9ee8433 --- go.dev/themes/default/assets/css/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index 32b5c19e..82c1886c 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -23,7 +23,7 @@ a:hover { margin: 0; } .Site--blue { - background: linear-gradient(45deg, #007d9c 35%, #00a29c) no-repeat center center fixed; + background: #007d9c; } .Site-content { flex: 1; -- cgit v1.3 From 56478eada4af94b371a9f00e64ef802533486d20 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Mon, 21 Oct 2019 17:17:25 -0400 Subject: [x/go.dev] all: add learn.go.dev service This adds an appengine service for routing requests to learn.go.dev. It will be generated based off the same content, but host the /learn tree as /. Redirect handlers now correctly trim the path prefix and preserve query parameters. Updates b/142867592 Change-Id: I89bdb1be01b0e44f23ef24e434687501efe194fb Reviewed-on: https://team-review.git.corp.google.com/c/golang/go.dev/+/579816 CI-Result: Cloud Build Reviewed-by: Jonathan Amsterdam X-GoDev-Commit: e8eba47c11e650ddbcbf0f81f25bbe025bb72868 --- go.dev/app.learn.yaml | 38 +++++++++++++++++++++++ go.dev/app.yaml | 7 ++++- go.dev/cloudbuild.yaml | 2 ++ go.dev/cmd/events/main_test.go | 10 +++--- go.dev/cmd/frontend/main.go | 32 +++++++++++++------ go.dev/cmd/frontend/main_test.go | 66 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 139 insertions(+), 16 deletions(-) create mode 100644 go.dev/app.learn.yaml create mode 100644 go.dev/cmd/frontend/main_test.go diff --git a/go.dev/app.learn.yaml b/go.dev/app.learn.yaml new file mode 100644 index 00000000..f994b099 --- /dev/null +++ b/go.dev/app.learn.yaml @@ -0,0 +1,38 @@ +runtime: go113 +service: learn-go-dev +main: ./cmd/frontend + +handlers: +- url: / + static_files: public/learn/index.html + upload: public/learn/index.html + +- url: /(explore|learn) + secure: always + redirect_http_response_code: 301 + script: auto + +- url: /(explore|learn)/* + secure: always + redirect_http_response_code: 301 + script: auto + +# Special handler for static content in themes or page bundles. +- url: /(.*)\.(png|svg|css|jpeg|jpg|xml|html)$ + static_files: public/\1.\2 + upload: public/(.*) + +# Handle arbitrary paths with an index.html, special casing the trailing slash. +- url: /(.*)/ + static_files: public/learn/\1/index.html + upload: public/learn/(.*)/index.html + +# Handle arbitrary paths with an index.html +- url: /(.*) + static_files: public/learn/\1/index.html + upload: public/learn/(.*)/index.html + +- url: /.* + secure: always + redirect_http_response_code: 301 + script: auto diff --git a/go.dev/app.yaml b/go.dev/app.yaml index 698cc1b3..04addc6f 100644 --- a/go.dev/app.yaml +++ b/go.dev/app.yaml @@ -7,7 +7,12 @@ handlers: static_files: public/index.html upload: public/index.html -- url: /explore +- url: /(explore|learn) + secure: always + redirect_http_response_code: 301 + script: auto + +- url: /(explore|learn)/* secure: always redirect_http_response_code: 301 script: auto diff --git a/go.dev/cloudbuild.yaml b/go.dev/cloudbuild.yaml index 07d91b06..1594fdfd 100644 --- a/go.dev/cloudbuild.yaml +++ b/go.dev/cloudbuild.yaml @@ -9,5 +9,7 @@ steps: - name: 'gcr.io/$PROJECT_ID/hugo' - name: "gcr.io/cloud-builders/gcloud" args: ["app", "deploy"] + - name: "gcr.io/cloud-builders/gcloud" + args: ["app", "deploy", "app.learn.yaml"] images: - 'gcr.io/$PROJECT_ID/hugo' diff --git a/go.dev/cmd/events/main_test.go b/go.dev/cmd/events/main_test.go index 4f729b21..949887ed 100644 --- a/go.dev/cmd/events/main_test.go +++ b/go.dev/cmd/events/main_test.go @@ -10,12 +10,12 @@ import ( var ( noEventGroup = &Group{Name: "no event group"} upcomingEventGroup = &Group{ - Name: "Upcoming Event Group", + Name: "Upcoming Event Group", Timezone: "Europe/Oslo", NextEvent: &Event{ - ID: "12345", - Name: "Upcoming Event", - Time: 1262976000000, + ID: "12345", + Name: "Upcoming Event", + Time: 1262976000000, }, } fakeGroups = map[string]*Group{ @@ -30,7 +30,7 @@ func (f fakeClient) getGroupsSummary() (*GroupsSummary, error) { return &GroupsSummary{Chapters: []*Chapter{ {URLName: "noEvent"}, { - URLName: "ueg", + URLName: "ueg", Description: "We host our own events\n", }, }}, nil diff --git a/go.dev/cmd/frontend/main.go b/go.dev/cmd/frontend/main.go index 9c95504c..cb5c1762 100644 --- a/go.dev/cmd/frontend/main.go +++ b/go.dev/cmd/frontend/main.go @@ -4,16 +4,24 @@ import ( "log" "net" "net/http" + "net/url" "os" ) +var discoveryHosts = map[string]string{ + "": "pkg.go.dev", + "dev.go.dev": "dev-pkg.go.dev", + "staging.go.dev": "staging-pkg.go.dev", +} + func main() { fs := http.FileServer(http.Dir("public/")) http.Handle("/", fs) - http.HandleFunc("/explore", exploreHandler) + http.Handle("/explore/", http.StripPrefix("/explore/", redirectHosts(discoveryHosts))) + http.Handle("/learn/", http.StripPrefix("/learn/", redirectHosts(map[string]string{"": "learn.go.dev"}))) p := listenPort() - l, err := net.Listen("tcp", ":" + p) + l, err := net.Listen("tcp", ":"+p) if err != nil { log.Fatalf("net.Listen(%q, %q) = _, %v", "tcp", p, err) } @@ -29,13 +37,17 @@ func listenPort() string { return "0" } -func exploreHandler(w http.ResponseWriter, r *http.Request) { - switch r.Host { - case "dev.go.dev": - http.Redirect(w, r, "https://dev-pkg.go.dev/", http.StatusFound) - case "staging.go.dev": - http.Redirect(w, r, "https://staging-pkg.go.dev/", http.StatusFound) - default: - http.Redirect(w, r, "https://pkg.go.dev/", http.StatusFound) +type redirectHosts map[string]string + +func (rh redirectHosts) ServeHTTP(w http.ResponseWriter, r *http.Request) { + u := &url.URL{Scheme: "https", Path: r.URL.Path, RawQuery: r.URL.RawQuery} + if h, ok := rh[r.Host]; ok { + u.Host = h + } else if h, ok := rh[""]; ok { + u.Host = h + } else { + http.NotFound(w, r) + return } + http.Redirect(w, r, u.String(), http.StatusFound) } diff --git a/go.dev/cmd/frontend/main_test.go b/go.dev/cmd/frontend/main_test.go new file mode 100644 index 00000000..6e0c8731 --- /dev/null +++ b/go.dev/cmd/frontend/main_test.go @@ -0,0 +1,66 @@ +package main + +import ( + "net/http" + "net/http/httptest" + "testing" +) + +var testHosts = map[string]string{ + "": "foo.example.test", + "dev.example.test": "foo-dev.example.test", + "staging.example.test": "foo-staging.example.test", +} + +func TestRedirect(t *testing.T) { + tests := []struct { + desc string + target string + hosts map[string]string + want string + wantCode int + }{ + { + desc: "basic redirect", + target: "/", + hosts: testHosts, + want: "https://foo.example.test/", + wantCode: http.StatusFound, + }, + { + desc: "redirect keeps query and path", + target: "/github.com/golang/glog?tab=overview", + hosts: testHosts, + want: "https://foo.example.test/github.com/golang/glog?tab=overview", + wantCode: http.StatusFound, + }, + { + desc: "redirects to the correct host", + target: "https://dev.example.test/", + hosts: testHosts, + want: "https://foo-dev.example.test/", + wantCode: http.StatusFound, + }, + { + desc: "renders 404 if hosts are missing", + target: "https://dev.example.test/", + hosts: nil, + wantCode: http.StatusNotFound, + }, + } + for _, tt := range tests { + t.Run(tt.desc, func(t *testing.T) { + req := httptest.NewRequest("GET", tt.target, nil) + w := httptest.NewRecorder() + redirectHosts(tt.hosts).ServeHTTP(w, req) + resp := w.Result() + if resp.StatusCode != tt.wantCode { + t.Errorf("w.Result().StatusCode = %v, wanted %v", resp.StatusCode, tt.wantCode) + } + l, err := resp.Location() + if resp.StatusCode == http.StatusFound && (l == nil || l.String() != tt.want || err != nil) { + t.Errorf("resp.Location() = %v, %v, wanted %v, no error", l, err, tt.want) + } + }) + } +} -- cgit v1.3 From e2de7dc5f86da7e1c86eb71fe3f4484667d75dc1 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Tue, 22 Oct 2019 15:51:48 -0400 Subject: [x/go.dev] all: generate header navigation from config Using a config-based navigation source in order to support more dynamic content in the future. Updates b/142726781 Updates b/142726427 Change-Id: Iba480fe7c747cacfe27046e52f19d4f1ec0d6464 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go.dev/+/580541 CI-Result: Cloud Build Reviewed-by: Andrew Bonventre X-GoDev-Commit: 339629946d879671ce4e08a9da5278c4b491a671 --- go.dev/config.toml | 28 ++++++++++++++++++++++ go.dev/themes/default/layouts/_default/baseof.html | 12 ++++++---- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/go.dev/config.toml b/go.dev/config.toml index 67155947..97b0203d 100644 --- a/go.dev/config.toml +++ b/go.dev/config.toml @@ -2,3 +2,31 @@ baseURL = "https://go-dev-staging.app/" languageCode = "en" title = "go.dev" theme = "default" +[menu] + [[menu.main]] + identifier = "solutions" + name = "Solutions" + title = "Solutions" + url = "/solutions" + weight = -110 + + [[menu.main]] + identifier = "learn" + name = "Learn" + title = "Learn" + url = "/learn" + weight = -100 + + [[menu.main]] + identifier = "explore" + name = "Explore" + title = "Explore" + url = "https://pkg.go.dev" + weight = -90 + + [[menu.main]] + identifier = "golang.org" + name = "golang.org" + title = "golang.org" + url = "https://pkg.go.dev" + weight = -80 diff --git a/go.dev/themes/default/layouts/_default/baseof.html b/go.dev/themes/default/layouts/_default/baseof.html index bd54bb04..9772c358 100644 --- a/go.dev/themes/default/layouts/_default/baseof.html +++ b/go.dev/themes/default/layouts/_default/baseof.html @@ -21,16 +21,18 @@

      - {{block "main" .}}{{end}} + {{- block "main" . -}}{{- end -}}
      + + \ No newline at end of file -- cgit v1.3 From c29cb4af4cc34ec5241fdad4b5bad1c25b7fe1cb Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Wed, 30 Oct 2019 15:20:57 -0400 Subject: [x/go.dev] Adding support for mentions Change-Id: Id0d8307c2884eab9b3e856a52ecad985b5c82b86 X-GoDev-Commit: a17f945b2884b1837c1d5482ddf7a64d968f80d0 --- go.dev/themes/default/layouts/index.html | 8 ++++++++ go.dev/themes/default/layouts/solutions/section.html | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index f140a40d..eb218551 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -25,11 +25,19 @@ diff --git a/go.dev/themes/default/layouts/solutions/section.html b/go.dev/themes/default/layouts/solutions/section.html index 14f21cb5..a4f85cad 100644 --- a/go.dev/themes/default/layouts/solutions/section.html +++ b/go.dev/themes/default/layouts/solutions/section.html @@ -51,6 +51,15 @@ -- cgit v1.3 From 55c6505ee360a76e68631ba7ec9f10b26b037fbc Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Wed, 30 Oct 2019 15:21:14 -0400 Subject: [x/go.dev] Adding Target mention Change-Id: I9670f50d1dc20c2ccd0d018ca69dab110646217c X-GoDev-Commit: 71294869c256806bee7055b6bdfda3d3f4d73549 --- go.dev/content/solutions/target/index.md | 13 +++++++++++++ go.dev/content/solutions/target/logo.svg | 33 ++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 go.dev/content/solutions/target/index.md create mode 100644 go.dev/content/solutions/target/logo.svg diff --git a/go.dev/content/solutions/target/index.md b/go.dev/content/solutions/target/index.md new file mode 100644 index 00000000..3ae5ab9d --- /dev/null +++ b/go.dev/content/solutions/target/index.md @@ -0,0 +1,13 @@ +--- +title: "Target - Recommending Go" +description: "" +date: 2019-10-29T16:26:31-04:00 +series: Case Studies +link: https://tech.target.com/infrastructure/2018/06/18/Recommending-GoLang-at-Target.html +resources: +- name: logo + src: logo.svg + params: + alt: Target +--- + fooo \ No newline at end of file diff --git a/go.dev/content/solutions/target/logo.svg b/go.dev/content/solutions/target/logo.svg new file mode 100644 index 00000000..74212b14 --- /dev/null +++ b/go.dev/content/solutions/target/logo.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + -- cgit v1.3 From cc07701e6afac319ab67bfd1fe89d63c2c04915f Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Wed, 30 Oct 2019 15:51:24 -0400 Subject: [x/go.dev] Relabel button on homepage Change-Id: I1c6fb39d8a214f7b2de9563ed48ce5ad81280cc7 X-GoDev-Commit: fa3f497fb40e5540264daf461ccf4d2618f1c275 --- go.dev/themes/default/layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index eb218551..7ae2de74 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -8,7 +8,7 @@

    -- cgit v1.3 From b0d9b0b2fa09d711329bc17a620663cf21a52dea Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Wed, 30 Oct 2019 15:51:58 -0400 Subject: [x/go.dev] moved shortcodes to correct location Change-Id: I429b5fa318691a5ed8b2673442facd7ef563a3ea X-GoDev-Commit: 9508c6f3af0bbe62d3660c5c454c8ec44c8dd82a --- go.dev/layouts/shortcodes/godev/largeMedia.html | 11 ----------- go.dev/layouts/shortcodes/godev/mediaList.html | 3 --- go.dev/layouts/shortcodes/godev/mediaListBox.html | 7 ------- go.dev/layouts/shortcodes/godev/mediaListItem.html | 5 ----- go.dev/layouts/shortcodes/godev/pullquote.html | 17 ----------------- go.dev/layouts/shortcodes/godev/starItem.html | 13 ------------- go.dev/layouts/shortcodes/largeMedia.html | 11 +++++++++++ go.dev/layouts/shortcodes/mediaList.html | 3 +++ go.dev/layouts/shortcodes/mediaListBox.html | 7 +++++++ go.dev/layouts/shortcodes/mediaListItem.html | 5 +++++ go.dev/layouts/shortcodes/pullquote.html | 17 +++++++++++++++++ go.dev/layouts/shortcodes/starItem.html | 13 +++++++++++++ 12 files changed, 56 insertions(+), 56 deletions(-) delete mode 100644 go.dev/layouts/shortcodes/godev/largeMedia.html delete mode 100644 go.dev/layouts/shortcodes/godev/mediaList.html delete mode 100644 go.dev/layouts/shortcodes/godev/mediaListBox.html delete mode 100644 go.dev/layouts/shortcodes/godev/mediaListItem.html delete mode 100644 go.dev/layouts/shortcodes/godev/pullquote.html delete mode 100644 go.dev/layouts/shortcodes/godev/starItem.html create mode 100644 go.dev/layouts/shortcodes/largeMedia.html create mode 100644 go.dev/layouts/shortcodes/mediaList.html create mode 100644 go.dev/layouts/shortcodes/mediaListBox.html create mode 100644 go.dev/layouts/shortcodes/mediaListItem.html create mode 100644 go.dev/layouts/shortcodes/pullquote.html create mode 100644 go.dev/layouts/shortcodes/starItem.html diff --git a/go.dev/layouts/shortcodes/godev/largeMedia.html b/go.dev/layouts/shortcodes/godev/largeMedia.html deleted file mode 100644 index de4cb1cb..00000000 --- a/go.dev/layouts/shortcodes/godev/largeMedia.html +++ /dev/null @@ -1,11 +0,0 @@ -
    - {{.Get -
    -

    - {{- .Get "title" | markdownify -}} -

    -

    - {{.Inner | markdownify -}} -

    -
    -
    diff --git a/go.dev/layouts/shortcodes/godev/mediaList.html b/go.dev/layouts/shortcodes/godev/mediaList.html deleted file mode 100644 index 1d11acb9..00000000 --- a/go.dev/layouts/shortcodes/godev/mediaList.html +++ /dev/null @@ -1,3 +0,0 @@ -
      - {{.Inner}} -
    diff --git a/go.dev/layouts/shortcodes/godev/mediaListBox.html b/go.dev/layouts/shortcodes/godev/mediaListBox.html deleted file mode 100644 index 4d093ec4..00000000 --- a/go.dev/layouts/shortcodes/godev/mediaListBox.html +++ /dev/null @@ -1,7 +0,0 @@ -
  • -
    - {{.Get -

    {{.Get "title"}}

    -
    -

    {{.Inner}}

    -
  • diff --git a/go.dev/layouts/shortcodes/godev/mediaListItem.html b/go.dev/layouts/shortcodes/godev/mediaListItem.html deleted file mode 100644 index beb43e38..00000000 --- a/go.dev/layouts/shortcodes/godev/mediaListItem.html +++ /dev/null @@ -1,5 +0,0 @@ -
  • - {{.Get -

    {{.Get "title"}}

    -

    {{.Inner}}

    -
  • diff --git a/go.dev/layouts/shortcodes/godev/pullquote.html b/go.dev/layouts/shortcodes/godev/pullquote.html deleted file mode 100644 index d3bccbf2..00000000 --- a/go.dev/layouts/shortcodes/godev/pullquote.html +++ /dev/null @@ -1,17 +0,0 @@ -
    -
    - Quotation mark. -
    -

    - {{.Inner | markdownify}} -

    - {{$author := .Get 0 -}} - {{if .IsNamedParams -}} - {{$author = .Get "author" -}} - {{end -}} - {{if $author -}} -
    - — {{$author -}} -
    - {{end -}} -
    diff --git a/go.dev/layouts/shortcodes/godev/starItem.html b/go.dev/layouts/shortcodes/godev/starItem.html deleted file mode 100644 index 1745c41d..00000000 --- a/go.dev/layouts/shortcodes/godev/starItem.html +++ /dev/null @@ -1,13 +0,0 @@ -
    - -
    -

    - {{- .Get "title" | markdownify -}} -

    -

    - {{.Inner | markdownify -}} -

    -
    -
    diff --git a/go.dev/layouts/shortcodes/largeMedia.html b/go.dev/layouts/shortcodes/largeMedia.html new file mode 100644 index 00000000..de4cb1cb --- /dev/null +++ b/go.dev/layouts/shortcodes/largeMedia.html @@ -0,0 +1,11 @@ +
    + {{.Get +
    +

    + {{- .Get "title" | markdownify -}} +

    +

    + {{.Inner | markdownify -}} +

    +
    +
    diff --git a/go.dev/layouts/shortcodes/mediaList.html b/go.dev/layouts/shortcodes/mediaList.html new file mode 100644 index 00000000..1d11acb9 --- /dev/null +++ b/go.dev/layouts/shortcodes/mediaList.html @@ -0,0 +1,3 @@ +
      + {{.Inner}} +
    diff --git a/go.dev/layouts/shortcodes/mediaListBox.html b/go.dev/layouts/shortcodes/mediaListBox.html new file mode 100644 index 00000000..4d093ec4 --- /dev/null +++ b/go.dev/layouts/shortcodes/mediaListBox.html @@ -0,0 +1,7 @@ +
  • +
    + {{.Get +

    {{.Get "title"}}

    +
    +

    {{.Inner}}

    +
  • diff --git a/go.dev/layouts/shortcodes/mediaListItem.html b/go.dev/layouts/shortcodes/mediaListItem.html new file mode 100644 index 00000000..beb43e38 --- /dev/null +++ b/go.dev/layouts/shortcodes/mediaListItem.html @@ -0,0 +1,5 @@ +
  • + {{.Get +

    {{.Get "title"}}

    +

    {{.Inner}}

    +
  • diff --git a/go.dev/layouts/shortcodes/pullquote.html b/go.dev/layouts/shortcodes/pullquote.html new file mode 100644 index 00000000..d3bccbf2 --- /dev/null +++ b/go.dev/layouts/shortcodes/pullquote.html @@ -0,0 +1,17 @@ +
    +
    + Quotation mark. +
    +

    + {{.Inner | markdownify}} +

    + {{$author := .Get 0 -}} + {{if .IsNamedParams -}} + {{$author = .Get "author" -}} + {{end -}} + {{if $author -}} +
    + — {{$author -}} +
    + {{end -}} +
    diff --git a/go.dev/layouts/shortcodes/starItem.html b/go.dev/layouts/shortcodes/starItem.html new file mode 100644 index 00000000..1745c41d --- /dev/null +++ b/go.dev/layouts/shortcodes/starItem.html @@ -0,0 +1,13 @@ +
    + +
    +

    + {{- .Get "title" | markdownify -}} +

    +

    + {{.Inner | markdownify -}} +

    +
    +
    -- cgit v1.3 From d010bfdc775975a6dd0856015c6a9167f889557c Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Wed, 30 Oct 2019 15:52:13 -0400 Subject: [x/go.dev] use pullquote shortcode Change-Id: I0d81316f9a76224f21375ebdc85c3b60768decd5 X-GoDev-Commit: 1fc19a772b21f6de0bcd78ef22ab1a021c6e2513 --- go.dev/content/solutions/paypal/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go.dev/content/solutions/paypal/index.md b/go.dev/content/solutions/paypal/index.md index 83fa5dd4..c1fb7acb 100644 --- a/go.dev/content/solutions/paypal/index.md +++ b/go.dev/content/solutions/paypal/index.md @@ -17,8 +17,10 @@ resources: PayPal was created to democratize financial services and empower people and businesses to join and thrive in the global economy. Central to this effort is PayPal's Payments Platform, which uses a combination of proprietary and third-party technologies to efficiently and securely facilitate transactions between millions of merchants and consumers worldwide. As the Payments Platform grew larger and more complicated, PayPal sought to modernize its systems and reduce time-to-market for new applications. +{{% pullquote %}} Go’s value in producing clean, efficient code that readily scales as software deployment scales made the language a strong fit to support PayPal’s goals. - +{{% /pullquote %}} + PayPal had a NoSQL database in C++, but the complexity of the code was substantially decreasing its developers’ productivity. Go’s goroutines (lightweight threads of execution) and channels (which serve as the pipes that connect concurrent goroutines), made Go a natural choice in the NoSQL development team’s assessment for piloting system simplification and modernization. As a proof of concept, a development team spent six months learning Go and reimplementing the NoSQL system from the ground up in Go, during which they also provided insights on how Go could be implemented more broadly at PayPal. -- cgit v1.3 From 72b5b5e53c045a72155ca892bf4b4d92d77b8df6 Mon Sep 17 00:00:00 2001 From: Matt Pearring Date: Wed, 30 Oct 2019 13:00:20 -0700 Subject: [x/go.dev] updating date for target mention X-GoDev-Commit: d55c83761689ad827c844d6856a9dc0074339389 --- go.dev/content/solutions/target/index.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/go.dev/content/solutions/target/index.md b/go.dev/content/solutions/target/index.md index 3ae5ab9d..36b1f2dc 100644 --- a/go.dev/content/solutions/target/index.md +++ b/go.dev/content/solutions/target/index.md @@ -1,7 +1,7 @@ --- title: "Target - Recommending Go" description: "" -date: 2019-10-29T16:26:31-04:00 +date: 2018-06-18 series: Case Studies link: https://tech.target.com/infrastructure/2018/06/18/Recommending-GoLang-at-Target.html resources: @@ -10,4 +10,3 @@ resources: params: alt: Target --- - fooo \ No newline at end of file -- cgit v1.3 From c976ada6e121365c32e4af31e19b8b1e9ec27103 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Wed, 30 Oct 2019 16:26:34 -0400 Subject: [x/go.dev] shifting shortcodes to use % and post to match Change-Id: Idb1f4c21310aeb45cb5bcb2ac4b30d6a4d9a03e1 X-GoDev-Commit: 2f191c99842e94167b192287645fc24c758b6524 --- go.dev/content/post.md | 84 +++++++++++++++---------------- go.dev/layouts/shortcodes/largeMedia.html | 2 +- go.dev/layouts/shortcodes/pullquote.html | 2 +- go.dev/layouts/shortcodes/starItem.html | 2 +- 4 files changed, 45 insertions(+), 45 deletions(-) diff --git a/go.dev/content/post.md b/go.dev/content/post.md index ffea3167..87ba9d93 100644 --- a/go.dev/content/post.md +++ b/go.dev/content/post.md @@ -12,12 +12,12 @@ Lorem markdownum horum surgere es quaeris et iuvenci cadunt hausitque armiferae sola** poposcerat bracchia. Sanguine _discutiunt manu_, mihi armos? Dilata levia ab mira auxiliaria pennas Eumenidum lentoque inertem tantum stipite pompa. -{{}} +{{%pullquote author="Google dev manager"%}} Lorem markdownum horum surgere es quaeris et iuvenci cadunt hausitque armiferae [senex](http://sub.com/). Cecidisse inpediunt Romam, voluisse curru **saepe pro sola** poposcerat bracchia. Sanguine _discutiunt manu_, mihi armos? Dilata levia ab mira auxiliaria pennas Eumenidum lentoque inertem tantum stipite pompa. -{{}} +{{%/pullquote%}} ## Rex feritatis tamen seminaque aquas liceret nepos @@ -64,76 +64,76 @@ venerit! _Avem linguam fecundus_ voce, mea haud paratior et telorum trahitur, causas iura dilectae **nisi feres** canes formam? Domos ac mediaque os Stygias! -{{}} + img-alt="Google."%}} Lorem markdownum horum surgere es quaeris et iuvenci cadunt hausitque armiferae [senex](http://sub.com/). -{{}} -{{}} + img-alt="Gopher piloting a biplane."%}} Lorem markdownum horum surgere es quaeris et iuvenci cadunt hausitque armiferae [senex](http://sub.com/). -{{}} +{{%/largeMedia%}} -{{}} - {{}} + img-alt="Google."%}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut - {{}} - {{}} + img-alt="Gopher piloting a biplane."%}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut - {{}} - {{}} + img-alt="Google."%}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut - {{}} - {{}} + img-alt="Gopher piloting a biplane."%}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut - {{}} -{{}} + {{%/mediaListItem%}} +{{%/mediaList%}} -{{}} - {{}} + img-alt="Google."%}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - {{}} - {{}} + img-alt="Gopher piloting a biplane."%}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - {{}} - {{}} + img-alt="Google."%}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - {{}} - {{}} + img-alt="Gopher piloting a biplane."%}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - {{}} -{{}} + {{%/mediaListBox%}} +{{%/mediaList%}} -{{}} +{{%starItem title="Lorem ipsum dolor sit amet, consectetur"%}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -{{}} -{{}} +{{%/starItem%}} +{{%starItem title="Lorem ipsum dolor sit amet, consectetur"%}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -{{}} -{{}} +{{%/starItem%}} +{{%starItem title="Lorem ipsum dolor sit amet, consectetur"%}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, -{{}} +{{%/starItem%}} diff --git a/go.dev/layouts/shortcodes/largeMedia.html b/go.dev/layouts/shortcodes/largeMedia.html index de4cb1cb..7de6c882 100644 --- a/go.dev/layouts/shortcodes/largeMedia.html +++ b/go.dev/layouts/shortcodes/largeMedia.html @@ -5,7 +5,7 @@ {{- .Get "title" | markdownify -}}

    - {{.Inner | markdownify -}} + {{.Inner -}}

    diff --git a/go.dev/layouts/shortcodes/pullquote.html b/go.dev/layouts/shortcodes/pullquote.html index d3bccbf2..fa4406f4 100644 --- a/go.dev/layouts/shortcodes/pullquote.html +++ b/go.dev/layouts/shortcodes/pullquote.html @@ -3,7 +3,7 @@ Quotation mark.

    - {{.Inner | markdownify}} + {{.Inner}}

    {{$author := .Get 0 -}} {{if .IsNamedParams -}} diff --git a/go.dev/layouts/shortcodes/starItem.html b/go.dev/layouts/shortcodes/starItem.html index 1745c41d..b070cf8d 100644 --- a/go.dev/layouts/shortcodes/starItem.html +++ b/go.dev/layouts/shortcodes/starItem.html @@ -7,7 +7,7 @@ {{- .Get "title" | markdownify -}}

    - {{.Inner | markdownify -}} + {{.Inner -}}

    -- cgit v1.3 From 78ed9c25b3cdb088146934f705cdd84ea7ec4328 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Wed, 30 Oct 2019 16:41:13 -0400 Subject: [x/go.dev] making all shortcodes render markdown Change-Id: I54b4b42549ec0f604b12027259497273894b837e X-GoDev-Commit: b8d6e528ffaf0e3b182de6db813edb7b50bd83c8 --- go.dev/layouts/shortcodes/largeMedia.html | 2 +- go.dev/layouts/shortcodes/mediaListBox.html | 2 +- go.dev/layouts/shortcodes/mediaListItem.html | 2 +- go.dev/layouts/shortcodes/pullquote.html | 2 +- go.dev/layouts/shortcodes/starItem.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.dev/layouts/shortcodes/largeMedia.html b/go.dev/layouts/shortcodes/largeMedia.html index 7de6c882..de4cb1cb 100644 --- a/go.dev/layouts/shortcodes/largeMedia.html +++ b/go.dev/layouts/shortcodes/largeMedia.html @@ -5,7 +5,7 @@ {{- .Get "title" | markdownify -}}

    - {{.Inner -}} + {{.Inner | markdownify -}}

    diff --git a/go.dev/layouts/shortcodes/mediaListBox.html b/go.dev/layouts/shortcodes/mediaListBox.html index 4d093ec4..05de1482 100644 --- a/go.dev/layouts/shortcodes/mediaListBox.html +++ b/go.dev/layouts/shortcodes/mediaListBox.html @@ -3,5 +3,5 @@ {{.Get

    {{.Get "title"}}

    -

    {{.Inner}}

    +

    {{.Inner | markdownify -}}

    diff --git a/go.dev/layouts/shortcodes/mediaListItem.html b/go.dev/layouts/shortcodes/mediaListItem.html index beb43e38..054df1d7 100644 --- a/go.dev/layouts/shortcodes/mediaListItem.html +++ b/go.dev/layouts/shortcodes/mediaListItem.html @@ -1,5 +1,5 @@
  • {{.Get

    {{.Get "title"}}

    -

    {{.Inner}}

    +

    {{.Inner | markdownify -}}

  • diff --git a/go.dev/layouts/shortcodes/pullquote.html b/go.dev/layouts/shortcodes/pullquote.html index fa4406f4..d3bccbf2 100644 --- a/go.dev/layouts/shortcodes/pullquote.html +++ b/go.dev/layouts/shortcodes/pullquote.html @@ -3,7 +3,7 @@ Quotation mark.

    - {{.Inner}} + {{.Inner | markdownify}}

    {{$author := .Get 0 -}} {{if .IsNamedParams -}} diff --git a/go.dev/layouts/shortcodes/starItem.html b/go.dev/layouts/shortcodes/starItem.html index b070cf8d..1745c41d 100644 --- a/go.dev/layouts/shortcodes/starItem.html +++ b/go.dev/layouts/shortcodes/starItem.html @@ -7,7 +7,7 @@ {{- .Get "title" | markdownify -}}

    - {{.Inner -}} + {{.Inner | markdownify -}}

    -- cgit v1.3 From b2bae9367f8b7b64478931a2d8f980424afd239c Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Wed, 30 Oct 2019 16:41:22 -0400 Subject: [x/go.dev] making pull quotes stand out more Change-Id: Iece6ae7de0a47f1af07116da86f2e99f47816c63 X-GoDev-Commit: 83bc7adb061de917019f35d6bc06e61d6d5f20ba --- go.dev/themes/default/assets/css/styles.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index 58453efd..3ffb9c1d 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -1060,9 +1060,9 @@ a.Footer-link { width: 1.8125rem; } .PullQuote p { - font-size: 1.125rem; - line-height: 2rem; - margin: 0.5rem 0; + font-size: 1.725rem; + line-height: 2.5rem; + margin: 0 1rem 1rem 1rem; } .PullQuote-author { color: #6e7072; -- cgit v1.3 From 4a52bdab269cc47d0a3a9c58be01045999bbce7b Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Wed, 30 Oct 2019 17:30:55 -0400 Subject: [x/go.dev] Adding Gopher shortcode + 2 extra image sizes Change-Id: I4dfd48c16b700d23c7df6a9f052c1ae0b3c54c2c X-GoDev-Commit: 87fff3621a811c4e1595e762623482e3327401f6 --- go.dev/content/solutions/paypal/index.md | 9 ++++- go.dev/layouts/shortcodes/gopher.html | 61 +++++++++++++++++++++++++++++ go.dev/themes/default/assets/css/styles.css | 35 +++++++++++++++++ 3 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 go.dev/layouts/shortcodes/gopher.html diff --git a/go.dev/content/solutions/paypal/index.md b/go.dev/content/solutions/paypal/index.md index c1fb7acb..fde112a6 100644 --- a/go.dev/content/solutions/paypal/index.md +++ b/go.dev/content/solutions/paypal/index.md @@ -37,8 +37,9 @@ With Go, PayPal enables its developers to spend more time looking at code and th After the success of this newly re-written NoSQL system, more platform and content teams within PayPal began adopting Go. Natarajan’s current team is responsible for PayPal’s build, test, and release pipelines—all built in Go. The company has a large build farm which is completely managed using Go infrastructure and supports builds-as-a-service for developers across the company. +### Modernizing PayPal Systems With Go -### **Modernizing PayPal Systems With Go** +{{% gopher gopher=machine size="XLarge" %}} With the distributed computing required by PayPal, Go was the right language to refresh their systems. PayPal needed programming that is concurrent and parallel, compiled for high performance and highly portable, and that brings developers the benefits of a modular, composable open-source architecture—Go has delivered all that and more to help PayPal modernize its systems. @@ -46,10 +47,13 @@ Security and supportability are key matters at PayPal, and the company’s opera As PayPal continues to modernize their software-defined networking (SDN) infrastructure with Go, they are seeing performance benefits in addition to more maintainable code. For example, Go now powers routers, load balances, and an increasing number of production systems. **“In our tightly managed environments where we run Go code,”** says Natarajan, **“We have seen a CPU reduction of approximately 10% with cleaner and maintainable code.”** - ### **Go Increases Developer Productivity** As a global operation, PayPal needs its development teams to be effective at managing two kinds of scale: production scale, especially concurrent systems interacting with many other servers (such as cloud services); and development scale, especially large codebases developed by many programmers in coordination (such as open-source development). + +{{% pullquote %}} +[Paypal's] developers benefit from Go’s ability to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language +{{% /pullquote %}} PayPal leverages Go to address these issues of scale. The company’s developers benefit from Go’s ability to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. As PayPal modernizes its system, support for networked and multicore computing is critical. Go not only delivers such support but delivers quickly—it takes at most a few seconds to compile a large executable on a single computer. @@ -62,6 +66,7 @@ Most importantly, PayPal developers have increased their productivity with Go. G The first-class languages at PayPal today are Java and Node, with Go primarily used as an infrastructure language. While Go may never replace Node.js for certain applications, Natarajan is pushing to make Go a first-class language at PayPal. +{{% gopher align=right gopher=headlamp size="XLarge" %}} Through his efforts, PayPal is also evaluating moving to the Google Kubernetes Engine (GKE) to speed their new products’ time-to-market. The GKE is a managed, production-ready environment for deploying containerized applications, and brings Google's latest innovations in developer productivity, automated operations, and open source flexibility. For PayPal, deploying the GKE would enable rapid development and iteration by making it easier for PayPal to deploy, update, and manage its applications and services. Plus PayPal will find it easier to run Machine Learning, General Purpose GPU, High-Performance Computing, and other workloads that benefit from specialized hardware accelerators supported by the GKE. diff --git a/go.dev/layouts/shortcodes/gopher.html b/go.dev/layouts/shortcodes/gopher.html new file mode 100644 index 00000000..8660efb1 --- /dev/null +++ b/go.dev/layouts/shortcodes/gopher.html @@ -0,0 +1,61 @@ +{{ $src := "/images/gopher-wrench.svg"}} +{{ $alt := "gopher with wrench"}} +{{ $size := "Large"}} +{{ $align := "Left"}} +{{ $gopher := .Get "gopher"}} +{{ $sizeIn := .Get "size"}} + +{{if or (eq (.Get "align") "right") (eq (.Get "align") "Right")}} + {{$align = "Right"}} +{{end}} + +{{if or (or (eq $sizeIn "XLarge") (eq $sizeIn "xl")) (eq $sizeIn "xlarge") }} + {{$size = "XLarge"}} +{{end}} + +{{if eq $gopher "tux"}} + {{$src = "/images/gopher-tux-blue.svg"}} + {{$alt = "gopher in a tux"}} +{{end}} +{{if eq $gopher "plane"}} + {{$src = "/images/gopher-biplane.svg"}} + {{$alt = "gopher in a plane"}} +{{end}} +{{if eq $gopher "graduate"}} + {{$src = "/images/gopher-graduate.svg"}} + {{$alt = "gopher graduating"}} +{{end}} +{{if eq $gopher "graduate-blue"}} + {{$src = "/images/gopher-graduate-blue.svg"}} + {{$alt = "gopher graduating"}} +{{end}} +{{if eq $gopher "headlamp"}} + {{$src = "/images/gopher-headlamp.svg"}} + {{$alt = "gopher with headlamp"}} +{{end}} +{{if eq $gopher "headlamp-blue"}} + {{$src = "/images/gopher-headlamp-blue.svg"}} + {{$alt = "gopher with headlamp"}} +{{end}} +{{if eq $gopher "ladder"}} + {{$src = "/images/gopher-ladder.svg"}} + {{$alt = "gopher with ladder"}} +{{end}} +{{if eq $gopher "machine"}} + {{$src = "/images/gopher-machine.svg"}} + {{$alt = "gophers with a machine"}} +{{end}} +{{if eq $gopher "machine-c"}} + {{$src = "/images/gopher-machine-c.svg"}} + {{$alt = "gopher with a machine"}} +{{end}} +{{if eq $gopher "pilot"}} + {{$src = "/images/gopher-pilot.svg"}} + {{$alt = "gopher pilot"}} +{{end}} +{{if eq $gopher "wrench-c"}} + {{$src = "/images/gopher-wrench-c.svg"}} + {{$alt = "gopher with a wrench"}} +{{end}} + +{{$alt}} \ No newline at end of file diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index 3ffb9c1d..1f3711a9 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -1088,15 +1088,41 @@ a.Footer-link { .LargeMedia-body { flex: 1; } + +.SmallMedia-image { + margin-right: 1rem; + object-fit: contain; + height: 3rem; + width: 3rem; +} + +.XLargeMedia-image { + margin-right: 1rem; + object-fit: contain; + height: 8rem; + width: 8rem; +} + @media only screen and (min-width: 48rem) { .LargeMedia { align-items: center; } + .SmallMedia-image { + margin-right: 5.5rem; + height: 9rem; + width: 9rem; + } .LargeMedia-image { margin-right: 5.5rem; height: 12.5rem; width: 12.5rem; } + .XLargeMedia-image { + margin-right: 1rem; + object-fit: contain; + height: 18rem; + width: 18rem; + } } .MediaList { display: flex; @@ -1202,3 +1228,12 @@ a.Footer-link { .StarItem-title { margin: 1rem 0; } + +.Right { + float: right; + margin-left: 1rem; +} +.Left { + float: left; + margin-right: 1rem; +} \ No newline at end of file -- cgit v1.3 From 1365dded6cf513418d9b22c4a1b4961a2fafccfb Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Wed, 30 Oct 2019 17:32:51 -0400 Subject: [x/go.dev] title now optional in LargeMedia shortcode Change-Id: Idd178610a23f85ee6ea53303f4d38262d0d3664c X-GoDev-Commit: 47fd6d8d2bf35a68ed54a9cabbb0d6f80c0bde77 --- go.dev/layouts/shortcodes/largeMedia.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go.dev/layouts/shortcodes/largeMedia.html b/go.dev/layouts/shortcodes/largeMedia.html index de4cb1cb..669f3cb7 100644 --- a/go.dev/layouts/shortcodes/largeMedia.html +++ b/go.dev/layouts/shortcodes/largeMedia.html @@ -1,9 +1,11 @@
    {{.Get
    + {{with .Get "title"}}

    - {{- .Get "title" | markdownify -}} + {{- . | markdownify -}}

    + {{end}}

    {{.Inner | markdownify -}}

    -- cgit v1.3 From 4a5e1bab98ac56d961b3f0cdb7114dfbce1a53f2 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Wed, 30 Oct 2019 17:41:33 -0400 Subject: [x/go.dev] Polish up PayPal case study content Change-Id: Ia7e2da6106ce719b9907ea8da029a42c771582a6 X-GoDev-Commit: 1e960481bb8d2f016f3f9fe281f850baae7f0efb --- go.dev/content/solutions/paypal/index.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/go.dev/content/solutions/paypal/index.md b/go.dev/content/solutions/paypal/index.md index fde112a6..6b6f6ffa 100644 --- a/go.dev/content/solutions/paypal/index.md +++ b/go.dev/content/solutions/paypal/index.md @@ -9,12 +9,9 @@ resources: params: alt: PayPal --- -## PayPal Taps Go to Modernize and Scale - ### New Code Infrastructure Built on Go - PayPal was created to democratize financial services and empower people and businesses to join and thrive in the global economy. Central to this effort is PayPal's Payments Platform, which uses a combination of proprietary and third-party technologies to efficiently and securely facilitate transactions between millions of merchants and consumers worldwide. As the Payments Platform grew larger and more complicated, PayPal sought to modernize its systems and reduce time-to-market for new applications. {{% pullquote %}} @@ -76,7 +73,7 @@ Most importantly for PayPal, the combination of Go development and the GKE allow ## **Getting Your Enterprise Started With Go** -PayPal’s story is not unique; dozens of other large enterprises are discovering how Go can help them ship reliable software faster. There are approximately two million developers using Go worldwide, spanning banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as Amazon, Apple, Dropbox, Epic Games, Facebook, IBM, Microsoft, Square, Uber, and of course Google. +PayPal’s story is not unique; dozens of other large enterprises are discovering how Go can help them ship reliable software faster. There are approximately two million developers using Go worldwide, spanning banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as Dropbox, New York Times, Salesforce, Target, Capital One, Monzo, Twitch, IBM, Square, Uber, and of course Google. To learn more about how Go can help your enterprise build reliable, scalable software as it does at PayPal,visit go.dev today. -- cgit v1.3 From 06639e3d1312c0ef6d7d8d3abc45c43221f5db4b Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Wed, 30 Oct 2019 17:46:24 -0400 Subject: [x/go.dev] content/post: fix multiple layout issues in shortcodes Looks like we were missing a /, along with accidentally double-indenting our content into code blocks. Change-Id: I5e621d21144eb7738bbe14af68ade3857c0ba1a8 X-GoDev-Commit: bb0d1ace387cfa9ed9577a3f3154934d8e585ab0 --- go.dev/content/post.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/go.dev/content/post.md b/go.dev/content/post.md index 87ba9d93..d0374935 100644 --- a/go.dev/content/post.md +++ b/go.dev/content/post.md @@ -70,7 +70,7 @@ dilectae **nisi feres** canes formam? Domos ac mediaque os Stygias! img-alt="Google."%}} Lorem markdownum horum surgere es quaeris et iuvenci cadunt hausitque armiferae [senex](http://sub.com/). -{{%largeMedia%}} +{{%/largeMedia%}} {{%largeMedia title="_Avem linguam fecundus_ voce, mea haud" img-src="/images/gopher-biplane.png" @@ -83,22 +83,22 @@ dilectae **nisi feres** canes formam? Domos ac mediaque os Stygias! {{%mediaListItem title="Lorem ipsum dolor" img-src="/images/google-logo.png" img-alt="Google."%}} - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut {{%/mediaListItem%}} {{%mediaListItem title="Lorem ipsum dolor" img-src="/images/gopher-biplane.png" img-alt="Gopher piloting a biplane."%}} - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut {{%/mediaListItem%}} {{%mediaListItem title="Lorem ipsum dolor" img-src="/images/google-logo.png" img-alt="Google."%}} - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut {{%/mediaListItem%}} {{%mediaListItem title="Lorem ipsum dolor" img-src="/images/gopher-biplane.png" img-alt="Gopher piloting a biplane."%}} - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut {{%/mediaListItem%}} {{%/mediaList%}} @@ -106,22 +106,22 @@ dilectae **nisi feres** canes formam? Domos ac mediaque os Stygias! {{%mediaListBox title="Lorem ipsum" img-src="/images/google-logo.png" img-alt="Google."%}} - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{%/mediaListBox%}} {{%mediaListBox title="Lorem ipsum" img-src="/images/gopher-biplane.png" img-alt="Gopher piloting a biplane."%}} - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{%/mediaListBox%}} {{%mediaListBox title="Lorem ipsum" img-src="/images/learn/codecademy.png" img-alt="Google."%}} - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{%/mediaListBox%}} {{%mediaListBox title="Lorem ipsum" img-src="/images/gopher-biplane.png" img-alt="Gopher piloting a biplane."%}} - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{%/mediaListBox%}} {{%/mediaList%}} -- cgit v1.3 From 351f25504af78d69baded8f8473935b926868a0b Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Wed, 30 Oct 2019 18:24:38 -0400 Subject: [x/go.dev] removed unneeded logo png files Change-Id: I5d1bc846de8fcd298ed42970bbae70e5e5405d07 X-GoDev-Commit: 4861837aa16b0ff4e4e8b0dab13836e5a30c7af3 --- go.dev/content/solutions/mercadolibre/logo.png | Bin 47150 -> 0 bytes go.dev/content/solutions/paypal/logo.png | Bin 31522 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 go.dev/content/solutions/mercadolibre/logo.png delete mode 100644 go.dev/content/solutions/paypal/logo.png diff --git a/go.dev/content/solutions/mercadolibre/logo.png b/go.dev/content/solutions/mercadolibre/logo.png deleted file mode 100644 index 337ecea7..00000000 Binary files a/go.dev/content/solutions/mercadolibre/logo.png and /dev/null differ diff --git a/go.dev/content/solutions/paypal/logo.png b/go.dev/content/solutions/paypal/logo.png deleted file mode 100644 index 6197d0ab..00000000 Binary files a/go.dev/content/solutions/paypal/logo.png and /dev/null differ -- cgit v1.3 From fc64a93d347a6e94fb320b865477e6eb18b2a6c6 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Wed, 30 Oct 2019 18:25:27 -0400 Subject: [x/go.dev] adjusting the size of the pull quotes Change-Id: Idfce7877b5efbd78305dacb4093a957439418fef X-GoDev-Commit: cfaf2317f8f4361094e13833f147d7a18cb26860 --- go.dev/themes/default/assets/css/styles.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index 1f3711a9..b121cd7b 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -1060,8 +1060,8 @@ a.Footer-link { width: 1.8125rem; } .PullQuote p { - font-size: 1.725rem; - line-height: 2.5rem; + font-size: 1.5rem; + line-height: 2rem; margin: 0 1rem 1rem 1rem; } .PullQuote-author { -- cgit v1.3 From afe90dff22799b4c8db1088efc10f8da26213a06 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Wed, 30 Oct 2019 18:25:49 -0400 Subject: [x/go.dev] Polishing up the content of both case studies Change-Id: Iddd89f801623b534d405ebd2e5397d62f84ce78c X-GoDev-Commit: a5166849cc2b9187ac2f0ff59a9bc6b08f513ffe --- go.dev/content/solutions/mercadolibre/index.md | 82 ++++++++++---------------- go.dev/content/solutions/paypal/index.md | 40 ++++++------- 2 files changed, 49 insertions(+), 73 deletions(-) diff --git a/go.dev/content/solutions/mercadolibre/index.md b/go.dev/content/solutions/mercadolibre/index.md index 35d33b6c..89cc6730 100644 --- a/go.dev/content/solutions/mercadolibre/index.md +++ b/go.dev/content/solutions/mercadolibre/index.md @@ -3,24 +3,22 @@ title: "MercadoLibre Grows with Go" description: "" date: 2019-10-03T16:26:31-04:00 series: Case Studies +quote: Go provides clean, efficient code that readily scales as MercadoLibre’s online commerce grows, and increases developer productivity by allowing their engineers to serve their ever-increasing audience while writing less code. resources: - name: logo src: logo.svg params: alt: MercadoLibre --- -## MercadoLibre Grows with Go - -### Go Helps Integrated Ecosystem Attract Developers and Scale eCommerce +## Go Helps Integrated Ecosystem Attract Developers and Scale eCommerce MercadoLibre, Inc. hosts the largest online commerce ecosystem in Latin America and is present in 18 countries. Founded in 1999 and headquartered in Argentina, the company has turned to Go to help it scale and modernize its ecosystem. Go provides clean, efficient code that readily scales as MercadoLibre’s online commerce grows, and increases developer productivity by allowing their engineers to serve their ever-increasing audience while writing less code. - -## **MERCADOLIBRE TAPS GO FOR SCALE** +## MercadoLibre Taps Go for Scale Back in 2015, there was a growing sense within MercadoLibre that their existing API framework, on Groovy and Grails, was reaching its limits and the company needed a different platform to continue scaling. MercadoLibre’s platform was (and @@ -31,7 +29,7 @@ to develop and tune to achieve desired performance. Test execution times were sl slow. Thus, the need for code efficiency and scalability became as important as the need for speed in code development. -### **Go Improves System Efficiency** +## Go Improves System Efficiency As one example of Go’s contributions to network efficiency, the core API team builds and maintains the largest APIs at the center of the company’s microservices solutions. This team creates user APIs, which in turn are used by the @@ -39,31 +37,29 @@ MercadoLibre Marketplace, by the MercadoPago FinTech platform, by MercadoLibre other hosted solutions. With the high service levels demanded by these solutions—the average user API has between eight and ten million requests per minute—the team employs Go to serve them at less than ten milliseconds per request. - - +{{% gopher gopher=pilot align=right %}} The API team also deploys Docker containers—a software-as-a-service (SaaS) product, also written in Go—to virtualize their development and readily deploy their microservices via the Docker Engine. This system supports larger, -mission-critical APIs that handle **more than** **20 million requests per minute in Go.** - - +mission-critical APIs that handle **more than 20 million requests per minute in Go.** One API made important use of Go’s concurrency primitives to efficiently multiplex IDs from several services. The team was able to accomplish this with just a few lines of Go code, and the success of this API convinced the core API team to migrate more and more microservices to Go. The end result for MercadoLibre has been improved cost-efficiencies and system response times. - -### **Go for Scalability** +## Go for Scalability Historically, much of the company’s stack was based on Grails and Groovy backed by relational databases. However this big framework with multiple layers was soon found encountering scalability issues. Converting that legacy architecture to Go as a new, very thin framework for building APIs streamlined those intermediate layers and yielded great performance benefits. For example, one large Go service is now able to **run 70,000 requests -per machine with just 20 MB of RAM. ** +per machine with just 20 MB of RAM.** -“Go was just marvelous for us,” explains Eric Kohan, Software Engineering Manager at MercadoLibre. “It’s very powerful -and very easy to learn, and with backend infrastructure has been great for us in terms of scalability.” +{{% pullquote author="Eric Kohan, Software Engineering Manager @ MercadoLibre" %}} +Go was just marvelous for us. It’s very powerful +and very easy to learn, and with backend infrastructure, has been great for us in terms of scalability. +{{% /pullquote %}} Using **Go allowed MercadoLibre to cut the number of servers** they use for this service to one-eighth the original number (from 32 servers down to four), plus each server can operate with less power (originally four CPU cores, now down @@ -80,14 +76,13 @@ up a new project—all while effectively standardizing the build and deployment Today, **roughly half of Mercadolibre's traffic is handled by Go applications.** -## **MERCADOLIBRE USES GO FOR DEVELOPERS** +## MercadoLibre Uses Go for Developers +{{% gopher gopher=wrench-c %}} The programming _lingua francas_ for MercadoLibre’s infrastructure are currently Go and Java. Every app, every program, every microservice is hosted on its own GitHub repository, plus the company uses an additional GitHub repository of toolkits to solve new problems and allow clients to interact with its services. - - These extensive and well-curated Go and Java toolkits allow programmers to develop new apps quickly and with great support. Plus, in a community of more than 2,800 developers, MercadoLibre has multiple internal groups available for chat and guidance on deploying Go, whether across different development centers or different countries. The company also @@ -95,18 +90,16 @@ fosters internal working groups to provide training sessions for new MercadoLibr for external developers to help build a broader community of Latin American Go developers. -### **Go as a Recruiting Tool** +## Go as a Recruiting Tool MercadoLibre’s Go advocacy has also become a strong recruiting tool for the company. MercadoLibre was among the first companies using Go in Argentina, and is perhaps the largest in Latin America using the language so widely in production. Headquartered in Buenos Aires, with many start-ups and emerging technology companies nearby, MercadoLibre's adoption of Go has shaped the market for developers across the Pampas. -"We really see eye-to-eye with the larger philosophy of the language," Kohan explains. "We love Go's simplicity, and we -find that having its very explicit error handling has been a gain for developers because it results in safer, more -stable code in production." - - +{{% pullquote author="Eric Kohan, Software Engineering Manager @ MercadoLibre" %}} +We really see eye-to-eye with the larger philosophy of the language. We love Go's simplicity, and we find that having its very explicit error handling has been a gain for developers because it results in safer, more stable code in production. +{{% /pullquote %}} Buenos Aires is today a very competitive market for programmers, offering computer programmers many employment options, and the high demand for technology in the region drives great salaries, great benefits, and the ability to be selective @@ -115,31 +108,23 @@ to provide an exciting workplace and strong career path. Go has proven to be a k company organizes Go workshops for external developers so they can come and learn Go, and when they enjoy what they are doing and the people they talk to, they quickly recognize MercadoLibre as an enticing place to work. - -### **Go Enabling Developers** +## Go Enabling Developers MercadoLibre employs Go for its simplicity with systems at scale, but that simplicity is also why the company's developers love Go. +{{% pullquote author="Eric Kohan, Software Engineering Manager @ MercadoLibre" %}} +I think that **the tour of Go is by far the best introduction to a language that I’ve seen**, It’s really simple and it gives you a fair overview of probably 80 percent of the language. When we want to get developers to learn Go, and to get to production fast, we tell them to start with the tour of Go. +{{% /pullquote %}} - -"I think that **the** **tour of Go is by far the best introduction to a language that I’ve seen**," says Kohan. "It’s -really simple and it gives you a fair overview of probably 80 percent of the language. When we want to get developers to -learn Go, and to get to production fast, we tell them to start with the tour of Go." - - - The company also uses web pages like[ Go by Example](https://gobyexample.com/) and[ Effective Go](https://golang.org/doc/effective_go.html) to educate new programmers, and shares representative internal APIs written in Go to speed understanding and proficiency. MercadoLibre developers get the resources they need to embrace the language, then leverage their own skills and enthusiasm to start programming. - - -"Go has been great for writing business logic," says Federico Martin Roasio, Technical Project Lead at MercadoLibre. -"And we are the team that writes those APIs." - - +{{% pullquote author="Federico Martin Roasio, Technical Project Lead @ MercadoLibre" %}} +Go has been great for writing business logic, and we are the team that writes those APIs. +{{% /pullquote %}} MercadoLibre leverages Go’s expressive and clean syntax to make it easier for developers to write programs that run efficiently on modern cloud platforms. And while speed in development yields cost efficiency for the company, developers @@ -151,30 +136,23 @@ only knew about programming from recent courses at university. Similarly, Mercad proficient with other programming languages (such as Java or .NET or Ruby) learn Go fast enough start writing production services in just a few weeks. -With Go, MercadoLibre’s **build times are three times (3x) faster** and their** test suite runs an amazing 24 times +With Go, MercadoLibre’s **build times are three times (3x) faster** and their **test suite runs an amazing 24 times faster**. This means the company’s developers can make a change, then build and test that change much faster than they could before. And dropping MercadoLibre’s test suite runtimes from 90-seconds to **just 3-seconds with Go** was a huge boon for its developers—allowing them to keep focus (and context) while the much faster tests complete. - - Leveraging this success, MercadoLibre is committed not only to ongoing education for its programmers, but ongoing Go education. The company sends key engineering leaders to GopherCon and other Go events each year, MercadoLibre’s infrastructure and security teams encourage all the development teams to keep Go versions up to date, and the company -has a team developing a_ Go-meli-toolkit_: A complete Go library to interface all the services provided by Fury. +has a team developing a _Go-meli-toolkit_: A complete Go library to interface all the services provided by Fury. - -## **GETTING YOUR ENTERPRISE STARTED WITH GO** +## Getting Your Enterprise Started With Go Just as MercadoLibre started with a proof-of-concept project to implement Go, dozens of other large enterprises are adopting Go as well. Beyond MercadoLibre, there are approximately two million developers using Go worldwide—spanning -banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as Amazon, Apple, -Cisco, Disney, Dropbox, Epic Games, Facebook, GE, IBM, Microsoft, Netflix, Square, Stripe, Uber, Walmart, and of course -Google. - - +banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as Dropbox, New York Times, Salesforce, Target, Capital One, Monzo, Twitch, IBM, Square, Uber, and of course Google. To learn more about how Go can help your enterprise build reliable, scalable software as it does at MercadoLibre, visit -Go.dev today. +[Go.dev](https://go.dev) today. diff --git a/go.dev/content/solutions/paypal/index.md b/go.dev/content/solutions/paypal/index.md index 6b6f6ffa..e6353f9d 100644 --- a/go.dev/content/solutions/paypal/index.md +++ b/go.dev/content/solutions/paypal/index.md @@ -3,6 +3,7 @@ title: "PayPal Taps Go to Modernize and Scale" description: "" date: 2019-10-03T16:26:31-04:00 series: Case Studies +quote: Developers benefit from Go’s ability to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language resources: - name: logo src: logo.svg @@ -10,70 +11,67 @@ resources: alt: PayPal --- -### New Code Infrastructure Built on Go +## New Code Infrastructure Built on Go PayPal was created to democratize financial services and empower people and businesses to join and thrive in the global economy. Central to this effort is PayPal's Payments Platform, which uses a combination of proprietary and third-party technologies to efficiently and securely facilitate transactions between millions of merchants and consumers worldwide. As the Payments Platform grew larger and more complicated, PayPal sought to modernize its systems and reduce time-to-market for new applications. -{{% pullquote %}} +{{% gopher align=right %}} Go’s value in producing clean, efficient code that readily scales as software deployment scales made the language a strong fit to support PayPal’s goals. -{{% /pullquote %}} PayPal had a NoSQL database in C++, but the complexity of the code was substantially decreasing its developers’ productivity. Go’s goroutines (lightweight threads of execution) and channels (which serve as the pipes that connect concurrent goroutines), made Go a natural choice in the NoSQL development team’s assessment for piloting system simplification and modernization. As a proof of concept, a development team spent six months learning Go and reimplementing the NoSQL system from the ground up in Go, during which they also provided insights on how Go could be implemented more broadly at PayPal. -## **Using Go To Simplify For Scale** +## Using Go To Simplify For Scale As PayPal’s platform becomes more intricate, Go provides a way to readily simplify the complexity of creating and running software at scale. The language provides PayPal with great libraries and fast tools, plus concurrency, garbage collection, and type safety. With Go, PayPal enables its developers to spend more time looking at code and thinking strategically, by freeing them from the noise of C++ development. -“Since our NoSQL and DB proxy used quite a bit of system details in a multi-threaded mode, the code got complex managing the different conditions,” said Bala Natarajan, Sr. Director of Engineering, Developer Experience and one of PayPal’s early Go evangelists. “Given that Go provides channels and routines to deal with complexity, we were able to structure the code to meet our requirements.” +{{% pullquote author="Bala Natarajan, Sr. Director of Engineering @ PayPal" %}} +Since our NoSQL and DB proxy used quite a bit of system details in a multi-threaded mode, the code got complex managing the different conditions, given that Go provides channels and routines to deal with complexity, we were able to structure the code to meet our requirements. +{{% /pullquote %}} After the success of this newly re-written NoSQL system, more platform and content teams within PayPal began adopting Go. Natarajan’s current team is responsible for PayPal’s build, test, and release pipelines—all built in Go. The company has a large build farm which is completely managed using Go infrastructure and supports builds-as-a-service for developers across the company. - -### Modernizing PayPal Systems With Go - -{{% gopher gopher=machine size="XLarge" %}} +## Modernizing PayPal Systems With Go With the distributed computing required by PayPal, Go was the right language to refresh their systems. PayPal needed programming that is concurrent and parallel, compiled for high performance and highly portable, and that brings developers the benefits of a modular, composable open-source architecture—Go has delivered all that and more to help PayPal modernize its systems. Security and supportability are key matters at PayPal, and the company’s operational pipelines are increasingly dominated by Go because the language’s cleanliness and modularity help them achieve these goals. PayPal’s deployment of Go engenders a platform of creativity for developers, allowing them to produce simple, efficient, and reliable software at scale for PayPal’s worldwide markets. -As PayPal continues to modernize their software-defined networking (SDN) infrastructure with Go, they are seeing performance benefits in addition to more maintainable code. For example, Go now powers routers, load balances, and an increasing number of production systems. **“In our tightly managed environments where we run Go code,”** says Natarajan, **“We have seen a CPU reduction of approximately 10% with cleaner and maintainable code.”** +As PayPal continues to modernize their software-defined networking (SDN) infrastructure with Go, they are seeing performance benefits in addition to more maintainable code. For example, Go now powers routers, load balances, and an increasing number of production systems. + +{{% pullquote author="Bala Natarajan, Sr. Director of Engineering @ PayPal" %}} + In our tightly managed environments where we run Go code, we have seen a CPU reduction of approximately 10% with cleaner and maintainable code. + {{% /pullquote %}} -### **Go Increases Developer Productivity** +## Go Increases Developer Productivity As a global operation, PayPal needs its development teams to be effective at managing two kinds of scale: production scale, especially concurrent systems interacting with many other servers (such as cloud services); and development scale, especially large codebases developed by many programmers in coordination (such as open-source development). -{{% pullquote %}} -[Paypal's] developers benefit from Go’s ability to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language -{{% /pullquote %}} - +{{% gopher gopher=machine size="XLarge" %}} PayPal leverages Go to address these issues of scale. The company’s developers benefit from Go’s ability to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. As PayPal modernizes its system, support for networked and multicore computing is critical. Go not only delivers such support but delivers quickly—it takes at most a few seconds to compile a large executable on a single computer. There are currently over 100 Go developers at PayPal, and future developers who choose to adopt Go will have an easier time getting the language approved thanks to the many successful implementations already in production at the company. Most importantly, PayPal developers have increased their productivity with Go. Go’s concurrency mechanisms have made it easy to write programs that get the most out of PayPal’s multicore and networked machines. Developers using Go also benefit from the fact that it compiles quickly to machine code, and their apps gain the convenience of garbage collection and the power of run-time reflection. - -## **Speeding PayPal's Time To Market** +## Speeding PayPal's Time To Market The first-class languages at PayPal today are Java and Node, with Go primarily used as an infrastructure language. While Go may never replace Node.js for certain applications, Natarajan is pushing to make Go a first-class language at PayPal. {{% gopher align=right gopher=headlamp size="XLarge" %}} Through his efforts, PayPal is also evaluating moving to the Google Kubernetes Engine (GKE) to speed their new products’ time-to-market. The GKE is a managed, production-ready environment for deploying containerized applications, and brings Google's latest innovations in developer productivity, automated operations, and open source flexibility. -For PayPal, deploying the GKE would enable rapid development and iteration by making it easier for PayPal to deploy, update, and manage its applications and services. Plus PayPal will find it easier to run Machine Learning, General Purpose GPU, High-Performance Computing, and other workloads that benefit from specialized hardware accelerators supported by the GKE. +For PayPal, deploying to GKE would enable rapid development and iteration by making it easier for PayPal to deploy, update, and manage its applications and services. Plus PayPal will find it easier to run Machine Learning, General Purpose GPU, High-Performance Computing, and other workloads that benefit from specialized hardware accelerators supported by the GKE. Most importantly for PayPal, the combination of Go development and the GKE allows the company to scale effortless to meet demand, as Kubernetes autoscaling will allow PayPal to handle increased user demand for services—keeping them available when it matters most, then scale back in the quiet periods to save money. -## **Getting Your Enterprise Started With Go** +## Getting Your Enterprise Started With Go PayPal’s story is not unique; dozens of other large enterprises are discovering how Go can help them ship reliable software faster. There are approximately two million developers using Go worldwide, spanning banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as Dropbox, New York Times, Salesforce, Target, Capital One, Monzo, Twitch, IBM, Square, Uber, and of course Google. -To learn more about how Go can help your enterprise build reliable, scalable software as it does at PayPal,visit go.dev today. - +To learn more about how Go can help your enterprise build reliable, scalable software as it does at PayPal,visit [Go.dev](https://go.dev) today. \ No newline at end of file -- cgit v1.3 From c3a96a7097563ec23bd06be245eddbb4fc86c087 Mon Sep 17 00:00:00 2001 From: Matt Pearring Date: Wed, 30 Oct 2019 16:06:53 -0700 Subject: [x/go.dev] adding capital one mention updating use case descriptions adding netflix mention adding salesforce mention adding twitch mention adding twitter mention adding uber mention updating solutions page subheader X-GoDev-Commit: 9292965133ceab5529d3099cc14f31dbd28d8712 --- go.dev/content/solutions/capital one/index.md | 12 ++++ go.dev/content/solutions/capital one/logo.svg | 2 + go.dev/content/solutions/cloud/index.md | 2 +- go.dev/content/solutions/devops/index.md | 2 +- go.dev/content/solutions/netflix/index.md | 12 ++++ go.dev/content/solutions/netflix/logo.svg | 1 + go.dev/content/solutions/salesforce/index.md | 12 ++++ go.dev/content/solutions/salesforce/logo.svg | 16 +++++ go.dev/content/solutions/twitch/index.md | 12 ++++ go.dev/content/solutions/twitch/logo.svg | 82 ++++++++++++++++++++++ go.dev/content/solutions/twitter/index.md | 12 ++++ go.dev/content/solutions/twitter/logo.svg | 1 + go.dev/content/solutions/uber/index.md | 12 ++++ go.dev/content/solutions/uber/logo.svg | 39 ++++++++++ .../themes/default/layouts/solutions/section.html | 4 +- 15 files changed, 217 insertions(+), 4 deletions(-) create mode 100644 go.dev/content/solutions/capital one/index.md create mode 100644 go.dev/content/solutions/capital one/logo.svg create mode 100644 go.dev/content/solutions/netflix/index.md create mode 100644 go.dev/content/solutions/netflix/logo.svg create mode 100644 go.dev/content/solutions/salesforce/index.md create mode 100755 go.dev/content/solutions/salesforce/logo.svg create mode 100644 go.dev/content/solutions/twitch/index.md create mode 100644 go.dev/content/solutions/twitch/logo.svg create mode 100644 go.dev/content/solutions/twitter/index.md create mode 100755 go.dev/content/solutions/twitter/logo.svg create mode 100644 go.dev/content/solutions/uber/index.md create mode 100644 go.dev/content/solutions/uber/logo.svg diff --git a/go.dev/content/solutions/capital one/index.md b/go.dev/content/solutions/capital one/index.md new file mode 100644 index 00000000..4c97e63a --- /dev/null +++ b/go.dev/content/solutions/capital one/index.md @@ -0,0 +1,12 @@ +--- +title: "Capital One - A Serverless and Go Journey" +description: "At the time, no single team member knew Go, but within a month, everyone was writing in Go and we were building out the endpoints. It was the flexibility, how easy it was to use, and the really cool concept behind Go (how Go handles native concurrency, garbage collection, and of course safety+speed.) that helped engage us during the build. Also, who can beat that cute mascot!" +date: 2018-11-21 +series: Case Studies +link: https://medium.com/capital-one-tech/a-serverless-and-go-journey-credit-offers-api-74ef1f9fde7f +resources: +- name: logo + src: logo.svg + params: + alt: Capital One +--- diff --git a/go.dev/content/solutions/capital one/logo.svg b/go.dev/content/solutions/capital one/logo.svg new file mode 100644 index 00000000..5c3fdda2 --- /dev/null +++ b/go.dev/content/solutions/capital one/logo.svg @@ -0,0 +1,2 @@ + +image/svg+xml diff --git a/go.dev/content/solutions/cloud/index.md b/go.dev/content/solutions/cloud/index.md index 2b586531..e5e4cb30 100644 --- a/go.dev/content/solutions/cloud/index.md +++ b/go.dev/content/solutions/cloud/index.md @@ -1,6 +1,6 @@ --- title: "Go for Cloud Computing" -description: "Go Helps Enterprises Build and Scale Cloud Computing Systems" +description: "Go was created to address concurrency needs seen across large systems and in cloud development. With a strong ecosystem of tools supporting service development, Go APIs on major cloud providers, and a variety of popular open source libraries it is easier than ever to build services with Go." date: 2019-10-04T15:26:31-04:00 series: Use Cases resources: diff --git a/go.dev/content/solutions/devops/index.md b/go.dev/content/solutions/devops/index.md index 6d2bbd00..17b33c52 100644 --- a/go.dev/content/solutions/devops/index.md +++ b/go.dev/content/solutions/devops/index.md @@ -1,7 +1,7 @@ --- title: "Go for Development Operations & Site Reliability Engineering (SRE)" linkTitle: "DevOps & Site Reliability" -description: "Go Helps Enterprises Automate and Scale for CI/CD" +description: "With fast build times and lean syntax, Go is built to support both DevOps and SRE. From Go’s extensive standard library, to its automatic formatter (gofmt) and automatic document generator (godoc), Go provides a wide range of tools to support software and systems of any scope." date: 2019-10-03T17:16:43-04:00 series: Use Cases resources: diff --git a/go.dev/content/solutions/netflix/index.md b/go.dev/content/solutions/netflix/index.md new file mode 100644 index 00000000..033bd2b8 --- /dev/null +++ b/go.dev/content/solutions/netflix/index.md @@ -0,0 +1,12 @@ +--- +title: "Uber - GPU-power analytics engine in Go" +description: "The decision to use Go was deliberate, because we needed something that had lower latency than Java (where garbage collection pauses are an issue) and is more productive for developers than C, while also handling tens of thousands of client connections. Go fits this space well." +date: 2016-05-26 +series: Case Studies +link: https://medium.com/netflix-techblog/application-data-caching-using-ssds-5bf25df851ef +resources: +- name: logo + src: logo.svg + params: + alt: Netflix +--- diff --git a/go.dev/content/solutions/netflix/logo.svg b/go.dev/content/solutions/netflix/logo.svg new file mode 100644 index 00000000..0ce1bf48 --- /dev/null +++ b/go.dev/content/solutions/netflix/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/content/solutions/salesforce/index.md b/go.dev/content/solutions/salesforce/index.md new file mode 100644 index 00000000..ff1909f2 --- /dev/null +++ b/go.dev/content/solutions/salesforce/index.md @@ -0,0 +1,12 @@ +--- +title: "Salesforce - From Python/C to Go" +description: "One of the big advantages is that Go's cross-platform features make porting code easy." +date: 2019-10-08 +series: Case Studies +link: https://www.zdnet.com/article/salesforce-why-we-ditched-python-for-googles-go-language-in-einstein-analytics/ +resources: +- name: logo + src: logo.svg + params: + alt: Salesforce +--- diff --git a/go.dev/content/solutions/salesforce/logo.svg b/go.dev/content/solutions/salesforce/logo.svg new file mode 100755 index 00000000..e82db677 --- /dev/null +++ b/go.dev/content/solutions/salesforce/logo.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/content/solutions/twitch/index.md b/go.dev/content/solutions/twitch/index.md new file mode 100644 index 00000000..06e677a4 --- /dev/null +++ b/go.dev/content/solutions/twitch/index.md @@ -0,0 +1,12 @@ +--- +title: "Twitch - Go’s march to low latency GC" +description: "We use Go at Twitch for many of our busiest systems. Its simplicity, safety, performance, and readability make it a good tool for the problems we encounter with serving live video and chat to our millions of users." +date: 2016-07-05 +series: Case Studies +link: https://blog.twitch.tv/en/2016/07/05/gos-march-to-low-latency-gc-a6fa96f06eb7/ +resources: +- name: logo + src: logo.svg + params: + alt: Twitch +--- diff --git a/go.dev/content/solutions/twitch/logo.svg b/go.dev/content/solutions/twitch/logo.svg new file mode 100644 index 00000000..1afe41c1 --- /dev/null +++ b/go.dev/content/solutions/twitch/logo.svg @@ -0,0 +1,82 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/go.dev/content/solutions/twitter/index.md b/go.dev/content/solutions/twitter/index.md new file mode 100644 index 00000000..1dbbdf75 --- /dev/null +++ b/go.dev/content/solutions/twitter/index.md @@ -0,0 +1,12 @@ +--- +title: "Twitter - 5 billion sessions a day in realtime" +description: "" +date: 2015-02-17 +series: Case Studies +link: https://blog.twitter.com/engineering/en_us/a/2015/handling-five-billion-sessions-a-day-in-real-time.html +resources: +- name: logo + src: logo.svg + params: + alt: Twitter +--- diff --git a/go.dev/content/solutions/twitter/logo.svg b/go.dev/content/solutions/twitter/logo.svg new file mode 100755 index 00000000..2832e7b5 --- /dev/null +++ b/go.dev/content/solutions/twitter/logo.svg @@ -0,0 +1 @@ +Twitter_Logo_Blue \ No newline at end of file diff --git a/go.dev/content/solutions/uber/index.md b/go.dev/content/solutions/uber/index.md new file mode 100644 index 00000000..25b6afe6 --- /dev/null +++ b/go.dev/content/solutions/uber/index.md @@ -0,0 +1,12 @@ +--- +title: "Uber - GPU-power analytics engine in Go" +description: "AresDB [,written in Go,] is widely used at Uber to power our real-time data analytics dashboards, enabling us to make data-driven decisions at scale about myriad aspects of our business." +date: 2015-02-17 +series: Case Studies +link: https://eng.uber.com/aresdb/ +resources: +- name: logo + src: logo.svg + params: + alt: Uber +--- diff --git a/go.dev/content/solutions/uber/logo.svg b/go.dev/content/solutions/uber/logo.svg new file mode 100644 index 00000000..bc0bd54d --- /dev/null +++ b/go.dev/content/solutions/uber/logo.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + diff --git a/go.dev/themes/default/layouts/solutions/section.html b/go.dev/themes/default/layouts/solutions/section.html index a4f85cad..29697dd8 100644 --- a/go.dev/themes/default/layouts/solutions/section.html +++ b/go.dev/themes/default/layouts/solutions/section.html @@ -7,7 +7,7 @@

    - Learn about how Go can help your development process + Use Go to improve your development process

    @@ -46,7 +46,7 @@
    -

    Who Uses Go

    +

    Companies Using Go

      {{range where .Pages "Params.series" "Case Studies"}} -- cgit v1.3 From c999da620d5ac2b7356f72ccee28c2f3128e9ea6 Mon Sep 17 00:00:00 2001 From: Matt Pearring Date: Wed, 30 Oct 2019 16:55:45 -0700 Subject: [x/go.dev] added Square mention added Dropbox mention updated home page value prop X-GoDev-Commit: d7188d78a2c4598e7d3a9427c4536f9f07e27d8b --- go.dev/content/solutions/dropbox/index.md | 12 ++ go.dev/content/solutions/dropbox/logo.svg | 45 ++++++++ go.dev/content/solutions/square/index.md | 12 ++ go.dev/content/solutions/square/logo.svg | 179 ++++++++++++++++++++++++++++++ go.dev/themes/default/layouts/index.html | 6 +- 5 files changed, 251 insertions(+), 3 deletions(-) create mode 100644 go.dev/content/solutions/dropbox/index.md create mode 100644 go.dev/content/solutions/dropbox/logo.svg create mode 100644 go.dev/content/solutions/square/index.md create mode 100644 go.dev/content/solutions/square/logo.svg diff --git a/go.dev/content/solutions/dropbox/index.md b/go.dev/content/solutions/dropbox/index.md new file mode 100644 index 00000000..c9a3640b --- /dev/null +++ b/go.dev/content/solutions/dropbox/index.md @@ -0,0 +1,12 @@ +--- +title: "Dropbox - Open sourcing our Go libraries" +description: "" +date: 2014-07-01 +series: Case Studies +link: https://blogs.dropbox.com/tech/2014/07/open-sourcing-our-go-libraries/ +resources: +- name: logo + src: logo.svg + params: + alt: Dropbox +--- diff --git a/go.dev/content/solutions/dropbox/logo.svg b/go.dev/content/solutions/dropbox/logo.svg new file mode 100644 index 00000000..206f1060 --- /dev/null +++ b/go.dev/content/solutions/dropbox/logo.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + diff --git a/go.dev/content/solutions/square/index.md b/go.dev/content/solutions/square/index.md new file mode 100644 index 00000000..0c7f65b1 --- /dev/null +++ b/go.dev/content/solutions/square/index.md @@ -0,0 +1,12 @@ +--- +title: "Square - The Tale of a Go Resource Leak" +description: "" +date: 2017-07-11 +series: Case Studies +link: https://developer.squareup.com/blog/always-be-closing/ +resources: +- name: logo + src: logo.svg + params: + alt: Square +--- diff --git a/go.dev/content/solutions/square/logo.svg b/go.dev/content/solutions/square/logo.svg new file mode 100644 index 00000000..e1cbad8d --- /dev/null +++ b/go.dev/content/solutions/square/logo.svg @@ -0,0 +1,179 @@ + + + + + + Square, Inc. logo + + + + + + + + + image/svg+xml + + Square, Inc. logo + http://www.brandsoftheworld.com + Original version converted from Adobe Illustrator file obtained at Brands of the World to SVG using Inkscape. Revised 2016 version used proprietary SQMarket TrueType font, obtained from GitHub repository at https://github.com/square/square.github.io/tree/master/fonts, with kerning and weight tweaks applied to match the appearance of sample logo posted by Square, Inc. at their Web site. + + + Square, Inc. + + + + + Square, Inc. + + + 2017-06-15 + + + Hydrargyrum for Wikimedia Foundation + + + + + + + + + + + + + + + + + + + + diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index 7ae2de74..6a07ceb4 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -2,13 +2,13 @@
      -

      Build and scale faster

      +

      Build fast, reliable, and


      efficient software at scale

      - Go is an open source programming language designed to build fast, reliable, and efficient software at scale. + Go is an open source programming language supported by Google.

      -- cgit v1.3 From b72f71637b70817ae3603e5764a36fb258fc4fbf Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Thu, 31 Oct 2019 11:08:49 -0400 Subject: [x/go.dev] reorganizing gophers Change-Id: Id4634cc241ccddc63866851b8062fc6adb9d9fde X-GoDev-Commit: 2951ed59e96d81fbb8b13a255af830da630f2bdb --- go.dev/layouts/shortcodes/gopher.html | 24 +- go.dev/themes/default/layouts/index.html | 2 +- .../default/static/images/gopher-biplane.png | Bin 317369 -> 0 bytes .../default/static/images/gopher-graduate-blue.svg | 40 --- .../default/static/images/gopher-graduate.svg | 36 --- .../default/static/images/gopher-headlamp-blue.svg | 73 ----- .../default/static/images/gopher-headlamp.svg | 73 ----- .../themes/default/static/images/gopher-ladder.svg | 91 ------ .../default/static/images/gopher-machine-c.svg | 311 --------------------- .../default/static/images/gopher-machine.svg | 311 --------------------- .../default/static/images/gopher-pilot-tan.svg | 12 - .../default/static/images/gopher-tux-blue.svg | 6 - .../default/static/images/gopher-wrench-c.svg | 125 --------- .../themes/default/static/images/gopher-wrench.svg | 118 -------- .../default/static/images/gophers/biplane.png | Bin 0 -> 317369 bytes .../static/images/gophers/graduate-blue.svg | 40 +++ .../default/static/images/gophers/graduate.svg | 36 +++ .../static/images/gophers/headlamp-blue.svg | 73 +++++ .../default/static/images/gophers/headlamp.svg | 73 +++++ .../default/static/images/gophers/ladder.svg | 91 ++++++ .../default/static/images/gophers/machine-c.svg | 311 +++++++++++++++++++++ .../default/static/images/gophers/machine.svg | 311 +++++++++++++++++++++ .../default/static/images/gophers/pilot-tan.svg | 12 + .../default/static/images/gophers/tux-blue.svg | 6 + .../default/static/images/gophers/wrench-c.svg | 125 +++++++++ .../default/static/images/gophers/wrench.svg | 118 ++++++++ 26 files changed, 1209 insertions(+), 1209 deletions(-) delete mode 100644 go.dev/themes/default/static/images/gopher-biplane.png delete mode 100644 go.dev/themes/default/static/images/gopher-graduate-blue.svg delete mode 100644 go.dev/themes/default/static/images/gopher-graduate.svg delete mode 100644 go.dev/themes/default/static/images/gopher-headlamp-blue.svg delete mode 100644 go.dev/themes/default/static/images/gopher-headlamp.svg delete mode 100644 go.dev/themes/default/static/images/gopher-ladder.svg delete mode 100644 go.dev/themes/default/static/images/gopher-machine-c.svg delete mode 100644 go.dev/themes/default/static/images/gopher-machine.svg delete mode 100644 go.dev/themes/default/static/images/gopher-pilot-tan.svg delete mode 100644 go.dev/themes/default/static/images/gopher-tux-blue.svg delete mode 100644 go.dev/themes/default/static/images/gopher-wrench-c.svg delete mode 100644 go.dev/themes/default/static/images/gopher-wrench.svg create mode 100644 go.dev/themes/default/static/images/gophers/biplane.png create mode 100644 go.dev/themes/default/static/images/gophers/graduate-blue.svg create mode 100644 go.dev/themes/default/static/images/gophers/graduate.svg create mode 100644 go.dev/themes/default/static/images/gophers/headlamp-blue.svg create mode 100644 go.dev/themes/default/static/images/gophers/headlamp.svg create mode 100644 go.dev/themes/default/static/images/gophers/ladder.svg create mode 100644 go.dev/themes/default/static/images/gophers/machine-c.svg create mode 100644 go.dev/themes/default/static/images/gophers/machine.svg create mode 100644 go.dev/themes/default/static/images/gophers/pilot-tan.svg create mode 100644 go.dev/themes/default/static/images/gophers/tux-blue.svg create mode 100644 go.dev/themes/default/static/images/gophers/wrench-c.svg create mode 100644 go.dev/themes/default/static/images/gophers/wrench.svg diff --git a/go.dev/layouts/shortcodes/gopher.html b/go.dev/layouts/shortcodes/gopher.html index 8660efb1..7b1ec7c0 100644 --- a/go.dev/layouts/shortcodes/gopher.html +++ b/go.dev/layouts/shortcodes/gopher.html @@ -1,4 +1,4 @@ -{{ $src := "/images/gopher-wrench.svg"}} +{{ $src := "/images/gophers/wrench.svg"}} {{ $alt := "gopher with wrench"}} {{ $size := "Large"}} {{ $align := "Left"}} @@ -14,47 +14,47 @@ {{end}} {{if eq $gopher "tux"}} - {{$src = "/images/gopher-tux-blue.svg"}} + {{$src = "/images/gophers/tux-blue.svg"}} {{$alt = "gopher in a tux"}} {{end}} {{if eq $gopher "plane"}} - {{$src = "/images/gopher-biplane.svg"}} + {{$src = "/images/gophers/biplane.png"}} {{$alt = "gopher in a plane"}} {{end}} {{if eq $gopher "graduate"}} - {{$src = "/images/gopher-graduate.svg"}} + {{$src = "/images/gophers/graduate.svg"}} {{$alt = "gopher graduating"}} {{end}} {{if eq $gopher "graduate-blue"}} - {{$src = "/images/gopher-graduate-blue.svg"}} + {{$src = "/images/gophers/graduate-blue.svg"}} {{$alt = "gopher graduating"}} {{end}} {{if eq $gopher "headlamp"}} - {{$src = "/images/gopher-headlamp.svg"}} + {{$src = "/images/gophers/headlamp.svg"}} {{$alt = "gopher with headlamp"}} {{end}} {{if eq $gopher "headlamp-blue"}} - {{$src = "/images/gopher-headlamp-blue.svg"}} + {{$src = "/images/gophers/headlamp-blue.svg"}} {{$alt = "gopher with headlamp"}} {{end}} {{if eq $gopher "ladder"}} - {{$src = "/images/gopher-ladder.svg"}} + {{$src = "/images/gophers/ladder.svg"}} {{$alt = "gopher with ladder"}} {{end}} {{if eq $gopher "machine"}} - {{$src = "/images/gopher-machine.svg"}} + {{$src = "/images/gophers/machine.svg"}} {{$alt = "gophers with a machine"}} {{end}} {{if eq $gopher "machine-c"}} - {{$src = "/images/gopher-machine-c.svg"}} + {{$src = "/images/gophers/machine-c.svg"}} {{$alt = "gopher with a machine"}} {{end}} {{if eq $gopher "pilot"}} - {{$src = "/images/gopher-pilot.svg"}} + {{$src = "/images/gophers/pilot-tan.svg"}} {{$alt = "gopher pilot"}} {{end}} {{if eq $gopher "wrench-c"}} - {{$src = "/images/gopher-wrench-c.svg"}} + {{$src = "/images/gophers/wrench-c.svg"}} {{$alt = "gopher with a wrench"}} {{end}} diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index 7ae2de74..10897b45 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -12,7 +12,7 @@ Download Go
      - Go Gopher climbing a ladder. + Go Gopher climbing a ladder.
      diff --git a/go.dev/themes/default/static/images/gopher-biplane.png b/go.dev/themes/default/static/images/gopher-biplane.png deleted file mode 100644 index a561a82f..00000000 Binary files a/go.dev/themes/default/static/images/gopher-biplane.png and /dev/null differ diff --git a/go.dev/themes/default/static/images/gopher-graduate-blue.svg b/go.dev/themes/default/static/images/gopher-graduate-blue.svg deleted file mode 100644 index f7067fb9..00000000 --- a/go.dev/themes/default/static/images/gopher-graduate-blue.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gopher-graduate.svg b/go.dev/themes/default/static/images/gopher-graduate.svg deleted file mode 100644 index 7f59cad4..00000000 --- a/go.dev/themes/default/static/images/gopher-graduate.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gopher-headlamp-blue.svg b/go.dev/themes/default/static/images/gopher-headlamp-blue.svg deleted file mode 100644 index afdc1f9e..00000000 --- a/go.dev/themes/default/static/images/gopher-headlamp-blue.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gopher-headlamp.svg b/go.dev/themes/default/static/images/gopher-headlamp.svg deleted file mode 100644 index 39597855..00000000 --- a/go.dev/themes/default/static/images/gopher-headlamp.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gopher-ladder.svg b/go.dev/themes/default/static/images/gopher-ladder.svg deleted file mode 100644 index 9eeaa37d..00000000 --- a/go.dev/themes/default/static/images/gopher-ladder.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - Group 12 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gopher-machine-c.svg b/go.dev/themes/default/static/images/gopher-machine-c.svg deleted file mode 100644 index 1e92d5ae..00000000 --- a/go.dev/themes/default/static/images/gopher-machine-c.svg +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gopher-machine.svg b/go.dev/themes/default/static/images/gopher-machine.svg deleted file mode 100644 index 58460cd1..00000000 --- a/go.dev/themes/default/static/images/gopher-machine.svg +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gopher-pilot-tan.svg b/go.dev/themes/default/static/images/gopher-pilot-tan.svg deleted file mode 100644 index fc15159f..00000000 --- a/go.dev/themes/default/static/images/gopher-pilot-tan.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gopher-tux-blue.svg b/go.dev/themes/default/static/images/gopher-tux-blue.svg deleted file mode 100644 index e8e03540..00000000 --- a/go.dev/themes/default/static/images/gopher-tux-blue.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gopher-wrench-c.svg b/go.dev/themes/default/static/images/gopher-wrench-c.svg deleted file mode 100644 index 902be15c..00000000 --- a/go.dev/themes/default/static/images/gopher-wrench-c.svg +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gopher-wrench.svg b/go.dev/themes/default/static/images/gopher-wrench.svg deleted file mode 100644 index 43aaae11..00000000 --- a/go.dev/themes/default/static/images/gopher-wrench.svg +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/biplane.png b/go.dev/themes/default/static/images/gophers/biplane.png new file mode 100644 index 00000000..a561a82f Binary files /dev/null and b/go.dev/themes/default/static/images/gophers/biplane.png differ diff --git a/go.dev/themes/default/static/images/gophers/graduate-blue.svg b/go.dev/themes/default/static/images/gophers/graduate-blue.svg new file mode 100644 index 00000000..f7067fb9 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/graduate-blue.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/graduate.svg b/go.dev/themes/default/static/images/gophers/graduate.svg new file mode 100644 index 00000000..7f59cad4 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/graduate.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/headlamp-blue.svg b/go.dev/themes/default/static/images/gophers/headlamp-blue.svg new file mode 100644 index 00000000..afdc1f9e --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/headlamp-blue.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/headlamp.svg b/go.dev/themes/default/static/images/gophers/headlamp.svg new file mode 100644 index 00000000..39597855 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/headlamp.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/ladder.svg b/go.dev/themes/default/static/images/gophers/ladder.svg new file mode 100644 index 00000000..9eeaa37d --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/ladder.svg @@ -0,0 +1,91 @@ + + + + Group 12 + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/machine-c.svg b/go.dev/themes/default/static/images/gophers/machine-c.svg new file mode 100644 index 00000000..1e92d5ae --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/machine-c.svg @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/machine.svg b/go.dev/themes/default/static/images/gophers/machine.svg new file mode 100644 index 00000000..58460cd1 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/machine.svg @@ -0,0 +1,311 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/pilot-tan.svg b/go.dev/themes/default/static/images/gophers/pilot-tan.svg new file mode 100644 index 00000000..fc15159f --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/pilot-tan.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/tux-blue.svg b/go.dev/themes/default/static/images/gophers/tux-blue.svg new file mode 100644 index 00000000..e8e03540 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/tux-blue.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/wrench-c.svg b/go.dev/themes/default/static/images/gophers/wrench-c.svg new file mode 100644 index 00000000..902be15c --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/wrench-c.svg @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/wrench.svg b/go.dev/themes/default/static/images/gophers/wrench.svg new file mode 100644 index 00000000..43aaae11 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/wrench.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.3 From 4097f3cacc9a574abf865d9bb2b41b8dbf2103bc Mon Sep 17 00:00:00 2001 From: Matt Pearring Date: Thu, 31 Oct 2019 08:36:16 -0700 Subject: [x/go.dev] updating Cloud use case X-GoDev-Commit: 739252a27bf582da1cd0dbdeb301ba1cadb0b480 --- go.dev/content/solutions/cloud/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/go.dev/content/solutions/cloud/index.md b/go.dev/content/solutions/cloud/index.md index e5e4cb30..a6e17cad 100644 --- a/go.dev/content/solutions/cloud/index.md +++ b/go.dev/content/solutions/cloud/index.md @@ -1,5 +1,6 @@ --- -title: "Go for Cloud Computing" +title: "Go for Cloud & Network Services" +linkTitle: "Cloud & Network Services" description: "Go was created to address concurrency needs seen across large systems and in cloud development. With a strong ecosystem of tools supporting service development, Go APIs on major cloud providers, and a variety of popular open source libraries it is easier than ever to build services with Go." date: 2019-10-04T15:26:31-04:00 series: Use Cases -- cgit v1.3 From 9e9cbc5bd040b0510a79e627050ce9e04fe66654 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Thu, 31 Oct 2019 12:07:34 -0400 Subject: [x/go.dev] fixing plane reference on homepage Change-Id: I05c480f7b8164a95b72ce431d191cf10c36cfdc0 X-GoDev-Commit: 92cc3039eaaa57f6f88f2638e2e368e2f2451bdd --- go.dev/content/solutions/mercadolibre/index.md | 1 + go.dev/themes/default/layouts/index.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/go.dev/content/solutions/mercadolibre/index.md b/go.dev/content/solutions/mercadolibre/index.md index 89cc6730..a6a63b21 100644 --- a/go.dev/content/solutions/mercadolibre/index.md +++ b/go.dev/content/solutions/mercadolibre/index.md @@ -136,6 +136,7 @@ only knew about programming from recent courses at university. Similarly, Mercad proficient with other programming languages (such as Java or .NET or Ruby) learn Go fast enough start writing production services in just a few weeks. +{{% gopher gopher=plane align=right %}} With Go, MercadoLibre’s **build times are three times (3x) faster** and their **test suite runs an amazing 24 times faster**. This means the company’s developers can make a change, then build and test that change much faster than they could before. diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index 7a151fc4..7cf65298 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -114,7 +114,7 @@
    - Go Gopher piloting a biplane. + Go Gopher piloting a biplane.
    -- cgit v1.3 From 146c50d56c053dc87a4489f50175740526d00cb5 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Thu, 31 Oct 2019 14:29:33 -0400 Subject: [x/go.dev] add quotes to homepage Change-Id: I3c9fa2157ddf9caf62af1487a34d8e44a4415c2f X-GoDev-Commit: 57a1a21695535bdec84c0b15c9ff2ee449d4f8ac --- go.dev/themes/default/layouts/index.html | 42 +++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index 7cf65298..71efa2c3 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -81,11 +81,19 @@ Star.
    -

    Scalability

    +

    Easy to Learn

    - With built-in support for concurrency, an automated formatter, and a broad set of idiomatic APIs and - libraries supported by major cloud providers, Go is the best choice to build fast, efficient, and reliable services as infrastructure grows. + “At the time, no single team member knew Go, but within a month, everyone was writing in Go and we were building out the + endpoints. It was the flexibility, how easy it was to use, and the really cool concept behind Go (how Go handles native + concurrency, garbage collection, and of course safety+speed.) that helped engage us during the build. Also, who can beat + that cute mascot!”

    +

    + - Jaime Enrique Garcia Lopez, Senior Software Development Manager at CapitalOne +

    +
  • @@ -93,10 +101,18 @@ Star.
  • -

    Microservices

    +

    Ideal for Scale & Microservices

    - With fast build times, a single static binary and open-source frameworks like Go Micro, Go Kit, - and Gizmo, Go makes it easy to build flexible, high-performance microservices at scale. + “Go has excellent characteristics for scalability and services written using it typically have very + small memory footprints. Because code is compiled into a single static binary, services can also be + containerised with ease, making it much simpler to build and deploy. These attributes make Go an ideal + choice for companies building microservices, as you can easily deploy into a highly available and scalable + environment such as Kubernetes.” +

    +

    + - Matt Boyle, lead software engineer at Curve

    @@ -105,10 +121,18 @@ Star.
    -

    Efficiency

    +

    Efficient

    - With an easy to use and performant out-of-the-box http server, small memory footprints, and - low CPU utilization, Go helps you reduce deployment costs and deliver rapid load times. + A small language that compiles fast makes for a happy developer. The Go language is small, compiles really fast, and as + a result it lets your mind focus on the actual problem and less on the tool you are using to solve it. Code, test, debug + cycles are so quick that you forget you are not working with an interpreted language. Looking at our code, you see less + boilerplate and more business logic. Type marshalling, concurrency, and defer style control flow keeps the code clean + and compact. +

    +

    + - Clayton Coleman, lead engineer, Open Shift at RedHat

    -- cgit v1.3 From bb706dad277aa77c8c822a83d1b799a7a65302c7 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 31 Oct 2019 15:56:53 -0400 Subject: [x/go.dev] all: bump Hugo to 0.59.1 There was an issue with shortcode parameters in 0.58.1 that has been resolved. Fixes the site. Change-Id: Ia646ac6aa40a2864dead0309b40daebd016ddc97 X-GoDev-Commit: 93a8df6cc2c614dfed2c33ba85efb2227554ab85 --- go.dev/Dockerfile.hugo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.dev/Dockerfile.hugo b/go.dev/Dockerfile.hugo index 52034e68..c7adb5e8 100644 --- a/go.dev/Dockerfile.hugo +++ b/go.dev/Dockerfile.hugo @@ -4,7 +4,7 @@ RUN apt-get update && apt-get install --quiet -y --no-install-recommends \ wget \ ca-certificates \ && rm -rf /var/lib/apt/lists/* -ENV HUGO_VERSION=0.58.1 +ENV HUGO_VERSION=0.59.1 RUN wget -nv --show-progress --progress=bar:force:noscroll https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz RUN tar -xzvf hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -- cgit v1.3 From 367947523fdc111227f2971cca78e087ae0b906d Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 31 Oct 2019 17:15:28 -0400 Subject: [x/go.dev] home: fix Hero title layout The brs collided with line height to make a mess. Fixed things up quite a bit on different display sizes. Change-Id: Ie1faa87248225c5b7ba1f1a05598fd9130a78659 X-GoDev-Commit: f20f9e04a11656fa187ac3da42ae76a523444d14 --- go.dev/themes/default/assets/css/styles.css | 2 +- go.dev/themes/default/layouts/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index b121cd7b..ec65f74f 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -214,7 +214,7 @@ a:hover { } .Hero h1 { font-size: 2.625rem; - line-height: 1.125rem; + margin-top: 1rem; } .Hero h2 { font-size: 1.5rem; diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index 71efa2c3..e2775f9c 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -2,7 +2,7 @@
    -

    Build fast, reliable, and


    efficient software at scale

    +

    Build fast, reliable, and efficient software at scale

    Go is an open source programming language supported by Google.

    -- cgit v1.3 From b6bfc20d128393557103f2a195fe9b5fdf6d20a6 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 31 Oct 2019 17:17:35 -0400 Subject: [x/go.dev] home: shrink bottom margin of hero text Change-Id: I203d4eeeda3e04afbd33f0bd484c060e8e5cab9d X-GoDev-Commit: 5f3089466f93aea7ae49972c5ed01b59a51b10ee --- go.dev/themes/default/assets/css/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index ec65f74f..ef3cc2be 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -214,7 +214,7 @@ a:hover { } .Hero h1 { font-size: 2.625rem; - margin-top: 1rem; + margin: 1rem 0; } .Hero h2 { font-size: 1.5rem; -- cgit v1.3 From 7f0a15334f5454fd9788003c88ca279cd86fa7fc Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Wed, 30 Oct 2019 17:35:09 -0400 Subject: [x/go.dev] all: add mobile navigation menu This adds a mobile navigation menu across the site, with accompanying javascript. Navigation was duplicated for ease of implementation. Run prettier on js/css. Fixes b/142726781 Change-Id: I4d17e81db331fac41f21f4ab3d726b22abefce8e Reviewed-on: https://team-review.git.corp.google.com/c/golang/go.dev/+/588023 CI-Result: Cloud Build Reviewed-by: Andrew Bonventre X-GoDev-Commit: 0965fe204efc30bc68874d330d5762b18472f9b5 --- go.dev/.prettierrc.yaml | 1 + go.dev/static/images/close-24px.svg | 1 + go.dev/static/images/menu-24px-white.svg | 1 + go.dev/static/images/menu-24px.svg | 1 + go.dev/static/js/site.js | 41 ++++++++++ go.dev/themes/default/assets/css/styles.css | 91 ++++++++++++++++++++-- go.dev/themes/default/layouts/_default/baseof.html | 34 +++++++- 7 files changed, 161 insertions(+), 9 deletions(-) create mode 100644 go.dev/.prettierrc.yaml create mode 100644 go.dev/static/images/close-24px.svg create mode 100644 go.dev/static/images/menu-24px-white.svg create mode 100644 go.dev/static/images/menu-24px.svg create mode 100644 go.dev/static/js/site.js diff --git a/go.dev/.prettierrc.yaml b/go.dev/.prettierrc.yaml new file mode 100644 index 00000000..01769692 --- /dev/null +++ b/go.dev/.prettierrc.yaml @@ -0,0 +1 @@ +singleQuote: true diff --git a/go.dev/static/images/close-24px.svg b/go.dev/static/images/close-24px.svg new file mode 100644 index 00000000..dea86781 --- /dev/null +++ b/go.dev/static/images/close-24px.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/static/images/menu-24px-white.svg b/go.dev/static/images/menu-24px-white.svg new file mode 100644 index 00000000..b7e5807b --- /dev/null +++ b/go.dev/static/images/menu-24px-white.svg @@ -0,0 +1 @@ + diff --git a/go.dev/static/images/menu-24px.svg b/go.dev/static/images/menu-24px.svg new file mode 100644 index 00000000..14f99cd1 --- /dev/null +++ b/go.dev/static/images/menu-24px.svg @@ -0,0 +1 @@ + diff --git a/go.dev/static/js/site.js b/go.dev/static/js/site.js new file mode 100644 index 00000000..1cbde547 --- /dev/null +++ b/go.dev/static/js/site.js @@ -0,0 +1,41 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/** + * A bit of navigation related code for handling dismissible elements. + */ +(function() { + 'use strict'; + + function registerHeaderListeners() { + const header = document.querySelector('.js-header'); + const menuButtons = document.querySelectorAll('.js-headerMenuButton'); + menuButtons.forEach(button => { + button.addEventListener('click', e => { + e.preventDefault(); + header.classList.toggle('is-active'); + button.setAttribute( + 'aria-expanded', + header.classList.contains('is-active') + ); + }); + }); + + const scrim = document.querySelector('.js-scrim'); + scrim.addEventListener('click', e => { + e.preventDefault(); + header.classList.remove('is-active'); + menuButtons.forEach(button => { + button.setAttribute( + 'aria-expanded', + header.classList.contains('is-active') + ); + }); + }); + } + + window.addEventListener('DOMContentLoaded', () => { + registerHeaderListeners(); + }); +})(); diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index ef3cc2be..bc979e4f 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -48,12 +48,9 @@ a:hover { } .Header { border-bottom: 1px solid #e0e0e0; - padding: 0 1.5rem; } .Header-nav { - align-items: center; display: flex; - justify-content: space-between; } .Header--dark { border-bottom: none; @@ -75,8 +72,19 @@ a:hover { padding: 0; } @media only screen and (min-width: 57.7rem) { + .Header { + padding: 0 1.5rem; + } .Header-menuItem { display: inline-flex; + flex: none; + } + .Header-menu { + flex: 1; + justify-content: flex-end; + } + .Header-navOpen { + display: none; } } .Header-menuItem a:link, @@ -104,6 +112,73 @@ a:hover { border-bottom-color: #542c7d; color: #3e4042; } +.Header-navOpen { + height: 2rem; + margin: 1rem 1rem 1rem 1.5rem; + width: 2rem; +} +.NavigationDrawer { + background: #fff; + display: none; + height: 100%; + left: 0; + max-width: 27rem; + position: fixed; + right: auto; + top: 0; + width: 85%; + z-index: 10; +} +.NavigationDrawer.is-active { + display: initial; +} +.NavigationDrawer-header { + display: flex; + justify-content: space-between; +} +.NavigationDrawer-logo { + display: block; + height: 2rem; + margin: 1rem 1.5rem; + width: 5.125rem; +} +.NavigationDrawer-close { + display: block; + height: 2rem; + margin: 1rem 1rem; + width: 2rem; +} +.NavigationDrawer-list { + list-style: none; + margin: 0; + padding: 0; +} +.NavigationDrawer-listItem { + font-size: 1.5rem; +} +.NavigationDrawer-listItem a:link, +.NavigationDrawer-listItem a:visited { + display: block; + margin: 0 1rem; + padding: 1rem; +} +.NavigationDrawer-listItem--active { + background-color: #d5eef5; + border-radius: 0.4rem; +} +.NavigationDrawer-scrim { + display: none; + height: 100%; + left: 0; + position: fixed; + top: 0; + width: 100%; + z-index: 5; +} +.NavigationDrawer.is-active + .NavigationDrawer-scrim { + background-color: rgba(0, 0, 0, 0.32); + display: block; +} .Article { color: #202224; margin: 0 auto 30px; @@ -245,7 +320,7 @@ a:hover { padding: 1rem 0; text-align: center; text-decoration: underline; - margin: 0.5rem 0; + margin: 0.5rem 0; } .Hero-actions a.Primary { background-color: #fddd00; @@ -426,7 +501,7 @@ a:hover { display: flex; height: 1.5rem; justify-content: center; - margin-top: .125rem; + margin-top: 0.125rem; min-width: 1.5rem; text-align: center; } @@ -626,7 +701,7 @@ a.Footer-link { color: #fff; display: flex; flex: 1; - font-size: .875rem; + font-size: 0.875rem; line-height: 2rem; } .Learn-title, @@ -976,7 +1051,7 @@ a.Footer-link { color: #007d9c; } .Solutions-useCaseTitle { - margin: .75rem 0 0; + margin: 0.75rem 0 0; } .Solutions-useCaseHeader { align-items: center; @@ -1236,4 +1311,4 @@ a.Footer-link { .Left { float: left; margin-right: 1rem; -} \ No newline at end of file +} diff --git a/go.dev/themes/default/layouts/_default/baseof.html b/go.dev/themes/default/layouts/_default/baseof.html index 82cf85f8..6478fdb8 100644 --- a/go.dev/themes/default/layouts/_default/baseof.html +++ b/go.dev/themes/default/layouts/_default/baseof.html @@ -13,12 +13,16 @@ {{$stylesFP := $styles | fingerprint -}} {{end -}} + {{$.Site.Title}} + +
    {{- block "main" . -}}{{- end -}}
    @@ -68,4 +100,4 @@
    - \ No newline at end of file + -- cgit v1.3 From 39b807a6fa25c42971f63acdc4c53d48cbfd9f61 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 31 Oct 2019 17:53:55 -0400 Subject: [x/go.dev] all: add package search to header navigation Add a package search for pkg.go.dev to header navigation. For the home page, use a special treatment to fit in with blue background. Buttonify mobile controls for navigation. Minor tweaks to header on mobile, tablet and desktop header layouts. Fixes b/143715820 Change-Id: I54d5e87486b4e8a5ed80f075bc424b2db8de502f Reviewed-on: https://team-review.git.corp.google.com/c/golang/go.dev/+/589438 Reviewed-by: Andrew Bonventre X-GoDev-Commit: 1cee0c5a67b52b453874153f5b858fc896cb353d --- go.dev/themes/default/assets/css/styles.css | 91 ++++++++++++++++++---- go.dev/themes/default/layouts/_default/baseof.html | 24 ++++-- 2 files changed, 93 insertions(+), 22 deletions(-) diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index bc979e4f..0dc78658 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -33,6 +33,12 @@ a:hover { color: #fff; font-size: 14px; } +.Site-header { + border-bottom: 1px solid #e0e0e0; +} +.Site-header--blue { + border-bottom: none; +} .Header, .Footer, .Container { @@ -46,9 +52,6 @@ a:hover { margin: 0; max-width: none; } -.Header { - border-bottom: 1px solid #e0e0e0; -} .Header-nav { display: flex; } @@ -59,8 +62,8 @@ a:hover { .Header-logo { display: block; height: 32px; + margin: 1rem; width: 82px; - margin: 1rem 0; } .Header-menuItem { display: none; @@ -80,12 +83,14 @@ a:hover { flex: none; } .Header-menu { - flex: 1; justify-content: flex-end; } .Header-navOpen { display: none; } + .Header-logo { + margin: 1rem 1rem 1rem 0; + } } .Header-menuItem a:link, .Header-menuItem a:visited { @@ -113,18 +118,23 @@ a:hover { color: #3e4042; } .Header-navOpen { - height: 2rem; - margin: 1rem 1rem 1rem 1.5rem; - width: 2rem; + background: no-repeat center/2rem url('/images/menu-24px.svg'); + border: none; + height: 2.5rem; + margin: auto 1rem; + width: 2.5rem; +} +.Header-navOpen--white { + background: no-repeat center/2rem url('/images/menu-24px-white.svg'); } .NavigationDrawer { background: #fff; display: none; height: 100%; - left: 0; + left: auto; max-width: 27rem; position: fixed; - right: auto; + right: 0; top: 0; width: 85%; z-index: 10; @@ -139,14 +149,15 @@ a:hover { .NavigationDrawer-logo { display: block; height: 2rem; - margin: 1rem 1.5rem; + margin: 1rem 1rem; width: 5.125rem; } .NavigationDrawer-close { - display: block; - height: 2rem; - margin: 1rem 1rem; - width: 2rem; + background: no-repeat center/2rem url('/images/close-24px.svg'); + border: none; + height: 2.5rem; + margin: auto 1rem; + width: 2.5rem; } .NavigationDrawer-list { list-style: none; @@ -155,6 +166,7 @@ a:hover { } .NavigationDrawer-listItem { font-size: 1.5rem; + margin: 0 0.5rem; } .NavigationDrawer-listItem a:link, .NavigationDrawer-listItem a:visited { @@ -1312,3 +1324,52 @@ a.Footer-link { float: left; margin-right: 1rem; } +.SearchForm { + align-items: center; + border: 0.0625rem solid #dcdee0; + border-radius: 100rem; + display: flex; + flex: 1; + font-size: 1rem; + margin: 0.6rem 0; + padding: 0.5rem 0.5rem 0.5rem 1rem; +} +.SearchForm--white { + border: 0.0625rem solid rgba(255, 255, 255, 0.47); + color: #fff; +} +@media only screen and (min-width: 48rem) { + .SearchForm { + margin: 0.6rem 1.4rem; + } +} +.SearchForm-input--white::placeholder { + color: #fff; +} +.SearchForm-input { + background-color: transparent; + border: none; + box-sizing: border-box; + flex: 1; + font: inherit; + outline: none; +} +.SearchForm-input--white { + color: #fff; +} +.SearchForm-submit { + background-color: transparent; + border: none; + box-sizing: border-box; + cursor: pointer; + display: flex; +} +.SearchForm-submitIcon { + box-sizing: border-box; + cursor: pointer; + fill: #00add8; + width: 23px; +} +.SearchForm-submitIcon--white { + fill: #fff; +} diff --git a/go.dev/themes/default/layouts/_default/baseof.html b/go.dev/themes/default/layouts/_default/baseof.html index 6478fdb8..30bf6e56 100644 --- a/go.dev/themes/default/layouts/_default/baseof.html +++ b/go.dev/themes/default/layouts/_default/baseof.html @@ -17,15 +17,24 @@ {{$.Site.Title}} -
    -

    +

    Use Go to improve your development process

    -- cgit v1.3 From 757163803d9d618e5c2bccd4bffc810c5c6507e7 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 31 Oct 2019 21:32:36 -0400 Subject: [x/go.dev] all: serve static .js files Change-Id: Ifd0c20d45e820c29e36e23938eab1307d392634c X-GoDev-Commit: 485dcfd598883d3c2688f4d29c81ba56910a475b --- go.dev/app.learn.yaml | 2 +- go.dev/app.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go.dev/app.learn.yaml b/go.dev/app.learn.yaml index f994b099..5c006cf2 100644 --- a/go.dev/app.learn.yaml +++ b/go.dev/app.learn.yaml @@ -18,7 +18,7 @@ handlers: script: auto # Special handler for static content in themes or page bundles. -- url: /(.*)\.(png|svg|css|jpeg|jpg|xml|html)$ +- url: /(.*)\.(png|svg|js|css|jpeg|jpg|xml|html)$ static_files: public/\1.\2 upload: public/(.*) diff --git a/go.dev/app.yaml b/go.dev/app.yaml index 04addc6f..500ccfc5 100644 --- a/go.dev/app.yaml +++ b/go.dev/app.yaml @@ -18,7 +18,7 @@ handlers: script: auto # Special handler for static content in themes or page bundles. -- url: /(.*)\.(png|svg|css|jpeg|jpg|xml|html)$ +- url: /(.*)\.(png|svg|js|css|jpeg|jpg|xml|html)$ static_files: public/\1.\2 upload: public/(.*) -- cgit v1.3 From 71cbcba29eed5b1bd0196a4fe982a7dabf241be4 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Fri, 1 Nov 2019 10:17:59 -0400 Subject: [x/go.dev] cleaning up all of the svgs size reduction of up to 20x adding more gophers fixed colors of gophers Change-Id: Idf4a47e9be73a45e315269a46fa893e22774f305 X-GoDev-Commit: 62674a0ced2f81e239d77dcecaf6a38a088067bc --- go.dev/content/post.md | 10 +- go.dev/content/solutions/mercadolibre/index.md | 2 +- go.dev/content/solutions/paypal/index.md | 4 +- go.dev/layouts/shortcodes/gopher.html | 94 +++++-- go.dev/themes/default/layouts/index.html | 2 +- .../default/static/images/gophers/biplane.png | Bin 317369 -> 0 bytes .../default/static/images/gophers/biplane.svg | 1 + .../themes/default/static/images/gophers/blue.svg | 1 + .../themes/default/static/images/gophers/front.svg | 1 + .../static/images/gophers/graduate-blue.svg | 40 --- .../static/images/gophers/graduate-colorized.svg | 1 + .../default/static/images/gophers/graduate.svg | 37 +-- .../themes/default/static/images/gophers/green.svg | 1 + .../themes/default/static/images/gophers/grey.svg | 1 + .../themes/default/static/images/gophers/happy.svg | 1 + .../static/images/gophers/headlamp-blue.svg | 73 ----- .../static/images/gophers/headlamp-colorized.svg | 1 + .../default/static/images/gophers/headlamp.svg | 74 +---- .../default/static/images/gophers/ladder.svg | 92 +----- .../default/static/images/gophers/machine-c.svg | 311 -------------------- .../static/images/gophers/machine-colorized.svg | 1 + .../default/static/images/gophers/machine.svg | 312 +-------------------- .../default/static/images/gophers/megaphone.svg | 1 + .../themes/default/static/images/gophers/peach.svg | 1 + .../default/static/images/gophers/pilot-bust.svg | 1 + .../default/static/images/gophers/pilot-tan.svg | 12 - .../themes/default/static/images/gophers/pink.svg | 1 + .../default/static/images/gophers/running.svg | 1 + .../themes/default/static/images/gophers/slate.svg | 1 + .../default/static/images/gophers/tux-blue.svg | 6 - .../default/static/images/gophers/violet.svg | 1 + .../default/static/images/gophers/wrench-c.svg | 125 --------- .../default/static/images/gophers/wrench.svg | 119 +------- .../default/static/images/gophers/yellow.svg | 1 + 34 files changed, 100 insertions(+), 1230 deletions(-) delete mode 100644 go.dev/themes/default/static/images/gophers/biplane.png create mode 100644 go.dev/themes/default/static/images/gophers/biplane.svg create mode 100644 go.dev/themes/default/static/images/gophers/blue.svg create mode 100644 go.dev/themes/default/static/images/gophers/front.svg delete mode 100644 go.dev/themes/default/static/images/gophers/graduate-blue.svg create mode 100644 go.dev/themes/default/static/images/gophers/graduate-colorized.svg create mode 100644 go.dev/themes/default/static/images/gophers/green.svg create mode 100644 go.dev/themes/default/static/images/gophers/grey.svg create mode 100644 go.dev/themes/default/static/images/gophers/happy.svg delete mode 100644 go.dev/themes/default/static/images/gophers/headlamp-blue.svg create mode 100644 go.dev/themes/default/static/images/gophers/headlamp-colorized.svg delete mode 100644 go.dev/themes/default/static/images/gophers/machine-c.svg create mode 100644 go.dev/themes/default/static/images/gophers/machine-colorized.svg create mode 100644 go.dev/themes/default/static/images/gophers/megaphone.svg create mode 100644 go.dev/themes/default/static/images/gophers/peach.svg create mode 100644 go.dev/themes/default/static/images/gophers/pilot-bust.svg delete mode 100644 go.dev/themes/default/static/images/gophers/pilot-tan.svg create mode 100644 go.dev/themes/default/static/images/gophers/pink.svg create mode 100644 go.dev/themes/default/static/images/gophers/running.svg create mode 100644 go.dev/themes/default/static/images/gophers/slate.svg delete mode 100644 go.dev/themes/default/static/images/gophers/tux-blue.svg create mode 100644 go.dev/themes/default/static/images/gophers/violet.svg delete mode 100644 go.dev/themes/default/static/images/gophers/wrench-c.svg create mode 100644 go.dev/themes/default/static/images/gophers/yellow.svg diff --git a/go.dev/content/post.md b/go.dev/content/post.md index d0374935..57ce3b38 100644 --- a/go.dev/content/post.md +++ b/go.dev/content/post.md @@ -73,7 +73,7 @@ dilectae **nisi feres** canes formam? Domos ac mediaque os Stygias! {{%/largeMedia%}} {{%largeMedia title="_Avem linguam fecundus_ voce, mea haud" - img-src="/images/gopher-biplane.png" + img-src="/images/gophers/biplane.svg" img-alt="Gopher piloting a biplane."%}} Lorem markdownum horum surgere es quaeris et iuvenci cadunt hausitque armiferae [senex](http://sub.com/). @@ -86,7 +86,7 @@ dilectae **nisi feres** canes formam? Domos ac mediaque os Stygias! Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut {{%/mediaListItem%}} {{%mediaListItem title="Lorem ipsum dolor" - img-src="/images/gopher-biplane.png" + img-src="/images/gophers/biplane.svg" img-alt="Gopher piloting a biplane."%}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut {{%/mediaListItem%}} @@ -96,7 +96,7 @@ dilectae **nisi feres** canes formam? Domos ac mediaque os Stygias! Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut {{%/mediaListItem%}} {{%mediaListItem title="Lorem ipsum dolor" - img-src="/images/gopher-biplane.png" + img-src="/images/gophers/biplane.svg" img-alt="Gopher piloting a biplane."%}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut {{%/mediaListItem%}} @@ -109,7 +109,7 @@ dilectae **nisi feres** canes formam? Domos ac mediaque os Stygias! Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{%/mediaListBox%}} {{%mediaListBox title="Lorem ipsum" - img-src="/images/gopher-biplane.png" + img-src="/images/gophers/biplane.svg" img-alt="Gopher piloting a biplane."%}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{%/mediaListBox%}} @@ -119,7 +119,7 @@ dilectae **nisi feres** canes formam? Domos ac mediaque os Stygias! Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{%/mediaListBox%}} {{%mediaListBox title="Lorem ipsum" - img-src="/images/gopher-biplane.png" + img-src="/images/gophers/biplane.svg" img-alt="Gopher piloting a biplane."%}} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{%/mediaListBox%}} diff --git a/go.dev/content/solutions/mercadolibre/index.md b/go.dev/content/solutions/mercadolibre/index.md index a6a63b21..e1f951d0 100644 --- a/go.dev/content/solutions/mercadolibre/index.md +++ b/go.dev/content/solutions/mercadolibre/index.md @@ -78,7 +78,7 @@ Today, **roughly half of Mercadolibre's traffic is handled by Go applications.** ## MercadoLibre Uses Go for Developers -{{% gopher gopher=wrench-c %}} +{{% gopher gopher=wrench %}} The programming _lingua francas_ for MercadoLibre’s infrastructure are currently Go and Java. Every app, every program, every microservice is hosted on its own GitHub repository, plus the company uses an additional GitHub repository of toolkits to solve new problems and allow clients to interact with its services. diff --git a/go.dev/content/solutions/paypal/index.md b/go.dev/content/solutions/paypal/index.md index e6353f9d..b1c44d6f 100644 --- a/go.dev/content/solutions/paypal/index.md +++ b/go.dev/content/solutions/paypal/index.md @@ -51,7 +51,7 @@ As PayPal continues to modernize their software-defined networking (SDN) infrast As a global operation, PayPal needs its development teams to be effective at managing two kinds of scale: production scale, especially concurrent systems interacting with many other servers (such as cloud services); and development scale, especially large codebases developed by many programmers in coordination (such as open-source development). -{{% gopher gopher=machine size="XLarge" %}} +{{% gopher gopher=blue size="Large" %}} PayPal leverages Go to address these issues of scale. The company’s developers benefit from Go’s ability to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. As PayPal modernizes its system, support for networked and multicore computing is critical. Go not only delivers such support but delivers quickly—it takes at most a few seconds to compile a large executable on a single computer. There are currently over 100 Go developers at PayPal, and future developers who choose to adopt Go will have an easier time getting the language approved thanks to the many successful implementations already in production at the company. @@ -62,7 +62,7 @@ Most importantly, PayPal developers have increased their productivity with Go. G The first-class languages at PayPal today are Java and Node, with Go primarily used as an infrastructure language. While Go may never replace Node.js for certain applications, Natarajan is pushing to make Go a first-class language at PayPal. -{{% gopher align=right gopher=headlamp size="XLarge" %}} +{{% gopher align=right gopher=machine size="XLarge" %}} Through his efforts, PayPal is also evaluating moving to the Google Kubernetes Engine (GKE) to speed their new products’ time-to-market. The GKE is a managed, production-ready environment for deploying containerized applications, and brings Google's latest innovations in developer productivity, automated operations, and open source flexibility. For PayPal, deploying to GKE would enable rapid development and iteration by making it easier for PayPal to deploy, update, and manage its applications and services. Plus PayPal will find it easier to run Machine Learning, General Purpose GPU, High-Performance Computing, and other workloads that benefit from specialized hardware accelerators supported by the GKE. diff --git a/go.dev/layouts/shortcodes/gopher.html b/go.dev/layouts/shortcodes/gopher.html index 7b1ec7c0..f106c324 100644 --- a/go.dev/layouts/shortcodes/gopher.html +++ b/go.dev/layouts/shortcodes/gopher.html @@ -1,5 +1,5 @@ {{ $src := "/images/gophers/wrench.svg"}} -{{ $alt := "gopher with wrench"}} +{{ $alt := "Go gophers with wrench"}} {{ $size := "Large"}} {{ $align := "Left"}} {{ $gopher := .Get "gopher"}} @@ -13,49 +13,93 @@ {{$size = "XLarge"}} {{end}} -{{if eq $gopher "tux"}} - {{$src = "/images/gophers/tux-blue.svg"}} - {{$alt = "gopher in a tux"}} -{{end}} {{if eq $gopher "plane"}} - {{$src = "/images/gophers/biplane.png"}} - {{$alt = "gopher in a plane"}} + {{$src = "/images/gophers/biplane.svg"}} + {{$alt = "Go gopher in a plane"}} +{{end}} +{{if eq $gopher "blue"}} + {{$src = "/images/gophers/blue.svg"}} + {{$alt = "Go gopher"}} +{{end}} +{{if (eq $gopher "front") (eq $gopher "sticker1")}} + {{$src = "/images/gophers/front.svg"}} + {{$alt = "Go gopher"}} {{end}} {{if eq $gopher "graduate"}} {{$src = "/images/gophers/graduate.svg"}} - {{$alt = "gopher graduating"}} + {{$alt = "Go gopher graduating"}} +{{end}} +{{if eq $gopher "graduate-colorized"}} + {{$src = "/images/gophers/graduate-colorized.svg"}} + {{$alt = "Go gopher graduating"}} {{end}} -{{if eq $gopher "graduate-blue"}} - {{$src = "/images/gophers/graduate-blue.svg"}} - {{$alt = "gopher graduating"}} +{{if eq $gopher "green"}} + {{$src = "/images/gophers/green.svg"}} + {{$alt = "Go gopher"}} +{{end}} +{{if or (eq $gopher "grey") (eq $gopher "gray")}} + {{$src = "/images/gophers/grey.svg"}} + {{$alt = "Go gopher"}} +{{end}} +{{if (eq $gopher "happy") (eq $gopher "sticker2")}} + {{$src = "/images/gophers/happy.svg"}} + {{$alt = "Go gopher"}} {{end}} {{if eq $gopher "headlamp"}} {{$src = "/images/gophers/headlamp.svg"}} - {{$alt = "gopher with headlamp"}} + {{$alt = "Go gopher with headlamp"}} {{end}} -{{if eq $gopher "headlamp-blue"}} - {{$src = "/images/gophers/headlamp-blue.svg"}} - {{$alt = "gopher with headlamp"}} +{{if eq $gopher "headlamp-colorized"}} + {{$src = "/images/gophers/headlamp-colorized.svg"}} + {{$alt = "Go gopher with headlamp"}} {{end}} {{if eq $gopher "ladder"}} {{$src = "/images/gophers/ladder.svg"}} - {{$alt = "gopher with ladder"}} + {{$alt = "Go gopher with ladder"}} {{end}} {{if eq $gopher "machine"}} {{$src = "/images/gophers/machine.svg"}} - {{$alt = "gophers with a machine"}} + {{$alt = "Go gophers with a machine"}} +{{end}} +{{if eq $gopher "machine-colorized"}} + {{$src = "/images/gophers/machine-colorized.svg"}} + {{$alt = "Go gopher with a machine"}} {{end}} -{{if eq $gopher "machine-c"}} - {{$src = "/images/gophers/machine-c.svg"}} - {{$alt = "gopher with a machine"}} +{{if eq $gopher "megaphone"}} + {{$src = "/images/gophers/megaphone.svg"}} + {{$alt = "Go gopher with a megaphone"}} {{end}} -{{if eq $gopher "pilot"}} - {{$src = "/images/gophers/pilot-tan.svg"}} - {{$alt = "gopher pilot"}} +{{if eq $gopher "peach"}} + {{$src = "/images/gophers/peach.svg"}} + {{$alt = "Go gopher"}} {{end}} -{{if eq $gopher "wrench-c"}} - {{$src = "/images/gophers/wrench-c.svg"}} +{{if eq $gopher "pilot-bust"}} + {{$src = "/images/gophers/pilot-bust.svg"}} + {{$alt = "Go gopher pilot"}} +{{end}} +{{if eq $gopher "pink"}} + {{$src = "/images/gophers/pink.svg"}} + {{$alt = "Go gopher"}} +{{end}} +{{if eq $gopher "running"}} + {{$src = "/images/gophers/running.svg"}} + {{$alt = "Go gopher running"}} +{{end}} +{{if eq $gopher "slate"}} + {{$src = "/images/gophers/slate.svg"}} + {{$alt = "Go gopher"}} +{{end}} +{{if eq $gopher "wrench"}} + {{$src = "/images/gophers/wrench.svg"}} {{$alt = "gopher with a wrench"}} {{end}} +{{if eq $gopher "yellow"}} + {{$src = "/images/gophers/yellow.svg"}} + {{$alt = "Go gopher"}} +{{end}} +{{if eq $gopher "violet"}} + {{$src = "/images/gophers/violet.svg"}} + {{$alt = "Go gopher"}} +{{end}} {{$alt}} \ No newline at end of file diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index e2775f9c..b1f04a0c 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -138,7 +138,7 @@
    - Go Gopher piloting a biplane. + Go Gopher piloting a biplane.
    diff --git a/go.dev/themes/default/static/images/gophers/biplane.png b/go.dev/themes/default/static/images/gophers/biplane.png deleted file mode 100644 index a561a82f..00000000 Binary files a/go.dev/themes/default/static/images/gophers/biplane.png and /dev/null differ diff --git a/go.dev/themes/default/static/images/gophers/biplane.svg b/go.dev/themes/default/static/images/gophers/biplane.svg new file mode 100644 index 00000000..275283a8 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/biplane.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/blue.svg b/go.dev/themes/default/static/images/gophers/blue.svg new file mode 100644 index 00000000..55055400 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/blue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/front.svg b/go.dev/themes/default/static/images/gophers/front.svg new file mode 100644 index 00000000..8d7b916e --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/front.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/graduate-blue.svg b/go.dev/themes/default/static/images/gophers/graduate-blue.svg deleted file mode 100644 index f7067fb9..00000000 --- a/go.dev/themes/default/static/images/gophers/graduate-blue.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/graduate-colorized.svg b/go.dev/themes/default/static/images/gophers/graduate-colorized.svg new file mode 100644 index 00000000..2ad4a30e --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/graduate-colorized.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/graduate.svg b/go.dev/themes/default/static/images/gophers/graduate.svg index 7f59cad4..3aed2ea4 100644 --- a/go.dev/themes/default/static/images/gophers/graduate.svg +++ b/go.dev/themes/default/static/images/gophers/graduate.svg @@ -1,36 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/green.svg b/go.dev/themes/default/static/images/gophers/green.svg new file mode 100644 index 00000000..c1660ba7 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/grey.svg b/go.dev/themes/default/static/images/gophers/grey.svg new file mode 100644 index 00000000..d88756e3 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/happy.svg b/go.dev/themes/default/static/images/gophers/happy.svg new file mode 100644 index 00000000..91f670de --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/happy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/headlamp-blue.svg b/go.dev/themes/default/static/images/gophers/headlamp-blue.svg deleted file mode 100644 index afdc1f9e..00000000 --- a/go.dev/themes/default/static/images/gophers/headlamp-blue.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/headlamp-colorized.svg b/go.dev/themes/default/static/images/gophers/headlamp-colorized.svg new file mode 100644 index 00000000..47b3de62 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/headlamp-colorized.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/headlamp.svg b/go.dev/themes/default/static/images/gophers/headlamp.svg index 39597855..3e815c9f 100644 --- a/go.dev/themes/default/static/images/gophers/headlamp.svg +++ b/go.dev/themes/default/static/images/gophers/headlamp.svg @@ -1,73 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/ladder.svg b/go.dev/themes/default/static/images/gophers/ladder.svg index 9eeaa37d..de6bc86b 100644 --- a/go.dev/themes/default/static/images/gophers/ladder.svg +++ b/go.dev/themes/default/static/images/gophers/ladder.svg @@ -1,91 +1 @@ - - - - Group 12 - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/machine-c.svg b/go.dev/themes/default/static/images/gophers/machine-c.svg deleted file mode 100644 index 1e92d5ae..00000000 --- a/go.dev/themes/default/static/images/gophers/machine-c.svg +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/machine-colorized.svg b/go.dev/themes/default/static/images/gophers/machine-colorized.svg new file mode 100644 index 00000000..cb8b9831 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/machine-colorized.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/machine.svg b/go.dev/themes/default/static/images/gophers/machine.svg index 58460cd1..7fe82b75 100644 --- a/go.dev/themes/default/static/images/gophers/machine.svg +++ b/go.dev/themes/default/static/images/gophers/machine.svg @@ -1,311 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/megaphone.svg b/go.dev/themes/default/static/images/gophers/megaphone.svg new file mode 100644 index 00000000..c018845d --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/megaphone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/peach.svg b/go.dev/themes/default/static/images/gophers/peach.svg new file mode 100644 index 00000000..a13a4d4e --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/peach.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/pilot-bust.svg b/go.dev/themes/default/static/images/gophers/pilot-bust.svg new file mode 100644 index 00000000..a654dc77 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/pilot-bust.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/pilot-tan.svg b/go.dev/themes/default/static/images/gophers/pilot-tan.svg deleted file mode 100644 index fc15159f..00000000 --- a/go.dev/themes/default/static/images/gophers/pilot-tan.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/pink.svg b/go.dev/themes/default/static/images/gophers/pink.svg new file mode 100644 index 00000000..51e456c6 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/pink.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/running.svg b/go.dev/themes/default/static/images/gophers/running.svg new file mode 100644 index 00000000..001245f3 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/running.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/slate.svg b/go.dev/themes/default/static/images/gophers/slate.svg new file mode 100644 index 00000000..4930804d --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/slate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/tux-blue.svg b/go.dev/themes/default/static/images/gophers/tux-blue.svg deleted file mode 100644 index e8e03540..00000000 --- a/go.dev/themes/default/static/images/gophers/tux-blue.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/violet.svg b/go.dev/themes/default/static/images/gophers/violet.svg new file mode 100644 index 00000000..33e8bdc5 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/violet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/wrench-c.svg b/go.dev/themes/default/static/images/gophers/wrench-c.svg deleted file mode 100644 index 902be15c..00000000 --- a/go.dev/themes/default/static/images/gophers/wrench-c.svg +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/wrench.svg b/go.dev/themes/default/static/images/gophers/wrench.svg index 43aaae11..fc5789b1 100644 --- a/go.dev/themes/default/static/images/gophers/wrench.svg +++ b/go.dev/themes/default/static/images/gophers/wrench.svg @@ -1,118 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/gophers/yellow.svg b/go.dev/themes/default/static/images/gophers/yellow.svg new file mode 100644 index 00000000..5ecf2f27 --- /dev/null +++ b/go.dev/themes/default/static/images/gophers/yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file -- cgit v1.3 From abdaa6a734b4c3f168a6ad5dac12b41b1943bfad Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Fri, 1 Nov 2019 11:27:10 -0400 Subject: [x/go.dev] moving h tags from work sans to google sans Change-Id: Ifab03e251997fb9068ea3d234780a3a658cea8b0 X-GoDev-Commit: 1550a371625b7f3fc88f9d96ad910f37538344be --- go.dev/themes/default/assets/css/styles.css | 24 +++++++++++++++++++--- go.dev/themes/default/layouts/_default/baseof.html | 2 +- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index 3ac03b29..83a07780 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -74,6 +74,25 @@ a:hover { margin: 0; padding: 0; } + +h1, h2, h3, h4, h5, h6 { + font-family: 'Google Sans', sans-serif; +} + +h1, h2 { + font-weight: 600; + letter-spacing: 0.03rem; +} + +h3, h4 { + font-weight: 600; + letter-spacing: 0.08rem; +} +h5, h6 { + font-weight: 500; + letter-spacing: 0.08rem; +} + @media only screen and (min-width: 57.7rem) { .Header { padding: 0 1.5rem; @@ -214,7 +233,7 @@ a:hover { .Article h4, .Article h5, .Article h6 { - font-family: 'Work Sans', sans-serif; + font-family: 'Google Sans', sans-serif; font-weight: 600; } .Article h1 { @@ -292,9 +311,9 @@ a:hover { .UseCases-header h2, .WhyGo-header h2, .LearnGo-header h2 { + font-size: 2rem; letter-spacing: 0.125rem; margin-top: 0; - text-transform: uppercase; } .Hero { color: #fff; @@ -1024,7 +1043,6 @@ a.Footer-link { .Solutions-useCasesHeader h2, .Solutions-caseStudiesHeader h2 { letter-spacing: 0.125rem; - text-transform: uppercase; } .Solutions-useCaseList { display: flex; diff --git a/go.dev/themes/default/layouts/_default/baseof.html b/go.dev/themes/default/layouts/_default/baseof.html index 30bf6e56..04ef1ba4 100644 --- a/go.dev/themes/default/layouts/_default/baseof.html +++ b/go.dev/themes/default/layouts/_default/baseof.html @@ -5,7 +5,7 @@ - + {{$styles := resources.Get "css/styles.css" -}} {{if .Site.IsServer -}} -- cgit v1.3 From b87c4b4b1f485c64b36ffc8fcb6257555f983ceb Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Fri, 1 Nov 2019 11:27:40 -0400 Subject: [x/go.dev] reordering the homepage Change-Id: I55f2eb695596bdfe69899e8adbd0efc1d75108f7 X-GoDev-Commit: 725adc531b37ad128dfecfe4b764ea1d577fb77a --- go.dev/themes/default/layouts/index.html | 85 ++++++++++++++++---------------- 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index b1f04a0c..56152371 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -43,33 +43,6 @@ -
    - {{$solutions := index (where .Pages "Section" "solutions") 0}} - -
    @@ -101,18 +74,17 @@ Star.
    -

    Ideal for Scale & Microservices

    +

    Efficient

    - “Go has excellent characteristics for scalability and services written using it typically have very - small memory footprints. Because code is compiled into a single static binary, services can also be - containerised with ease, making it much simpler to build and deploy. These attributes make Go an ideal - choice for companies building microservices, as you can easily deploy into a highly available and scalable - environment such as Kubernetes.” + "A small language that compiles fast makes for a happy developer. The Go language is small, compiles really fast, and as + a result it lets your mind focus on the actual problem and less on the tool you are using to solve it. Code, test, debug + cycles are so quick that you forget you are not working with an interpreted language. Looking at our code, you see less + boilerplate and more business logic."

    - Matt Boyle, lead software engineer at Curve + href="https://blog.gopheracademy.com/birthday-bash-2014/openshift-3-old-dogs-new-tricks/" + target="_blank">Clayton Coleman, lead engineer, Open Shift at RedHat

    @@ -121,18 +93,18 @@ Star.
    -

    Efficient

    +

    Ideal for Scale & Microservices

    - A small language that compiles fast makes for a happy developer. The Go language is small, compiles really fast, and as - a result it lets your mind focus on the actual problem and less on the tool you are using to solve it. Code, test, debug - cycles are so quick that you forget you are not working with an interpreted language. Looking at our code, you see less - boilerplate and more business logic. Type marshalling, concurrency, and defer style control flow keeps the code clean - and compact. + “Go has excellent characteristics for scalability and services written using it typically have very + small memory footprints. Because code is compiled into a single static binary, services can also be + containerised with ease, making it much simpler to build and deploy. These attributes make Go an ideal + choice for companies building microservices, as you can easily deploy into a highly available and scalable + environment such as Kubernetes.”

    - Clayton Coleman, lead engineer, Open Shift at RedHat + href="https://www.computerweekly.com/blog/Open-Source-Insider/Golang-or-go-home-how-Curve-is-taking-Golang-to-new-heights" + target="_blank">Matt Boyle, lead software engineer at Curve

    @@ -142,6 +114,33 @@
    +
    + {{$solutions := index (where .Pages "Section" "solutions") 0}} +
    +
    +
    +

    Use Cases

    +
    + {{range where $solutions.Pages "Params.series" "Use Cases"}} +
    + +

    {{.LinkTitle}}

    +

    + {{.Description}} +

    +

    + Learn More > +

    +
    + {{end}} +
    +
    +
    -- cgit v1.3 From d6ecd58e2a22a8e836b121880fd90eaa001e9e6b Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Fri, 1 Nov 2019 11:33:36 -0400 Subject: [x/go.dev] fix font weight on Hero h2 Change-Id: Ifaf0c55171518a1d28eda54a05ddf011db8b52eb X-GoDev-Commit: 199fff7cd44fc997f4181ecb72df2dbf4c57a4ad --- go.dev/themes/default/assets/css/styles.css | 2 +- go.dev/themes/default/layouts/_default/baseof.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index 83a07780..3bdfdc11 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -324,7 +324,7 @@ h5, h6 { } .Hero h2 { font-size: 1.5rem; - font-weight: normal; + font-weight: 400; max-width: 29rem; } .Hero-gridContainer { diff --git a/go.dev/themes/default/layouts/_default/baseof.html b/go.dev/themes/default/layouts/_default/baseof.html index 04ef1ba4..876f786d 100644 --- a/go.dev/themes/default/layouts/_default/baseof.html +++ b/go.dev/themes/default/layouts/_default/baseof.html @@ -5,7 +5,7 @@ - + {{$styles := resources.Get "css/styles.css" -}} {{if .Site.IsServer -}} -- cgit v1.3 From e0d98cd6265d584e1a6d36af1805256e5a69095c Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Fri, 1 Nov 2019 11:38:50 -0400 Subject: [x/go.dev] add "open in new" icon to mentions Change-Id: I913f9cdb0cf81d1cdf5f5718790d2d3ae0166130 X-GoDev-Commit: 7b9a78764c5a84edecd271b235199ae6b843e173 --- go.dev/themes/default/layouts/index.html | 2 +- go.dev/themes/default/layouts/solutions/section.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index 56152371..c67d7163 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -29,7 +29,7 @@ {{$logo := .Resources.GetMatch "logo"}} -

    View article

    +

    View article open_in_new

    {{else}} diff --git a/go.dev/themes/default/layouts/solutions/section.html b/go.dev/themes/default/layouts/solutions/section.html index 11ab6c27..577745fd 100644 --- a/go.dev/themes/default/layouts/solutions/section.html +++ b/go.dev/themes/default/layouts/solutions/section.html @@ -55,7 +55,7 @@ {{$logo := .Resources.GetMatch "logo"}} {{$logo.Params.alt}}
    -

    View article

    +

    View article open_in_new

    {{else}} -- cgit v1.3 From fddc090f72fceb9857a50530504278c1e3ee42a7 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Fri, 1 Nov 2019 11:43:15 -0400 Subject: [x/go.dev] replace star svg with material design icon Change-Id: I21e3e0ef6cfe80e7ea327e6efb9d0b7fc81d89ae X-GoDev-Commit: 462a8fa5e3ecf9443958cc698c19dd158b451962 --- go.dev/layouts/shortcodes/starItem.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.dev/layouts/shortcodes/starItem.html b/go.dev/layouts/shortcodes/starItem.html index 1745c41d..4da8dd6e 100644 --- a/go.dev/layouts/shortcodes/starItem.html +++ b/go.dev/layouts/shortcodes/starItem.html @@ -1,6 +1,6 @@

    -- cgit v1.3 From 8f2a07089b55bb63a2f183c95f19fd6defa18250 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Fri, 1 Nov 2019 12:22:37 -0400 Subject: [x/go.dev] More action words on homepage + guidedjourneys Change-Id: I5926e95e88a8818bcc598b02777f34cb8747063c X-GoDev-Commit: 8ed26bf1a7ef0f3c06c97b9ffcb62bb8a3613307 --- go.dev/themes/default/layouts/index.html | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index c67d7163..ac8d61b4 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -20,7 +20,7 @@ {{$solutions := index (where .Pages "Section" "solutions") 0}}
    -

    Companies Using Go

    +

    Used, Loved, & Depended on by

      {{range where $solutions.Pages "Params.series" "Case Studies"}} @@ -46,7 +46,7 @@
      -

      Why Go

      +

      Why choose Go

      • @@ -93,7 +93,7 @@ Star.
      -

      Ideal for Scale & Microservices

      +

      Powerful

      Go has excellent characteristics for scalability and services written using it typically have very small memory footprints. Because code is compiled into a single static binary, services can also be @@ -119,7 +119,7 @@

      -

      Use Cases

      +

      Designed for Today's Needs

      {{range where $solutions.Pages "Params.series" "Use Cases"}}
      @@ -145,10 +145,19 @@

      Learn Go

      -

      Join the Go community and start learning

      +

      + “I started writing in Go when I was just out of college and couldn’t believe how quickly I picked it up, especially + compared to other languages. I had spent months learning about how to build APIs in other languages (and mostly + failing), but after a week of writing Go, I had completed my first API.” +

      +

      + - Kaylyn Gibilterra, Senior Software Engineer, Capital One +

      - View More > + Learn More >

      -

      Guided Learning Journeys

      +

      Guided learning journeys

      View More >

      @@ -56,7 +56,7 @@
      -

      Online Learning

      +

      Online learning

      {{if gt (len $.Site.Data.learn.courses.links) 4}} View More > {{end}} @@ -82,7 +82,7 @@
      -

      Featured Books

      +

      Featured books

      {{if gt (len $.Site.Data.learn.books.links) 5}} View More > @@ -110,7 +110,7 @@

      -

      In Person Training

      +

      In-person training

      View More >

      diff --git a/go.dev/themes/default/layouts/solutions/section.html b/go.dev/themes/default/layouts/solutions/section.html index b2d1fac9..608cef10 100644 --- a/go.dev/themes/default/layouts/solutions/section.html +++ b/go.dev/themes/default/layouts/solutions/section.html @@ -14,7 +14,7 @@
      -

      Designed for Today's Needs

      +

      Designed for today's needs

        {{range where .Pages "Params.series" "Use Cases"}} @@ -44,7 +44,7 @@
        -

        Go is Used, Loved and Depended on by

        +

        Companies use, love, and depend on Go

          {{range where .Pages "Params.series" "Case Studies"}} -- cgit v1.3 From 689fe959ee0b7a89fddac38374c00a5b33824266 Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Thu, 31 Oct 2019 19:44:27 -0400 Subject: [x/go.dev] cmd/versionprune: add command to prune appengine versions This change adds a command to prune old app engine versions. AppEngine has a limit of 210 versions across all services. As we have many services in this project and deploy go-dev and learn-go-dev daily, we should clean up services regularly. There's no gcloud command to do something similar, and doing it in the UI is tedious and error prone. The command by default will: - keep the latest 5 versions - keep any version that is serving traffic - keep any version that is younger than 24h - ignore versions with invalid dates (doesn't seem to be a real thing) Updates b/143768957 Change-Id: I315ca9f459aa28b8ae94b55557e628ceeb22c884 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go.dev/+/589755 CI-Result: Cloud Build Reviewed-by: Jonathan Amsterdam X-GoDev-Commit: b763768db4b9b9b2fcd67a3f5a0f3d18fe65cd9e --- go.dev/cmd/versionprune/doc.go | 42 +++++++++ go.dev/cmd/versionprune/main.go | 175 +++++++++++++++++++++++++++++++++++ go.dev/cmd/versionprune/main_test.go | 118 +++++++++++++++++++++++ go.dev/go.mod | 1 + go.dev/go.sum | 83 +++++++++++++++++ 5 files changed, 419 insertions(+) create mode 100644 go.dev/cmd/versionprune/doc.go create mode 100644 go.dev/cmd/versionprune/main.go create mode 100644 go.dev/cmd/versionprune/main_test.go diff --git a/go.dev/cmd/versionprune/doc.go b/go.dev/cmd/versionprune/doc.go new file mode 100644 index 00000000..194df555 --- /dev/null +++ b/go.dev/cmd/versionprune/doc.go @@ -0,0 +1,42 @@ +/* +Binary versionprune prunes stale AppEngine versions for a specified service. + +The command by default will: +- keep the latest 5 versions +- keep any version that is serving traffic +- keep any version that is younger than 24h +- ignore versions with invalid dates (doesn't seem to be a real thing) + + Sample output: + + target project: [go-discovery] + target service: [go-dev] + versions: (18) + + versions to keep (11): [ + 20191101t013408: version is serving traffic. split: 100% + 20191031t211924: keeping the latest 5 versions (2) + 20191031t211903: keeping the latest 5 versions (3) + 20191031t205920: keeping the latest 5 versions (4) + 20191031t232247: keeping the latest 5 versions (5) + 20191031t232028: keeping recent versions (2h56m4.73591512s) + 20191031t220312: keeping recent versions (4h13m20.735921508s) + 20191031t211935: keeping recent versions (4h56m55.73592447s) + 20191031t211824: keeping recent versions (4h58m10.735928067s) + 20191031t200353: keeping recent versions (6h12m38.735932792s) + 20191031t150644: keeping recent versions (11h9m44.735935312s) + ] + versions to delete (7): [ + 20191030t225128: bye + 20191030t214823: bye + 20191030t214355: bye + 20191030t204338: bye + 20191030t202841: bye + 20191030t195403: bye + 20191030t192250: bye + ] + deleting go-discovery/go-dev/20191030t225128 + ... + +*/ +package main diff --git a/go.dev/cmd/versionprune/main.go b/go.dev/cmd/versionprune/main.go new file mode 100644 index 00000000..f8018cdf --- /dev/null +++ b/go.dev/cmd/versionprune/main.go @@ -0,0 +1,175 @@ +package main + +import ( + "context" + "flag" + "fmt" + "os" + "sort" + "time" + + "google.golang.org/api/appengine/v1" +) + +var ( + dryRun = flag.Bool("dry_run", true, "When true, just print intended modifications and quit") + keepDuration = flag.Duration("keep_duration", 24*time.Hour, "Versions older than this will be deleted") + keepNumber = flag.Int("keep_number", 5, "Minimum number of versions to keep") + project = flag.String("project", "", "GCP Project (required)") + service = flag.String("service", "", "AppEngine service (required)") +) + +func main() { + flag.Parse() + + if *project == "" { + fmt.Println("-project flag is required.") + flag.Usage() + os.Exit(1) + } + if *service == "" { + fmt.Println("-service flag is required.") + flag.Usage() + os.Exit(1) + } + if *keepDuration < 0 { + fmt.Printf("-keep_duration must be greater or equal to 0, got %s\n", *keepDuration) + flag.Usage() + os.Exit(1) + } + if *keepNumber < 0 { + fmt.Printf("-keep_number must be greater or equal to 0, got %d\n", *keepNumber) + flag.Usage() + os.Exit(1) + } + + if err := run(context.Background()); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(2) + } +} + +// version is an intermediate representation of an AppEngine version. +type version struct { + AEVersion *appengine.Version + // Message is a human-readable message of why a version was bucketed. + Message string + // Created is a parsed time of the AppEngine Version CreateTime. + Created time.Time +} + +// run fetches, processes, and (if DryRun is false) deletes stale AppEngine versions for the specified Service. +func run(ctx context.Context) error { + aes, err := appengine.NewService(ctx) + if err != nil { + return fmt.Errorf("creating appengine client: %w", err) + } + ass := appengine.NewAppsServicesService(aes) + asvs := appengine.NewAppsServicesVersionsService(aes) + + s, err := ass.Get(*project, *service).Do() + if err != nil { + return fmt.Errorf("fetching service: %w", err) + } + + vs, err := getVersions(ctx, asvs) + if err != nil { + return fmt.Errorf("fetching versions: %w", err) + } + + bs, err := bucket(s.Split.Allocations, vs, *keepNumber, *keepDuration) + if err != nil { + return fmt.Errorf("bucketing versions: %w", err) + } + printIntent(bs) + if err := act(asvs, bs, *dryRun); err != nil { + return fmt.Errorf("executing: %w", err) + } + return nil +} + +func getVersions(ctx context.Context, asvs *appengine.AppsServicesVersionsService) ([]*appengine.Version, error) { + var versions []*appengine.Version + err := asvs.List(*project, *service).Pages(ctx, func(r *appengine.ListVersionsResponse) error { + versions = append(versions, r.Versions...) + return nil + }) + if err != nil { + return nil, err + } + sort.Slice(versions, func(i, j int) bool { + // Sort by create time, descending. + return versions[i].CreateTime > versions[j].CreateTime + }) + return versions, nil +} + +type buckets struct { + keep []version + delete []version +} + +// bucket splits c.versions into intended actions. +func bucket(allocs map[string]float64, versions []*appengine.Version, keepNumber int, keepDuration time.Duration) (buckets, error) { + var bs buckets + for _, av := range versions { + v := version{AEVersion: av} + created, err := time.Parse(time.RFC3339, av.CreateTime) + if err != nil { + return bs, fmt.Errorf("failed to parse time %q for version %s: %v", av.CreateTime, av.Id, err) + } + v.Created = created + if s, ok := allocs[av.Id]; ok { + v.Message = fmt.Sprintf("version is serving traffic. split: %v%%", s*100) + bs.keep = append(bs.keep, v) + continue + } + if len(bs.keep) < keepNumber { + v.Message = fmt.Sprintf("keeping the latest %d versions (%d)", keepNumber, len(bs.keep)) + bs.keep = append(bs.keep, v) + continue + } + if dur := time.Since(v.Created); dur < keepDuration { + v.Message = fmt.Sprintf("keeping recent versions (%s)", dur) + bs.keep = append(bs.keep, v) + continue + } + v.Message = "bye" + bs.delete = append(bs.delete, v) + } + return bs, nil +} + +func printIntent(bs buckets) { + fmt.Printf("target project:\t[%v]\n", *project) + fmt.Printf("target service:\t[%v]\n", *service) + fmt.Printf("versions:\t(%v)\n", len(bs.delete)+len(bs.keep)) + fmt.Println() + + fmt.Printf("versions to keep (%v): [\n", len(bs.keep)) + for _, v := range bs.keep { + fmt.Printf("\t%v: %v\n", v.AEVersion.Id, v.Message) + } + fmt.Println("]") + + fmt.Printf("versions to delete (%v): [\n", len(bs.delete)) + for _, v := range bs.delete { + fmt.Printf("\t%v: %v\n", v.AEVersion.Id, v.Message) + } + fmt.Println("]") +} + +// act performs delete requests for AppEngine services to be deleted. No deletions are performed if DryRun is true. +func act(asvs *appengine.AppsServicesVersionsService, bs buckets, dryRun bool) error { + for _, v := range bs.delete { + if dryRun { + fmt.Printf("dry-run: skipping delete %v: %v\n", v.AEVersion.Id, v.Message) + continue + } + fmt.Printf("deleting %v/%v/%v\n", *project, *service, v.AEVersion.Id) + if _, err := asvs.Delete(*project, *service, v.AEVersion.Id).Do(); err != nil { + return fmt.Errorf("error deleting %v/%v/%v: %w", *project, *service, v.AEVersion.Id, err) + } + } + return nil +} diff --git a/go.dev/cmd/versionprune/main_test.go b/go.dev/cmd/versionprune/main_test.go new file mode 100644 index 00000000..60ae2b75 --- /dev/null +++ b/go.dev/cmd/versionprune/main_test.go @@ -0,0 +1,118 @@ +package main + +import ( + "testing" + "time" + + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "google.golang.org/api/appengine/v1" +) + +func TestDecide(t *testing.T) { + recentTime := time.Now() + recentTime = recentTime.Truncate(time.Minute) + allocs := map[string]float64{"currentlyServingID": 1.0} + + tests := []struct { + desc string + versions []*appengine.Version + keepNumber int + wantKeep []version + wantDelete []version + wantErr bool + }{ + { + desc: "no versions", + }, + { + desc: "invalid Version time", + versions: []*appengine.Version{{Id: "invalid time", CreateTime: "abc123"}}, + wantErr: true, + }, + { + desc: "old versions", + versions: []*appengine.Version{{Id: "old one", CreateTime: "2018-01-02T15:04:05Z"}}, + wantDelete: []version{{ + AEVersion: &appengine.Version{Id: "old one", CreateTime: "2018-01-02T15:04:05Z"}, + Created: time.Date(2018, 1, 2, 15, 4, 5, 0, time.UTC), + }}, + }, + { + desc: "versions serving", + versions: []*appengine.Version{{Id: "currentlyServingID", CreateTime: "2018-01-02T15:04:05Z"}}, + wantKeep: []version{{ + AEVersion: &appengine.Version{Id: "currentlyServingID", CreateTime: "2018-01-02T15:04:05Z"}, + Created: time.Date(2018, 1, 2, 15, 4, 5, 0, time.UTC), + }}, + }, + { + desc: "within 24h", + versions: []*appengine.Version{{Id: "some id", CreateTime: recentTime.Format(time.RFC3339)}}, + wantKeep: []version{{ + AEVersion: &appengine.Version{Id: "some id", CreateTime: recentTime.Format(time.RFC3339)}, + Created: recentTime, + }}, + }, + { + desc: "keeps KeepNumber versions", + versions: []*appengine.Version{ + {Id: "some id", CreateTime: recentTime.Format(time.RFC3339)}, + {Id: "currentlyServingID", CreateTime: "2018-01-02T15:04:05Z"}, + {Id: "not serving", CreateTime: "2019-01-02T15:04:05Z"}, + {Id: "this one should be deleted", CreateTime: "2019-01-02T15:04:05Z"}, + }, + keepNumber: 3, + wantKeep: []version{ + { + AEVersion: &appengine.Version{Id: "some id", CreateTime: recentTime.Format(time.RFC3339)}, + Created: recentTime, + }, + { + AEVersion: &appengine.Version{Id: "currentlyServingID", CreateTime: "2018-01-02T15:04:05Z"}, + Created: time.Date(2018, 1, 2, 15, 4, 5, 0, time.UTC), + }, + { + AEVersion: &appengine.Version{Id: "not serving", CreateTime: "2019-01-02T15:04:05Z"}, + Created: time.Date(2019, 1, 2, 15, 4, 5, 0, time.UTC), + }, + }, + wantDelete: []version{{ + AEVersion: &appengine.Version{Id: "this one should be deleted", CreateTime: "2019-01-02T15:04:05Z"}, + Created: time.Date(2019, 1, 2, 15, 4, 5, 0, time.UTC), + }}, + }, + } + for _, tt := range tests { + t.Run(tt.desc, func(t *testing.T) { + bs, err := bucket(allocs, tt.versions, tt.keepNumber, 24*time.Hour) + if (err != nil) != tt.wantErr { + t.Errorf("bucket(%v, %v, %v, %v) = %v, %v, wantErr %v", allocs, tt.versions, tt.keepNumber, 24*time.Hour, bs, err, tt.wantErr) + return + } + ignoreFields := cmpopts.IgnoreFields(version{}, "Message") + if diff := cmp.Diff(tt.wantKeep, bs.keep, ignoreFields); diff != "" { + t.Errorf("c.Keep mismatch (-want +got):\n%s", diff) + } + if diff := cmp.Diff(tt.wantDelete, bs.delete, ignoreFields); diff != "" { + t.Errorf("c.Delete mismatch (-want +got):\n%s", diff) + } + }) + } +} + +func TestAct(t *testing.T) { + bs := buckets{delete: []version{{AEVersion: &appengine.Version{Id: "test ID"}}}} + if err := act(nil, bs, true); err != nil { + t.Errorf("c.act() = %v, wanted no error", err) + } + defer func(t *testing.T) { + t.Helper() + if recover() == nil { + // c.act() should panic with no asvs set, showing that the DryRun flag worked. + // faking out the appengine admin client is hard. + t.Errorf("recover() = nil, wanted panic") + } + }(t) + act(nil, bs, false) +} diff --git a/go.dev/go.mod b/go.dev/go.mod index b110aefe..eeec4858 100644 --- a/go.dev/go.mod +++ b/go.dev/go.mod @@ -5,5 +5,6 @@ go 1.13 require ( github.com/google/go-cmp v0.3.1 github.com/microcosm-cc/bluemonday v1.0.2 + google.golang.org/api v0.13.0 gopkg.in/yaml.v2 v2.2.2 ) diff --git a/go.dev/go.sum b/go.dev/go.sum index 23d783ed..f7b55072 100644 --- a/go.dev/go.sum +++ b/go.dev/go.sum @@ -1,10 +1,93 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/microcosm-cc/bluemonday v1.0.2 h1:5lPfLTTAvAbtS0VqT+94yOtFnGfUWYyx0+iToC3Os3s= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= +go.opencensus.io v0.21.0 h1:mU6zScU4U1YAFPHEHYk+3JC4SY7JxgkqS10ZOSyksNg= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c h1:uOCk1iQW6Vc18bnC13MfzScl+wdKBmM9Y9kU7Z83/lw= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b h1:ag/x1USPSsqHud38I9BAC88qdNLDHHtQ4mlgQIZPPNA= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.13.0 h1:Q3Ui3V3/CVinFWFiW39Iw0kMuVrRzYX0wN6OPFp0lTA= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873 h1:nfPFGzJkUDX6uBmpN/pSw7MbOAWegH5QDQuoXFHedLg= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1 h1:Hz2g2wirWK7H0qIIhGIqRGTuMwTE8HEKFnDZZ7lm9NU= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -- cgit v1.3 From 6482d3600dcfcbbe69246a9b06d0753cf1065849 Mon Sep 17 00:00:00 2001 From: Matt Pearring Date: Sun, 3 Nov 2019 17:58:28 -0800 Subject: [x/go.dev] Added CLI use case added web dev use case cleaned up use case language, standardized header formatting added links to use cases and formatted lists added images to online learning added image CDK course X-GoDev-Commit: f46abe47401a00bc5834b45571af4f1f72a871da --- go.dev/content/solutions/clis/globe-white.png | Bin 0 -> 3105 bytes go.dev/content/solutions/clis/globe.png | Bin 0 -> 20012 bytes go.dev/content/solutions/clis/index.md | 91 +++++++++++ go.dev/content/solutions/cloud/index.md | 176 ++++++++------------- go.dev/content/solutions/devops/index.md | 52 +++--- go.dev/content/solutions/webdev/globe-white.png | Bin 0 -> 3105 bytes go.dev/content/solutions/webdev/globe.png | Bin 0 -> 20012 bytes go.dev/content/solutions/webdev/index.md | 126 +++++++++++++++ go.dev/data/learn/courses.yaml | 4 +- go.dev/data/learn/guidedLearning.yaml | 11 +- go.dev/data/learn/quickstart.yaml | 2 +- .../default/static/images/learn/codelabs.png | Bin 0 -> 34754 bytes .../default/static/images/learn/codelabs_2.png | Bin 0 -> 45871 bytes .../default/static/images/learn/coursera.png | Bin 0 -> 4966 bytes .../default/static/images/learn/exercism.png | Bin 0 -> 78659 bytes .../default/static/images/learn/go_cdk_logo.png | Bin 0 -> 42544 bytes .../default/static/images/learn/gophercises_1.png | Bin 0 -> 143576 bytes .../default/static/images/learn/helloworld.png | Bin 0 -> 485994 bytes 18 files changed, 311 insertions(+), 151 deletions(-) create mode 100644 go.dev/content/solutions/clis/globe-white.png create mode 100644 go.dev/content/solutions/clis/globe.png create mode 100644 go.dev/content/solutions/clis/index.md create mode 100644 go.dev/content/solutions/webdev/globe-white.png create mode 100644 go.dev/content/solutions/webdev/globe.png create mode 100644 go.dev/content/solutions/webdev/index.md create mode 100644 go.dev/themes/default/static/images/learn/codelabs.png create mode 100644 go.dev/themes/default/static/images/learn/codelabs_2.png create mode 100644 go.dev/themes/default/static/images/learn/coursera.png create mode 100644 go.dev/themes/default/static/images/learn/exercism.png create mode 100644 go.dev/themes/default/static/images/learn/go_cdk_logo.png create mode 100644 go.dev/themes/default/static/images/learn/gophercises_1.png create mode 100644 go.dev/themes/default/static/images/learn/helloworld.png diff --git a/go.dev/content/solutions/clis/globe-white.png b/go.dev/content/solutions/clis/globe-white.png new file mode 100644 index 00000000..2f22bf20 Binary files /dev/null and b/go.dev/content/solutions/clis/globe-white.png differ diff --git a/go.dev/content/solutions/clis/globe.png b/go.dev/content/solutions/clis/globe.png new file mode 100644 index 00000000..bf497235 Binary files /dev/null and b/go.dev/content/solutions/clis/globe.png differ diff --git a/go.dev/content/solutions/clis/index.md b/go.dev/content/solutions/clis/index.md new file mode 100644 index 00000000..d75475d9 --- /dev/null +++ b/go.dev/content/solutions/clis/index.md @@ -0,0 +1,91 @@ +--- +title: "Go for Command-line Interfaces (CLIs)" +linkTitle: "Command-line Interfaces" +description: "With popular open source packages and a robust standard library, use Go to create fast and elegant CLIs." +date: 2019-10-04T15:26:31-04:00 +series: Use Cases +resources: +- name: icon + src: globe.png + params: + alt: globe +- name: icon-white + src: globe-white.png + params: + alt: globe +--- + +### _CLI developers prefer Go for portability, performance, and ease of creation_ + +## **Why use Go for CLIs** + +Command line interfaces (CLIs), unlike graphical user interfaces (GUIs), use text-only instructions and syntax to interact with applications and operating systems. While desktop and mobile are primarily GUI-based, cloud and infrastructure are CLI-based due to their easy automation and remote capabilities. CLIs allow users to perform specific computing tasks by typing text commands and receiving system replies via text outputs, and CLIs are easily automated and can be combined to create custom workflows. + +Developers of CLIs find Go to be ideal for designing their applications. Go compiles very quickly into a single binary, works across platforms with a consistent style, and brings a strong development community. “The design of Go lends itself incredibly well to [many] styles of application,” [writes Elliot Forbes](https://tutorialedge.net/golang/building-a-cli-in-go/), software engineer at JP Morgan Chase. “And the ability to cross-compile a binary executable for all major platforms easily is a massive win.” + +Specifically, **programs written in Go run on any system without requiring any existing libraries, runtimes, or dependencies**. And **programs written in Go have an immediate startup time**—similar to C or C++ but unobtainable with other programming languages. + +These two distinguishing features ensure that installing and using a Go program is just about the easiest thing ever: Unlike Java, JavaScript, PHP, Python, Ruby, or any JVM language which all require installing the right version of interpreters/runtimes (which often conflict with the system version); and unlike C or C++ which are dynamically linked to specific versions of libraries resulting in the accurately named “dependency hell” that occurs when different programs depend on different versions of libraries. + +“Go is steadily rising towards being the de facto language for servers and CLI tools,” [says Sam Boyer](https://www.sonatype.com/press-release-blog/sonatype-goes-long-with-godelivers-fully-automated-security-solution-for-fast-growing-programming-language), lead engineer at Sonatype. “The addition of formal package management support to the toolchain will only accelerate this process.” + +Carolyn Van Slyck, senior software engineer at Microsoft, has worked on CLIs such as dep, Docker Version Manager, Kubernetes Service Catalog, and Porter. She adds, “CLIs are best designed with predictable, task-oriented commands and you [want to use Go](https://www.youtube.com/watch?v=eMz0vni6PAw&list=PL2ntRZ1ySWBdDyspRTNBIKES1Y-P__59_&index=11&t=0s).” + +## **Who uses Go for CLIs** + +### **Comcast** + +Go has found success for teams building CLIs at Comcast. For example, Go is the Video on Demand (VOD) team’s primary language, and a good fit for CLI development because the standard library is simple to write platform-independent code that is readily cross-compiled for use in both Mac and Linux environments. The standard library makes it easy to handle command line flags, stdin, and stdout, which are all important when developing CLIs. + +### **The New York Times Company** + +The publishing company uses a lot of CLIs built in Go. “We’ve become more confident and familiar with Go,” [writes JP Robinson](https://open.blogs.nytimes.com/2014/07/10/emr-streaming-in-go/), principal software engineer at The New York Times Company. “From daemon services to simple MapReduce scripts, Go has been my team’s first choice for server-side code. It’s enabled us to build performant and reliable services that have been easy to maintain, and the Go community’s enthusiasm along with the speed of quality releases have kept us excited and eager to see what’s next for the language.” + +### **Uber** + +Uber also has several CLI tools built in Go. Go is widely used at Uber and the company's developers like to write CLIs in the same language. Again, Go's cross compilation and built-in support for working with input/output streams and CLI parameters are key benefits. One noted instance is the CLI API for [Jaeger](https://www.jaegertracing.io/docs/1.14/cli/) backend components (as a way of configuration). The Uber CLI API supports env vars, CLI flags, and config files. + +## **How to use Go for CLIs** + +From a Windows or Mac machine, developers can build a Go program for every one of the dozens of architectures and operating systems Go supports—with no complicated build farms. No other compiled language is so readily deployed. + +When developing CLIs in Go, programmers find several tools hugely helpful: Cobra, Viper, and debugger Delve. + +[Cobra](https://github.com/spf13/cobra), for example, is both a library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go. Cobra powers CoreOS, Delve, Docker, Dropbox, Git Lfs, Hugo, Kubernetes, and many other popular apps where handlers/commands can live in separate files or modules. “It also makes documenting each command really simple,” says [Alex Ellis](https://blog.alexellis.io/5-keys-to-a-killer-go-cli/), founder of OpenFaaS. + +"Cobra is a great product to write small tools or even large ones," adds Francesc Campoy, VP of product at DGraph Labs and producer of [Just For Func videos](https://www.youtube.com/watch?v=WvWPGVKLvR4). "It's more of a framework than a library, because when you call the binary that would create a skeleton, then you would be adding code in between." + +Cobra allows developers to build command-line utilities with commands, subcommands, aliases, configuration files, etc. All Cobra projects follow the [same development cycle](https://www.linode.com/docs/development/go/using-cobra/): “You first use the Cobra tool to initialize a project, then you create commands and subcommands, and finally you make the desired changes to the generated Go source files in order to support the desired functionality.” + +"The framework Cobra provides a generator that adds some boilerplate code for you," [says Nick Geudens](https://ordina-jworks.github.io/development/2018/10/20/make-your-own-cli-with-golang-and-cobra.html), Java consultant at Ordina Belgium. "This is handy because now you can focus more on the logic of your CLI instead of figuring out how to parse flags." + +[Viper](https://github.com/spf13/viper) is a complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats. Cobra and Viper work together. + +"If you don’t want to pollute your command line, or if you’re working with sensitive data which you don’t want to show up in the history, it’s a good idea to work with environment variables. To do this, you can use Viper," [suggests Geudens](https://ordina-jworks.github.io/development/2018/10/20/make-your-own-cli-with-golang-and-cobra.html). "Cobra already uses Viper in the generated code." + +Viper [supports nested structures](https://scene-si.org/2017/04/20/managing-configuration-with-viper/) in the configuration, allowing CLI developers to manage the configuration for multiple parts of a large application. + +"I was tasked with building our CLI tool and found two really great projects, Cobra and Viper, which make building CLI’s easy," [explains Steve Domino](https://medium.com/@skdomino/writing-better-clis-one-snake-at-a-time-d22e50e60056), senior engineer and architect at Strala. "Individually they are very powerful, very flexible and very good at what they do. But together they will help you show your next CLI who is boss!" + +For debugging Go code, [Delve](https://github.com/go-delve/delve) is a simple and powerful tool built for programmers used to using a source-level debugger in a compiled language. + +## **Go solutions to legacy challenges** + +CLIs face certain challenges in development and distribution. For example, porting CLIs across operating systems can be difficult with dependencies and often very large binary files. Speed can likewise be a challenge—compiling, loading, or executing—as can creating REST clients for HTTP, XML, and JSON. + +Go rises above all these challenges. + +Again, programs written in Go run on any system without requiring any existing libraries, runtimes, or dependencies. Ellis summarizes [why Go is best for CLIs](https://blog.alexellis.io/5-keys-to-a-killer-go-cli/): because Go compiles to a single static binary, Go's consistent style is unambiguous and easy for on-boarding, Go loads fast on every platform, and Go makes it easy to create REST clients. + +While CLIs do not have graphical user interfaces, the UNIX philosophy that drives them suggests that they be simple, clear, composable, extensible, modular, and small. Go delivers all six elements. With Go, initialization is expressive, automatic, and easy to use. Syntax is clean and light on keywords. Go combines the ease of programming in an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. And goroutines have little overhead beyond the memory for the stack (which is just a few kilobytes). + +"There are many reasons to use Go to build your next killer CLI," [concludes Ellis](https://blog.alexellis.io/5-keys-to-a-killer-go-cli/). "From the speed of compilation and execution, the availability of built-in or high-quality packages, to the ease of automation." + +## **Resources for learning more** + +* [Cobra](https://github.com/spf13/cobra) - Commander for modern Go CLI interactions +* [Viper](https://github.com/spf13/viper) - Go configuration with fangs +* [Delve](https://github.com/derekparker/delve) - Go debugger +* [Readline](https://github.com/chzyer/readline) - pure Golang implementation that provides most features in GNU(under MIT license) +* [wmenu](https://github.com/dixonwille/wmenu) - easy-to-use menu structure for CLI applications that prompts users to make choices +* [pflag](https://github.com/spf13/pflag) - drop-in replacement for Go's flag package, implementing POSIX/GNU-style flags \ No newline at end of file diff --git a/go.dev/content/solutions/cloud/index.md b/go.dev/content/solutions/cloud/index.md index a6e17cad..3d347ab8 100644 --- a/go.dev/content/solutions/cloud/index.md +++ b/go.dev/content/solutions/cloud/index.md @@ -1,7 +1,7 @@ --- title: "Go for Cloud & Network Services" linkTitle: "Cloud & Network Services" -description: "Go was created to address concurrency needs seen across large systems and in cloud development. With a strong ecosystem of tools supporting service development, Go APIs on major cloud providers, and a variety of popular open source libraries it is easier than ever to build services with Go." +description: "With a strong ecosystem of tools and APIs on major cloud providers, it is easier than ever to build services with Go." date: 2019-10-04T15:26:31-04:00 series: Use Cases resources: @@ -15,138 +15,88 @@ resources: alt: globe --- -### _Go Helps Enterprises Build and Scale Cloud Computing Systems_ +### _Go helps enterprises build and scale Cloud Computing systems_ -## **Why Use Go for Cloud Computing** +## **Why use Go for Cloud Computing** -As applications and processing move to the cloud, concurrency becomes a very big issue. Cloud computing systems, by -their very nature, share and scale resources. Coordinating access to shared resources is an issue that impacts every -application processing in the cloud, and requires programming languages “[explicitly geared to develop highly reliable -concurrent applications](https://tomassetti.me/best-programming-languages/).” +As applications and processing move to the cloud, concurrency becomes a very big issue. Cloud computing systems, by their very nature, share and scale resources. Coordinating access to shared resources is an issue that impacts every application processing in the cloud, and requires programming languages “[explicitly geared to develop highly reliable concurrent applications](https://tomassetti.me/best-programming-languages/).” + +Go was created to address exactly these concurrency needs for scaled applications, microservices, and cloud development. In fact, over 75 percent of projects in the Cloud Native Computing Foundation ([CNCF](https://www.cncf.io/projects/)) are written in Go. -Go was created to address exactly these concurrency needs for scaled applications, microservices, and cloud development. -In fact, over 75 percent of projects in the Cloud Native Computing Foundation ([CNCF](https://www.cncf.io/projects/)) -are written in Go. +“Go makes it very easy to scale as a company,” [says developer Ruchi Malik](https://builtin.com/software-engineering-perspectives/golang-advantages) at Choozle. “This is very important because, as our engineering team grows, each service can be managed by a different unit.” -## **Who Uses Go for Cloud Computing** +## **Who uses Go for Cloud Computing** ### **American Express** -American Express uses Go to improve microservices and speed cloud development productivity. Go began at American Express -with the efforts of the payment processing platform team, focused on microservices, transaction routing, and load -balancing. By leveraging goroutines, the payment processing team has seen improved performance numbers in its real-time -transaction processing, and validated Go’s garbage collection as a huge improvement over other languages. +American Express uses Go to improve microservices and speed cloud development productivity. Go began at American Express with the efforts of the payment processing platform team, focused on microservices, transaction routing, and load balancing. By leveraging goroutines, the payment processing team has seen improved performance numbers in its real-time transaction processing, and validated Go’s garbage collection as a huge improvement over other languages. Today, American Express also uses Go via: -* Docker—a SaaS product, written in Go, that uses operating system level virtualization to develop and deliver -* software in containers hosted on a Docker Engine Kubernetes—an open-source container-orchestration system, written -* in Go, that follows a primary/replica architecture across clusters of American Express hosts Prometheus—an -* open-source software application written in Go used for real-time event monitoring and alerting +* [Docker](https://www.docker.com/)—a SaaS product, written in Go, that uses operating system level virtualization to develop and deliver software in containers hosted on a Docker Engine +* [Kubernetes](https://kubernetes.io/)—an open-source container-orchestration system, written in Go, that follows a primary/replica architecture across clusters of +* [Prometheus](https://prometheus.io/)—an open-source software application written in Go used for real-time event monitoring and alerting -This triumvirate of Go solutions has helped modernize American Express’s infrastructure and opened the door for Go as a -key player in the American Express payment ecosystem. +This triumvirate of Go solutions has helped modernize American Express’s infrastructure and opened the door for Go as a key player in the American Express payment ecosystem. ### **AT&T** -Within AT&T's DirectTV division, a microservices development team oversees VUD monitoring and analytics for the video -ingestion pipeline as it comes in from content providers. The team builds small microservices in Go as monitoring -points, checking when video content goes from one state to another throughout their system. Being able to re-write old -microservices in a cloud-friendly language like Go delivered a tremendous development cost-savings to AT&T. The team -also developed a Go SDK to support future Go development on AT&T's platform. - -The DirecTV division also hosts Kubernetes themselves and are looking at Knative (a Kubernetes-based platform to build, -deploy, and manage modern serverless workloads). +Within AT&T's DirectTV division, a microservices development team oversees VUD monitoring and analytics for the video ingestion pipeline as it comes in from content providers. The team builds small microservices in Go as monitoring points, checking when video content goes from one state to another throughout their system. Being able to rewrite old microservices in a cloud-friendly language like Go delivered a tremendous development cost-savings to AT&T. The team also developed a Go SDK to support future Go development on AT&T's platform. + +The DirecTV division also hosts Kubernetes themselves and are looking at Knative (a Kubernetes-based platform to build, deploy, and manage modern serverless workloads). ### **Dropbox** -Dropbox decided to migrate its performance-critical backends from Python to Go to leverage better concurrency support -and faster execution speed. Go delivers better performance for Dropbox engineering teams, making them more productive -with a standard library, debugging tools that work, and proving it is easier to both write and consume services in Go. - -Today, Dropbox has over 500 million users and most of the company's infrastructure is written in Go—over 1.3 million -lines of Go and every Dropbox engineer hired goes through Go training during onboarding. +Dropbox was built on Python, [but in 2013 decided to migrate](https://blogs.dropbox.com/tech/2014/07/open-sourcing-our-go-libraries/) their performance-critical backends to Go. Dropbox developers wanted better concurrency support and faster execution speeds, and were willing to write around 200,000 lines of new Go code. Dropbox has since built many open-source libraries to support large-scale production systems, including libraries for caching, errors, database/sqlbuilder, and hash2. + +Today, Dropbox has over 500 million users and most of the company's infrastructure is written in Go—over 1.3 million lines of Go and every Dropbox engineer hired goes through Go training during onboarding. Dropbox libraries can be found at [Dropbox's Go github](https://github.com/dropbox/godropbox). ### **MercadoLibre** -MercadoLibre uses Go to scale its eCommerce empire. Go produces efficient code that readily scales as MercadoLibre’s -online commerce grows and supports the company as a boon for developers—improving their productivity while streamlining -and expanding MercadoLibre services. - -Go started with the core APIs team, which builds and maintains the largest APIs at the center of MercadoLibre’s -microservices solutions. The API team converted their architecture to Go to great performance benefits, and one large Go -program is now able to run 100,000 requests per machine with just 24 megabytes of memory. - -MercadoLibre leverages Go’s expressive and clean syntax to make it easier for developers to write programs that get the -most out of the company’s multicore and networked machines. And while speed in development yields cost efficiency for -the company, developers individually benefit from the swift learning curve Go delivers. Not only are MercadoLibre's very -experienced developers able to build highly critical applications very, very quickly with Go, but even new programmers -have been able to produce significant solutions. - -## **How to Use Go for Cloud Computing** - -Go's strengths shine when it comes to building services. Its speed and built-in support for concurrency result in fast -and efficient services, while static typing, robust tooling, and emphasis on simplicity and readability help build -reliable and maintainable code. - -Go has a strong ecosystem supporting service development. The[ standard library](https://golang.org/pkg/) includes -packages for common needs like HTTP servers and clients, JSON/XML parsing, SQL databases, and a range of -security/encryption functionality, while the Go runtime includes tools for[ race -detection](https://golang.org/doc/articles/race_detector.html),[ -benchmarking](https://golang.org/pkg/testing/#hdr-Benchmarks)/profiling, code generation, and static code analysis. - -The major Cloud providers ([GCP](https://cloud.google.com/go/home),[ AWS](https://aws.amazon.com/sdk-for-go/),[ -Azure](https://docs.microsoft.com/en-us/azure/go/)) have Go APIs for their services, and popular open source libraries -provide support for API tooling ([Swagger](https://github.com/go-swagger/go-swagger)), transport ([protocol -buffers](https://github.com/golang/protobuf),[ gRPC](https://grpc.io/docs/quickstart/go/)), monitoring -([OpenCensus](https://godoc.org/go.opencensus.io)), Object-Relational Mapping ([gORM](https://gorm.io/)), and -authentication ([JWT](https://github.com/dgrijalva/jwt-go)). The open source community has also provided several service -frameworks, including[ Go Kit](https://gokit.io/),[ Go Micro](https://micro.mu/docs/go-micro.html), and[ -Gizmo](https://github.com/nytimes/gizmo), which can be a great way to get started quickly. - -Service developers often make a tradeoff between development cycle time and server performance. Go's fast build times -make iterative development possible, while still yielding the benefits of fast compiled code. Plus, Go servers tend to -have lower memory and CPU utilization, making them cheaper to run in pay-as-you-go deployments - -Overall, Go's mission to make it easy to write simple, reliable, and efficient software means it is a great choice for -developing services. - -## **Go Solutions to Legacy Challenges** - -Historically, challenges facing cloud computing systems have included the need for highly concurrent and distributed -processing, multi-nodes and multi-cores, the lack of shared memory, and the very major bottleneck of single-threaded -applications. - -Further, cloud engineering teams want to be able to develop cloud applications locally, they want to be able to develop -cross-cloud applications with a simple idiomatic interface, and they want to be able to run both on-premises and on the -cloud. - -"Go was designed to be scalable to large systems and usable without an IDE, but also productive and being especially -good at networking and concurrency," notes Federico Tomassetti in his[ -blog](https://tomassetti.me/best-programming-languages/). "Other than a well-thought design, it has some specific -features for concurrency like a type of light-weight processes called goroutines." - -Goroutines do not have names; they are just anonymous workers. They expose no unique identifier, name, or data structure -to the programmer. Some people are surprised by this, expecting the go statement to return some item that can be used to -access and control the goroutine later. - -The fundamental reason goroutines are anonymous is so that the full Go language is available when programming concurrent -code. By contrast, the usage patterns that develop when threads and goroutines are named can restrict what a library -using them can do. - -For example, once one names a goroutine and constructs a model around it, it becomes special, and one would be tempted -to associate _all_ computation with that goroutine—ignoring the possibility of using multiple, possibly shared -goroutines for the processing. If the net/http package associated per-request state with a goroutine, clients would be -unable to use more goroutines when serving a request. - -Go solves the problems of modern cloud development, delivering a standard idiomatic APIs designed around user needs, -plus out-of-the-box support for multiple cloud environments (including on-premises), the ability to write and test -locally (run in production), and open cloud development . . . granting development teams the power to choose and the -power to move. +MercadoLibre uses Go to scale its eCommerce empire. Go produces efficient code that readily scales as MercadoLibre’s online commerce grows and supports the company as a boon for developers—improving their productivity while streamlining and expanding MercadoLibre services. + +Go started with the core APIs team, which builds and maintains the largest APIs at the center of MercadoLibre’s microservices solutions. With Go, MercadoLibre’s build times are three times (3x) faster and their test suite runs an amazing 24 times faster. This means the company’s developers can make a change, then build and test that change much faster than they could before. And dropping MercadoLibre’s test suite runtimes from 90-seconds to just 3-seconds with Go was a huge boon for its developers—allowing them to keep focus (and context) while the much faster tests complete. + +MercadoLibre leverages Go’s expressive and clean syntax to make it easier for developers to write programs that get the most out of the company’s multicore and networked machines. And while speed in development yields cost efficiency for the company, developers individually benefit from the swift learning curve Go delivers. Not only are MercadoLibre's very experienced developers able to build highly critical applications very, very quickly with Go, but even new programmers have been able to produce significant solutions. + +## **How to use Go for Cloud Computing** + +Go's strengths shine when it comes to building services. Its speed and built-in support for concurrency results in fast and efficient services, while static typing, robust tooling, and emphasis on simplicity and readability help build reliable and maintainable code. + +Go has a strong ecosystem supporting service development. The [standard library](https://golang.org/pkg/) includes packages for common needs like HTTP servers and clients, JSON/XML parsing, SQL databases, and a range of security/encryption functionality, while the Go runtime includes tools for [race detection](https://golang.org/doc/articles/race_detector.html), [benchmarking](https://golang.org/pkg/testing/#hdr-Benchmarks)/profiling, code generation, and static code analysis. + +Two popular Go tools for cloud computing include Docker and Kubernetes: + +**Docker is a platform-as-a-service that delivers software in containers.** Containers bundle software, libraries, and config files, are hosted by a [Docker Engine](https://www.docker.com/), and are run by a single operating-system kernel (utilizing less system resources than virtual machines). + +Cloud developers use Docker to manage their Go code and support multiple platforms, as Docker supports the development workflow and deployment process. “Docker can help us to compile Go code in a clean, isolated environment,” [writes Jérôme Petazzoni](https://www.docker.com/blog/docker-golang/), founder of Tiny Shell Script. “To use different versions of the Go toolchain; and to cross-compile between different operating systems and platforms.” + +**Kubernetes is an open-source container-orchestration system, written in Go, for automating web app deployment.** Web apps are often built using containers (as noted above) packaged with their dependencies and configurations. Kubernetes helps deploying and managing those containers at scale. Cloud programmers use Kubernetes to build, deliver, and scale containerized apps quickly—managing the growing complexity via APIs that controls how the containers will run. + +The major Cloud providers ([GCP](https://cloud.google.com/go/home), [AWS](https://aws.amazon.com/sdk-for-go/), [Azure](https://docs.microsoft.com/en-us/azure/go/)) have Go APIs for their services, and popular open source libraries provide support for API tooling ([Swagger](https://github.com/go-swagger/go-swagger)), transport ([protocol buffers](https://github.com/golang/protobuf), [gRPC](https://grpc.io/docs/quickstart/go/)), monitoring ([OpenCensus](https://godoc.org/go.opencensus.io)), Object-Relational Mapping ([gORM](https://gorm.io/)), and authentication ([JWT](https://github.com/dgrijalva/jwt-go)). The open source community has also provided several service frameworks, including [Go Kit](https://gokit.io/[), [Go Micro](https://micro.mu/docs/go-micro.html), and [Gizmo](https://github.com/nytimes/gizmo), which can be a great way to get started quickly. + +Service developers often make a tradeoff between development cycle time and server performance. Go's fast build times make iterative development possible, while still yielding the benefits of fast compiled code. Plus, Go servers tend to have lower memory and CPU utilization, making them cheaper to run in pay-as-you-go deployments. + +Overall, Go's mission to make it easy to write simple, reliable, and efficient software means it is a great choice for developing services. + +## **Go solutions to legacy challenges** + +Historically, challenges facing cloud computing systems have included the need for highly concurrent and distributed processing, multi-nodes and multi-cores, the lack of shared memory, and the very major bottleneck of single-threaded applications. + +Further, cloud engineering teams want to be able to develop cloud applications locally, they want to be able to develop cross-cloud applications with a simple idiomatic interface, and they want to be able to run both on-premise and on the cloud. + +"Go was designed to be scalable to large systems and usable without an IDE, but also productive and being especially good at networking and concurrency," notes Federico Tomassetti in his [blog](https://tomassetti.me/best-programming-languages/). "Other than a well-thought design, it has some specific features for concurrency like a type of light-weight processes called goroutines." + +Goroutines do not have names; they are just anonymous workers. They expose no unique identifier, name, or data structure to the programmer. Some people are surprised by this, expecting the go statement to return some item that can be used to access and control the goroutine later. + +The fundamental reason goroutines are anonymous is so that the full Go language is available when programming concurrent code. By contrast, the usage patterns that develop when threads and goroutines are named can restrict what a library using them can do. + +For example, once one names a goroutine and constructs a model around it, it becomes special, and one would be tempted to associate _all_ computation with that goroutine—ignoring the possibility of using multiple, possibly shared goroutines for the processing. If the net/http package associated per-request state with a goroutine, clients would be unable to use more goroutines when serving a request. + +Go solves the problems of modern cloud development, delivering a standard idiomatic APIs designed around user needs, plus out-of-the-box support for multiple cloud environments (including on-premises), the ability to write and test locally (run in production), and open cloud development - granting development teams the power to choose and the power to move. ## **Resources for Learning More** -* Go.dev (when it’s live) -* http://linuxgizmos.com/latest-edgex-iot-middleware-release-gets-smaller-faster-and-more-secure/ or similar? -* https://ewanvalentine.io/microservices-in-golang-part-1/ (through part 10) is a pretty nice walk-through of Go with -* microservices (using go-micro). Do we want to cite? Similarly,[ https://awesome-go.com/](https://awesome-go.com/) +* [EdgeX](http://linuxgizmos.com/latest-edgex-iot-middleware-release-gets-smaller-faster-and-more-secure/) - IoT Middleware +* [Microservices in Golang](https://ewanvalentine.io/microservices-in-golang-part-1/) - walkthrough of microservices with Go-micro +* [Awesome Go](https://awesome-go.com/) - curated list of Go frameworks, libraries, and software diff --git a/go.dev/content/solutions/devops/index.md b/go.dev/content/solutions/devops/index.md index 17b33c52..68a194b0 100644 --- a/go.dev/content/solutions/devops/index.md +++ b/go.dev/content/solutions/devops/index.md @@ -1,7 +1,7 @@ --- title: "Go for Development Operations & Site Reliability Engineering (SRE)" linkTitle: "DevOps & Site Reliability" -description: "With fast build times and lean syntax, Go is built to support both DevOps and SRE. From Go’s extensive standard library, to its automatic formatter (gofmt) and automatic document generator (godoc), Go provides a wide range of tools to support software and systems of any scope." +description: "With fast build times, lean syntax, an automatic formatter and doc generator, Go is built to support both DevOps and SRE." date: 2019-10-03T17:16:43-04:00 series: Use Cases resources: @@ -15,10 +15,10 @@ resources: alt: cog --- -### _Go Helps Enterprises Automate and Scale for CI/CD_ +### _Go helps enterprises automate and scale for CI/CD_ -## **Why Use Go for DevOps & SRE** +## **Why use Go for DevOps & SRE** Development Operations (DevOps) teams help engineering organizations automate tasks and improve their continuous integration and continuous delivery and deployment (CI/CD) process. DevOps can topple developmental silos and implement @@ -39,7 +39,7 @@ Go serves both siblings, DevOps and SRE, with its fast build times and lean synt scaling for speed and code maintainability as development infrastructure grows over time. -## **Who Uses Go for DevOps & SRE** +## **Who uses Go for DevOps & SRE** ### **Docker** @@ -96,7 +96,7 @@ syntax. It leverages execution plans and resource graphs to automate changes to interaction. -## **How to Use Go for DevOps & SRE** +## **How to use Go for DevOps & SRE** Go has been enthusiastically adopted by the DevOps and SRE communities. As previously noted, many underpinnings of the modern cloud environment are themselves written in Go—including Docker, Etcd, Istio, Kubernetes, Prometheus, Terraform, @@ -107,43 +107,30 @@ and many others. [can we say that Google has switched to recommend Go for all new SRE code?] DevOps/SRE teams write software ranging from small one-time scripts, to command-line interfaces (CLI), to complex -automation and services where Go excels for all of them: +automation and services where Go excels for all of them. +**For small scripts:** Go's fast build times and automatic formatter ([gofmt](https://golang.org/cmd/gofmt/)) enable rapid iteration. Go’s extensive standard library—including packages for common needs like HTTP, file I/O, time, regular expressions, exec, and JSON/CSV formats—lets DevOps/SREs get right into their business logic. Plus, Go's static type system and explicit error handling make even small scripts more robust. +**For CLIs:** every site reliability engineer has written “one-time use” scripts that turned into CLIs used by dozens of other engineers every day. And small deployment automation scripts turn into rollout management services. With Go, DevOps/SREs are in a great position to be successful when software scope inevitably creeps. -* For small scripts, Go's fast build times and automatic formatter (gofmt) enable rapid iteration. Go’s extensive -* standard library—including packages for common needs like HTTP, file I/O, time, regular expressions, exec, and -* JSON/CSV formats—lets DevOps/SREs get right into their business logic. Plus, Go's static type system and explicit -* error handling make even small scripts more robust. For CLIs, every site reliability engineer has written “one-time -* use” scripts that turned into CLIs used by dozens of other engineers every day. And small deployment automation -* scripts turn into rollout management services. With Go, DevOps/SREs are in a great position to be successful when -* software scope inevitably creeps. For larger applications, Go's garbage collector means DevOps/SRE teams don't have -* to worry about memory management. And Go’s automatic documentation generator (godoc) makes code self-documenting. - - +**For larger applications:** Go's garbage collector means DevOps/SRE teams don't have to worry about memory management. And Go’s automatic documentation generator (godoc) makes code self-documenting. With Go, DevOps/SREs seek to “balance the risk of unavailability with the goals of rapid innovation and efficient service operations,"[ says Marc Alvidrez](https://landing.google.com/sre/), engineer at Google. "So that users’ overall happiness—with features, service, and performance—is optimized." -[Robert van Gent notes that he’s not sure what to put here for "key solutions" other than linkifying some of the things -like gofmt, godoc, standard library pkgs. The range of software here is large and overlaps with CLIs and Services.] - - -## **Go Solutions to Legacy Challenges** +## **Go solutions to legacy challenges** Traditionally, “DevOps has been more about collaboration between developer and operations. It has also focused more on deployments,"[ says Matt Watson](https://stackify.com/site-reliability-engineering/), founder and CEO of Stackify. "Site reliability engineering is more focused on operations and monitoring. Depending on how you define DevOps, it could be related or not." - - Across deployment, operations, and monitoring, DevOps/SRE teams strive to achieve simplicity, reliability, and speed -with their systems. But in complex development environments, such disparate goals are hard to unite. Go helps by -allowing engineers to focus on_ building_, even as they optimize for deployment and support. +with their systems. But in complex development environments, such disparate goals are hard to unite. - +**Go helps by +allowing engineers to focus on building**, even as they optimize for deployment and support. For simplicity, Go delivers code readability, built in testing/profiling/benchmarking, a standard library, and a homogenous environment—statically linked—[ meaning](https://blog.gopheracademy.com/advent-2018/go-devops/) “there’s no @@ -174,8 +161,11 @@ Many of the modern tooling apps, for DevOps/SRE and for observability, are writt -* [Grafana](https://grafana.com/) [Helm](https://helm.sh/) for Kubernetes [Istio](https://istio.io/) -* [Jaeger](https://www.jaegertracing.io/) [The Open Tracing Project](https://opentracing.io/) +* [Grafana](https://grafana.com/) +* [Helm](https://helm.sh/) +* [Istio](https://istio.io/) +* [Jaeger](https://www.jaegertracing.io/) +* [The Open Tracing Project](https://opentracing.io/) @@ -184,8 +174,6 @@ release software faster and more reliably. Scaling infrastructure and developmen technology firms today, and Go is the right language for enterprises looking to scale successfully. -## **Resources for Learning More** - - +## **Resources for learning more** -* Go.dev (when it’s live) https://github.com/golang-migrate/migrate +* [Migrate](https://github.com/golang-migrate/migrate) - database migration tool written in Go diff --git a/go.dev/content/solutions/webdev/globe-white.png b/go.dev/content/solutions/webdev/globe-white.png new file mode 100644 index 00000000..2f22bf20 Binary files /dev/null and b/go.dev/content/solutions/webdev/globe-white.png differ diff --git a/go.dev/content/solutions/webdev/globe.png b/go.dev/content/solutions/webdev/globe.png new file mode 100644 index 00000000..bf497235 Binary files /dev/null and b/go.dev/content/solutions/webdev/globe.png differ diff --git a/go.dev/content/solutions/webdev/index.md b/go.dev/content/solutions/webdev/index.md new file mode 100644 index 00000000..fca9593c --- /dev/null +++ b/go.dev/content/solutions/webdev/index.md @@ -0,0 +1,126 @@ +--- +title: "Go for Web Development" +linkTitle: "Web Development" +description: "With enhanced memory performance and support for several IDEs, Go powers fast and scalable web applications." +date: 2019-10-04T15:26:31-04:00 +series: Use Cases +resources: +- name: icon + src: globe.png + params: + alt: globe +- name: icon-white + src: globe-white.png + params: + alt: globe +--- + +### _Go delivers speed, concurrency, and developer-friendly tools for Web Applications_ + +## **Why use Go for Web Development** + +Go is designed to enable developers to rapidly develop scalable web applications. Go ships with an easy to use, secure and performant web server and includes it own web templating library. Go has excellent support for all of the latest technologies from HTTP/2, to databases like MySQL and MongoDB and ElasticSearch, to the latest encryption standards. Go applications run well on the Google App Engine (for easy hosting) or on any environment, cloud, or operating system thanks to Go’s portable nature. + +"Go Language is the easiest language that I’ve ever seen and used," [writes Tigran Bayburtsyan](https://hackernoon.com/5-reasons-why-we-switched-from-python-to-go-4414d5f42690), co-founder and CTO at Hexact. "For me, Go is easier to learn than even JavaScript." + +Bayburtsyan summarizes the five key reasons his company switched to Go: + +1. **Compiles into a single binary**—“Using static linking, Go actually combining all dependency libraries and modules into one single binary file based on OS type and architecture.” + +2. **Static type system**—“Type system is really important for large scale applications.” + +3. **Performance**—“Go performed better because of its concurrency model and CPU scalability. Whenever we need to process some internal request, we are doing it with separate Goroutines which are 10x cheaper in resources than Python Threads.” + +4. **No need for a web framework**—“In most of the cases you really don’t need any third-party library.” + +5. **Great IDE support and debugging**—“After rewriting all projects to Go, we got 64 percent less code than we had earlier.” + +For enterprises, Go is preferred for providing rapid cross-platform deployment. With its goroutines, native compilation, and the URI-based package namespacing, Go code executes to a single, small binary—with zero dependencies—making it very fast. + +Sau Sheong Chang, CEO at Singapore Power, wrote Go Web Programming, in which he [champions Go](https://www.amazon.com/s?k=9781617292569&i=stripbooks&linkCode=qs) for handling the demands of scalable, high-performance web applications. “Go is statically typed and easy to learn, with strong integrated development environment (IDE) support and debugging.” + +Go syntax keeps code readable and compact. “Most of the features of Go and its tools follow the UNIX pattern,” adds [eduCBA](https://www.educba.com/python-vs-go/) (Corporate Bridge Consultancy). “So instead of merging into the language structure, a developer can now focus more on the development logic.” + +“If you are looking for powerful tools for web programming, mobile development, microservices, and ERP systems,” [writes Andrew Smith](https://dzone.com/articles/golang-web-development-better-than-python), marketing manager at QArea. “Go web development has proved to be faster than using Python for the same kind of tasks in many use cases.” + +## **Who uses Go for Web Development** + +### **eBay** + +eBay uses Go to build web services quickly. Programmers claim web services can be developed in as little as 20 minutes (or, with [gRPC](https://grpc.io/), 60 minutes). Web developers at eBay like that they can use command line tools to do more than other languages—for example, deploying to a Linux server very quickly. And Go is prized for database access, as anything that requires an async process or job is incredibly simple to do with Go. + +### **GOV.UK** + +GOV.UK made the decision to develop in Go back in 2013. The simplicity and safety of the Go language were a good fit for a core component of their HTTP infrastructure, and some brief experiments with the excellent net/http package convinced web developers they were on the right track. “In particular, Go’s concurrency model makes it absurdly easy to build performant I/O-bound applications,” note Nick Stenning and James Stewart in their [Technology in Government blog](https://technology.blog.gov.uk/2013/12/05/building-a-new-router-for-gov-uk/). + +### **Let's Encrypt** + +Let’s Encrypt is a free, automated, and open Certificate Authority run by the non-profit Internet Security Research Group (ISRG). The CA's [website](https://letsencrypt.org/) is powered by Hugo—a static site generator written in Go. Plus, for web services written in Go (using the built-in Go web server), Let's Encrypt allows web developers to serve pages over HTTPS with quick and minimal setup. + +### **Uber** + +[In early 2015](https://eng.uber.com/go-geofence/), Uber leveraged Go to build a microservice for their geofence lookups. At Uber, a geofence refers to a human-defined geographic area on the Earth’s surface, and Uber uses geofences to show its users which products are available at a given location, to define areas with specific requirements such as airports, and to implement dynamic pricing in areas where many people are requesting rides at the same time. By 2016, this service was Uber’s highest queries per second (QPS) service out of the hundreds they run in production—thanks to Go helping them build and scale it so fast. + +## **How to use Go for Web Development** + +Web developers can use Go to build web applications from scratch—from basic web servers to robust web applications. Using MVC (model-view-controller) and REST for advanced design, web developers leverage Go to create HTML pages with dynamic content, custom dashboards, galleries, and images tailored to individual users. Go delivers an authentication system with hashed passwords and user session, plus processes to normalize and validate data before saving to a database. + +Go runs on FreeBSD, Linux, OS X, or Windows machines. An online course dedicated to web development tips can be found at https://www.usegolang.com + +**Hugo is the world’s fastest framework for building websites.** It is a static site generator, written in Go, that works on macOS, Windows, Linux, FreeBSD, and other operating systems. Hugo is today one of the most popular open-source site generators, providing speed and flexibility to [make building websites fun again](https://gohugo.io/). + +Web developers prefer Hugo because it is completely cross platform, renders changes on the fly as they are developed, can be hosted anywhere, and includes customizable themes/templates for rapid deployment. + +Other popular web development tools include: + +* [Bleve](http://blevesearch.com/), full-text search and indexing for Go, providing a simple top-level API to index any object in the data model and override default mapping to customize behavior. + +* [Buffalo](https://gobuffalo.io/en/), for rapid web development in Go. While Buffalo can be considered as a framework, it's mostly an ecosystem of Go and Javascript libraries curated to fit together. +* [CockroachDB](https://www.cockroachlabs.com/), an evolution of the database—architected for the cloud to deliver resilient, consistent, distributed SQL at scale. + +* [Echo](https://echo.labstack.com), a high performance, extensible, and minimalist Go web framework providing optimized HTTP router, group APIs, data binding for JSON and XML, HTTP/2 support, and much more. +* [Flamingo](https://www.flamingo.me), a fast open-source framework based on Go with clean and scalable architecture designed to build custom, fast and flexible frontend interfaces. Includes Flamingo Core and Flamingo Commerce. +* [GopherJS](https://github.com/gopherjs/gopherjs), a compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers. +* [Gorilla](http://www.gorillatoolkit.org/), a web toolkit for the Go programming language. Packages include a powerful URL router and dispatcher, context, RPC, schema, sessions, websocket, and more. + +Behind these tools, Go 1.13 was [released in September 2019](https://blog.golang.org/go1.13). Go 1.13 enables support for TLS 1.3 in the crypto/TLS package, its latest compiler has a new implementation of escape analysis that is more precise (i.e., more Go variables and expressions allocated on the stack instead of heap), and the Go runtime is now more aggressive with returning memory to the operating system to make it available to co-tenant applications. + +## **Go solutions to legacy challenges** + +A common pattern for web developers is to use Go to build clean, fast-functioning APIs and then use a front-end stack to build the user interface. + +Go is [ideal for tackling some consistent challenges](https://www.udemy.com/course/go-for-web-development/) faced by web developers, including: + +* Getting a web server up and running quickly with Go’s standard library +* Designing a UI with Go’s multiple template engines for improved flexibility +* Calling on the services of an external API +* Incorporating web middleware +* Using AJAX requests to build web applications +* Integrating Gorilla/MUX for route handling +* Creating users securely by using bcrypt to hash user passwords + +In quick comparison, while Node.js often presents type issues and weird conversions, memory leaks, and logic bugs, Go is much easier for web developers to learn, brings a very low memory footprint, readily scales, provides fantastic profiling tools (to find CPU and memory leaks), and simple concurrency with channels that are much more efficient than async/await. + +Similarly, Python struggles with concurrency and scaling, and is not the fastest language for performance. Whereas Go provides concurrent process channeling for concurrency, is compiled to a tiny binary for scale, and "[trumps Python when it comes to performance](https://dzone.com/articles/golang-vs-python-which-one-to-choose)" in both memory usage and time spent solving complex functions. + +## **Books on Go for Web Development** + +* [Web Programming by San Sheong Chang](https://www.amazon.com/Web-Programming-Sau-Sheong-Chang/dp/1617292567) +* [Web Development Cookbook: Build full-stack web applications with Go](https://www.amazon.com/Web-Development-Cookbook-full-stack-applications-ebook/dp/B077TVQ28W) +* [Building RESTful Web services with Go](https://www.amazon.com/Building-RESTful-Web-services-gracefully-ebook/dp/B072QB8KL1) +* [Web Development with Go](https://www.amazon.com/Web-Development-Go-Building-Scalable-ebook/dp/B01JCOC6Z6) +* [Mastering Go Web Services](https://www.amazon.com/Mastering-Web-Services-Nathan-Kozyra-ebook/dp/B00W5GUKL6) + +## **Popular frameworks for Go** + +* [Gorilla](http://www.gorillatoolkit.org/) +* [Gobuffalo](https://gobuffalo.io/en/) +* [Flamingo](https://www.flamingo.me/) +* [Echo](https://echo.labstack.com/) + + +## **Popular Go Web Applications** + +* [Hugo](https://gohugo.io/) +* [Mattermost](https://mattermost.com/) +* [Caddy](https://caddyserver.com/) \ No newline at end of file diff --git a/go.dev/data/learn/courses.yaml b/go.dev/data/learn/courses.yaml index 63f6af11..f81a978e 100644 --- a/go.dev/data/learn/courses.yaml +++ b/go.dev/data/learn/courses.yaml @@ -5,9 +5,9 @@ links: - title: Exercism.io url: https://exercism.io/tracks/go thumbnail: /images/learn/exercism.png - - title: Google Codelabs + - title: Google Developers Codelabs url: https://codelabs.developers.google.com/codelabs/cloud-functions-go-http/#0 - thumbnail: /images/learn/codelabs.png + thumbnail: /images/learn/codelabs_2.png - title: Gophercises url: https://gophercises.com/ thumbnail: /images/learn/gophercises_1.png diff --git a/go.dev/data/learn/guidedLearning.yaml b/go.dev/data/learn/guidedLearning.yaml index 19e74436..720c027a 100644 --- a/go.dev/data/learn/guidedLearning.yaml +++ b/go.dev/data/learn/guidedLearning.yaml @@ -1,16 +1,21 @@ links: - title: Web Dev + description: Hello World tutorial for building web applications in Go. url: https://gowebexamples.com - thumbnail: + thumbnail: /images/learn/helloworld.png - title: Cloud / Services / APIs + description: Introduction to building applications locally and deploying them on cloud providers using the Go Cloud Development Kit. url: https://gocloud.dev/tutorials/ - thumbnail: + thumbnail: /images/learn/go_cdk_logo.png - title: CLIs + description: A guided workshop on building command-line interfaces with Go. url: https://spf13.com/presentation/building-an-awesome-cli-app-in-go-oscon/ - thumbnail: + thumbnail: - title: New to Coding + description: A video tutorial that aims to cover the various fundamentals of Go. url: https://www.youtube.com/watch?v=Q0sKAMal4WQ thumbnail: - title: Go by Example + description: Go by Example is a hands-on introduction to Go using annotated example programs. url: https://gobyexample.com/ thumbnail: diff --git a/go.dev/data/learn/quickstart.yaml b/go.dev/data/learn/quickstart.yaml index 424a3ea2..b89ea3e6 100644 --- a/go.dev/data/learn/quickstart.yaml +++ b/go.dev/data/learn/quickstart.yaml @@ -1,7 +1,7 @@ links: - title: Installing Go url: https://golang.org/doc/install - thumbnail: + thumbnail: - title: Hello World url: https://play.golang.org thumbnail: diff --git a/go.dev/themes/default/static/images/learn/codelabs.png b/go.dev/themes/default/static/images/learn/codelabs.png new file mode 100644 index 00000000..0a2a56c5 Binary files /dev/null and b/go.dev/themes/default/static/images/learn/codelabs.png differ diff --git a/go.dev/themes/default/static/images/learn/codelabs_2.png b/go.dev/themes/default/static/images/learn/codelabs_2.png new file mode 100644 index 00000000..2bad1c1c Binary files /dev/null and b/go.dev/themes/default/static/images/learn/codelabs_2.png differ diff --git a/go.dev/themes/default/static/images/learn/coursera.png b/go.dev/themes/default/static/images/learn/coursera.png new file mode 100644 index 00000000..0afd6473 Binary files /dev/null and b/go.dev/themes/default/static/images/learn/coursera.png differ diff --git a/go.dev/themes/default/static/images/learn/exercism.png b/go.dev/themes/default/static/images/learn/exercism.png new file mode 100644 index 00000000..b1fb92a2 Binary files /dev/null and b/go.dev/themes/default/static/images/learn/exercism.png differ diff --git a/go.dev/themes/default/static/images/learn/go_cdk_logo.png b/go.dev/themes/default/static/images/learn/go_cdk_logo.png new file mode 100644 index 00000000..2607a203 Binary files /dev/null and b/go.dev/themes/default/static/images/learn/go_cdk_logo.png differ diff --git a/go.dev/themes/default/static/images/learn/gophercises_1.png b/go.dev/themes/default/static/images/learn/gophercises_1.png new file mode 100644 index 00000000..a1e5d6b8 Binary files /dev/null and b/go.dev/themes/default/static/images/learn/gophercises_1.png differ diff --git a/go.dev/themes/default/static/images/learn/helloworld.png b/go.dev/themes/default/static/images/learn/helloworld.png new file mode 100644 index 00000000..703625bb Binary files /dev/null and b/go.dev/themes/default/static/images/learn/helloworld.png differ -- cgit v1.3 From 557affd3ce1ca6a014873e7bd785294293cc206a Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Fri, 1 Nov 2019 16:55:26 -0400 Subject: [x/go.dev] themes/default: redirect linked pages Some of our content pages are actually links to third party sites. If someone attempts to visit the URL directly, we should redirect them to the third party site. The pages themselves do not appear in the sitemap, and shouldn't be otherwise indexed or linked to anywhere. Fixes b/143371871 Change-Id: Ie61e2fdcd4281ade2c0eec6345ebeeae535f3d6a Reviewed-on: https://team-review.git.corp.google.com/c/golang/go.dev/+/590161 CI-Result: Cloud Build Reviewed-by: Andrew Bonventre X-GoDev-Commit: a32be84ce5a13233c301ed9a470fb40793eca335 --- go.dev/themes/default/layouts/_default/baseof.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/go.dev/themes/default/layouts/_default/baseof.html b/go.dev/themes/default/layouts/_default/baseof.html index 876f786d..227c819e 100644 --- a/go.dev/themes/default/layouts/_default/baseof.html +++ b/go.dev/themes/default/layouts/_default/baseof.html @@ -15,6 +15,9 @@ {{end -}} {{$.Site.Title}} +{{if (isset .Params "link") -}} + +{{end -}}
          -- cgit v1.3 From 7cacfd22932f31f69192d3443cb3a6d0a313a911 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Mon, 4 Nov 2019 14:24:53 -0500 Subject: [x/go.dev] Add link support for pullquotes Change-Id: I6549cf2440a0c4f4116b156e769514f6c9baa4b4 X-GoDev-Commit: a780cb1c480907f48a890f1691ce10a2e0946481 --- go.dev/layouts/shortcodes/pullquote.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go.dev/layouts/shortcodes/pullquote.html b/go.dev/layouts/shortcodes/pullquote.html index d3bccbf2..e4d6e83a 100644 --- a/go.dev/layouts/shortcodes/pullquote.html +++ b/go.dev/layouts/shortcodes/pullquote.html @@ -11,7 +11,9 @@ {{end -}} {{if $author -}} {{end -}}
        -- cgit v1.3 From ea363a04ee4e90e1b04770f6daca24a32f7087e9 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Mon, 4 Nov 2019 14:25:30 -0500 Subject: [x/go.dev] Improve design & style of use cases Change-Id: Ia5a233edc889b72b4f68c2811fc334c8f8ae039a X-GoDev-Commit: cc3fb8782304d1ba09c6aa0e39d52a91c5027799 --- go.dev/content/solutions/clis/index.md | 1 + go.dev/content/solutions/webdev/index.md | 37 ++++++++++++---------- go.dev/layouts/shortcodes/mediaListBox.html | 6 ++-- go.dev/themes/default/assets/css/styles.css | 15 ++++++++- .../themes/default/static/images/logos/govuk.svg | 1 + .../static/images/logos/lets-encrypt-icon.svg | 1 + .../default/static/images/logos/lets-encrypt.svg | 1 + .../default/static/images/logos/uber-app-icon.svg | 14 ++++++++ 8 files changed, 57 insertions(+), 19 deletions(-) create mode 100644 go.dev/themes/default/static/images/logos/govuk.svg create mode 100644 go.dev/themes/default/static/images/logos/lets-encrypt-icon.svg create mode 100644 go.dev/themes/default/static/images/logos/lets-encrypt.svg create mode 100644 go.dev/themes/default/static/images/logos/uber-app-icon.svg diff --git a/go.dev/content/solutions/clis/index.md b/go.dev/content/solutions/clis/index.md index d75475d9..014213dd 100644 --- a/go.dev/content/solutions/clis/index.md +++ b/go.dev/content/solutions/clis/index.md @@ -23,6 +23,7 @@ Command line interfaces (CLIs), unlike graphical user interfaces (GUIs), use tex Developers of CLIs find Go to be ideal for designing their applications. Go compiles very quickly into a single binary, works across platforms with a consistent style, and brings a strong development community. “The design of Go lends itself incredibly well to [many] styles of application,” [writes Elliot Forbes](https://tutorialedge.net/golang/building-a-cli-in-go/), software engineer at JP Morgan Chase. “And the ability to cross-compile a binary executable for all major platforms easily is a massive win.” +{{% gopher gopher=happy align=right %}} Specifically, **programs written in Go run on any system without requiring any existing libraries, runtimes, or dependencies**. And **programs written in Go have an immediate startup time**—similar to C or C++ but unobtainable with other programming languages. These two distinguishing features ensure that installing and using a Go program is just about the easiest thing ever: Unlike Java, JavaScript, PHP, Python, Ruby, or any JVM language which all require installing the right version of interpreters/runtimes (which often conflict with the system version); and unlike C or C++ which are dynamically linked to specific versions of libraries resulting in the accurately named “dependency hell” that occurs when different programs depend on different versions of libraries. diff --git a/go.dev/content/solutions/webdev/index.md b/go.dev/content/solutions/webdev/index.md index fca9593c..d90880ca 100644 --- a/go.dev/content/solutions/webdev/index.md +++ b/go.dev/content/solutions/webdev/index.md @@ -21,20 +21,23 @@ resources: Go is designed to enable developers to rapidly develop scalable web applications. Go ships with an easy to use, secure and performant web server and includes it own web templating library. Go has excellent support for all of the latest technologies from HTTP/2, to databases like MySQL and MongoDB and ElasticSearch, to the latest encryption standards. Go applications run well on the Google App Engine (for easy hosting) or on any environment, cloud, or operating system thanks to Go’s portable nature. -"Go Language is the easiest language that I’ve ever seen and used," [writes Tigran Bayburtsyan](https://hackernoon.com/5-reasons-why-we-switched-from-python-to-go-4414d5f42690), co-founder and CTO at Hexact. "For me, Go is easier to learn than even JavaScript." +{{% pullquote author="Tigran Bayburtsyan, Co-Founder and CTO at Hexact Inc." link="https://hackernoon.com/5-reasons-why-we-switched-from-python-to-go-4414d5f42690" %}} +Go Language is the easiest language that I’ve ever seen and used... For me, Go is easier to learn than even JavaScript. +{{% /pullquote %}} Bayburtsyan summarizes the five key reasons his company switched to Go: -1. **Compiles into a single binary**—“Using static linking, Go actually combining all dependency libraries and modules into one single binary file based on OS type and architecture.” +1. **Compiles into a single binary** — “Using static linking, Go actually combining all dependency libraries and modules into one single binary file based on OS type and architecture.” -2. **Static type system**—“Type system is really important for large scale applications.” +2. **Static type system** — “Type system is really important for large scale applications.” -3. **Performance**—“Go performed better because of its concurrency model and CPU scalability. Whenever we need to process some internal request, we are doing it with separate Goroutines which are 10x cheaper in resources than Python Threads.” +3. **Performance** — “Go performed better because of its concurrency model and CPU scalability. Whenever we need to process some internal request, we are doing it with separate Goroutines which are 10x cheaper in resources than Python Threads.” -4. **No need for a web framework**—“In most of the cases you really don’t need any third-party library.” +4. **No need for a web framework** — “In most of the cases you really don’t need any third-party library.” -5. **Great IDE support and debugging**—“After rewriting all projects to Go, we got 64 percent less code than we had earlier.” +5. **Great IDE support and debugging** — “After rewriting all projects to Go, we got 64 percent less code than we had earlier.” +{{% gopher gopher=front align=right %}} For enterprises, Go is preferred for providing rapid cross-platform deployment. With its goroutines, native compilation, and the URI-based package namespacing, Go code executes to a single, small binary—with zero dependencies—making it very fast. Sau Sheong Chang, CEO at Singapore Power, wrote Go Web Programming, in which he [champions Go](https://www.amazon.com/s?k=9781617292569&i=stripbooks&linkCode=qs) for handling the demands of scalable, high-performance web applications. “Go is statically typed and easy to learn, with strong integrated development environment (IDE) support and debugging.” @@ -45,21 +48,23 @@ Go syntax keeps code readable and compact. “Most of the features of Go and its ## **Who uses Go for Web Development** -### **eBay** - -eBay uses Go to build web services quickly. Programmers claim web services can be developed in as little as 20 minutes (or, with [gRPC](https://grpc.io/), 60 minutes). Web developers at eBay like that they can use command line tools to do more than other languages—for example, deploying to a Linux server very quickly. And Go is prized for database access, as anything that requires an async process or job is incredibly simple to do with Go. - -### **GOV.UK** - +{{% mediaList %}} + {{% mediaListBox img-src="/images/logos/govuk.svg" img-alt="Gov.UK Logo" img-link="https://gov.uk" title="Gov.UK" align=top %}} GOV.UK made the decision to develop in Go back in 2013. The simplicity and safety of the Go language were a good fit for a core component of their HTTP infrastructure, and some brief experiments with the excellent net/http package convinced web developers they were on the right track. “In particular, Go’s concurrency model makes it absurdly easy to build performant I/O-bound applications,” note Nick Stenning and James Stewart in their [Technology in Government blog](https://technology.blog.gov.uk/2013/12/05/building-a-new-router-for-gov-uk/). -### **Let's Encrypt** - + {{% /mediaListBox %}} + {{% mediaListBox img-src="/images/logos/lets-encrypt-icon.svg" img-alt="Let's Encrypt Logo" img-link="https://letsencrypt.org" title="Let's Encrypt" align=top %}} Let’s Encrypt is a free, automated, and open Certificate Authority run by the non-profit Internet Security Research Group (ISRG). The CA's [website](https://letsencrypt.org/) is powered by Hugo—a static site generator written in Go. Plus, for web services written in Go (using the built-in Go web server), Let's Encrypt allows web developers to serve pages over HTTPS with quick and minimal setup. + {{% /mediaListBox %}} + {{% mediaListBox img-src="/images/logos/uber-app-icon.svg" img-alt="Uber Logo" title="Uber" align=top %}} +[In early 2015](https://eng.uber.com/go-geofence/), Uber leveraged Go to build a microservice for their geofence lookups. At Uber, a geofence refers to a human-defined geographic area on the Earth’s surface, and Uber uses geofences to show its users which products are available at a given location, to define areas with specific requirements such as airports, and to implement dynamic pricing in areas where many people are requesting rides at the same time. By 2016, this service was Uber’s highest queries per second (QPS) service out of the hundreds they run in production—thanks to Go helping them build and scale it so fast. + {{% /mediaListBox %}} + {{% mediaListBox img-src="" img-alt="" title="hold" align="top" %}} -### **Uber** + {{% /mediaListBox %}} + +{{% /mediaList %}} -[In early 2015](https://eng.uber.com/go-geofence/), Uber leveraged Go to build a microservice for their geofence lookups. At Uber, a geofence refers to a human-defined geographic area on the Earth’s surface, and Uber uses geofences to show its users which products are available at a given location, to define areas with specific requirements such as airports, and to implement dynamic pricing in areas where many people are requesting rides at the same time. By 2016, this service was Uber’s highest queries per second (QPS) service out of the hundreds they run in production—thanks to Go helping them build and scale it so fast. ## **How to use Go for Web Development** diff --git a/go.dev/layouts/shortcodes/mediaListBox.html b/go.dev/layouts/shortcodes/mediaListBox.html index 05de1482..06b991b3 100644 --- a/go.dev/layouts/shortcodes/mediaListBox.html +++ b/go.dev/layouts/shortcodes/mediaListBox.html @@ -1,7 +1,9 @@
      • -
        +
        + {{with .Get "img-link"}}{{end -}} {{.Get + {{- with .Get "img-link"}}{{end}}

        {{.Get "title"}}

        -

        {{.Inner | markdownify -}}

        +

        {{.Inner | markdownify -}}

      • diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index 145e3a02..d224b769 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -1237,6 +1237,13 @@ a.Footer-link { margin-top: 2rem; padding: 1.5rem; } +.MediaList-itemBoxHeader-top { + align-items: center; + flex-direction: column; + margin: auto; + text-align: center; + width: 10.75rem; +} .MediaList-itemBoxHeader { align-items: center; display: flex; @@ -1261,6 +1268,12 @@ a.Footer-link { color: #555759; flex: 1; } +.MediaList-itemBox .MediaList-itemBoxBody-top { + align-self: flex-start; + color: #555759; + flex: 1; + margin: auto !important; +} @media only screen and (min-width: 48rem) { .MediaList-itemBoxHeader { justify-content: flex-end; @@ -1269,7 +1282,7 @@ a.Footer-link { .MediaList-itemBox { display: flex; flex: 0 0 33.125rem; - height: 15.0625rem; + min-height: 15.0625rem; margin: 2em 0 0 2em; /* Gutter between grid cells. */ } .MediaList-itemBox .MediaList-itemBoxBody { diff --git a/go.dev/themes/default/static/images/logos/govuk.svg b/go.dev/themes/default/static/images/logos/govuk.svg new file mode 100644 index 00000000..2814f3da --- /dev/null +++ b/go.dev/themes/default/static/images/logos/govuk.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/logos/lets-encrypt-icon.svg b/go.dev/themes/default/static/images/logos/lets-encrypt-icon.svg new file mode 100644 index 00000000..6fc1ff96 --- /dev/null +++ b/go.dev/themes/default/static/images/logos/lets-encrypt-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/logos/lets-encrypt.svg b/go.dev/themes/default/static/images/logos/lets-encrypt.svg new file mode 100644 index 00000000..c54550e1 --- /dev/null +++ b/go.dev/themes/default/static/images/logos/lets-encrypt.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/logos/uber-app-icon.svg b/go.dev/themes/default/static/images/logos/uber-app-icon.svg new file mode 100644 index 00000000..ca116d23 --- /dev/null +++ b/go.dev/themes/default/static/images/logos/uber-app-icon.svg @@ -0,0 +1,14 @@ + + + + uber_rides_api_icon + Created with Sketch. + + + + + + + + + \ No newline at end of file -- cgit v1.3 From 7cf418574d99dfd68f605e75a34c5f25f80cfdec Mon Sep 17 00:00:00 2001 From: Matt Pearring Date: Mon, 4 Nov 2019 11:49:20 -0800 Subject: [x/go.dev] updated cloud usecase w/ more companies & language replaced go CDK with gobyexample added meetup logo svg X-GoDev-Commit: b3949d56b44ea63d729e1d5addde65baecb15da5 --- go.dev/content/solutions/cloud/index.md | 34 ++++++++++++++++-- go.dev/data/learn/guidedLearning.yaml | 4 --- go.dev/themes/default/layouts/index.html | 2 +- go.dev/themes/default/static/images/meetup.svg | 49 ++++++++++++++++++++++++++ 4 files changed, 82 insertions(+), 7 deletions(-) create mode 100644 go.dev/themes/default/static/images/meetup.svg diff --git a/go.dev/content/solutions/cloud/index.md b/go.dev/content/solutions/cloud/index.md index 3d347ab8..deb98e20 100644 --- a/go.dev/content/solutions/cloud/index.md +++ b/go.dev/content/solutions/cloud/index.md @@ -37,7 +37,7 @@ Today, American Express also uses Go via: * [Kubernetes](https://kubernetes.io/)—an open-source container-orchestration system, written in Go, that follows a primary/replica architecture across clusters of * [Prometheus](https://prometheus.io/)—an open-source software application written in Go used for real-time event monitoring and alerting -This triumvirate of Go solutions has helped modernize American Express’s infrastructure and opened the door for Go as a key player in the American Express payment ecosystem. +Go has helped modernize American Express’s infrastructure and the team is beginnign to see Go as a key player in the American Express payment ecosystem. ### **AT&T** @@ -45,20 +45,50 @@ Within AT&T's DirectTV division, a microservices development team oversees VUD m The DirecTV division also hosts Kubernetes themselves and are looking at Knative (a Kubernetes-based platform to build, deploy, and manage modern serverless workloads). +### **CapitalOne** + +Capital One uses go to [power one of it's critical service APIs](https://medium.com/capital-one-tech/a-serverless-and-go-journey-credit-offers-api-74ef1f9fde7f) - the Credit Offers API. The team initially started writing one endpoint in Go, and after seeing the huge improvements over Java (the service was originally written in Java) decided to rewrite the entire API in Go. + +The engineering team then decided to build their serverless architecture with Go, citing Go's speed and simplicity, and mentioning that "[they] didn't want to go serverless without Go." + ### **Dropbox** Dropbox was built on Python, [but in 2013 decided to migrate](https://blogs.dropbox.com/tech/2014/07/open-sourcing-our-go-libraries/) their performance-critical backends to Go. Dropbox developers wanted better concurrency support and faster execution speeds, and were willing to write around 200,000 lines of new Go code. Dropbox has since built many open-source libraries to support large-scale production systems, including libraries for caching, errors, database/sqlbuilder, and hash2. Today, Dropbox has over 500 million users and most of the company's infrastructure is written in Go—over 1.3 million lines of Go and every Dropbox engineer hired goes through Go training during onboarding. Dropbox libraries can be found at [Dropbox's Go github](https://github.com/dropbox/godropbox). +### **Google** + +Google uses Go to power large amounts of it's services and infrastructure. Originally created at Google, Go has become a widely adopted language internally and now supports most of Google Cloud's architecture, Chrome's backend services, YouTube's data generation pipelines, and much more. + ### **MercadoLibre** -MercadoLibre uses Go to scale its eCommerce empire. Go produces efficient code that readily scales as MercadoLibre’s online commerce grows and supports the company as a boon for developers—improving their productivity while streamlining and expanding MercadoLibre services. +MercadoLibre uses Go to [scale its eCommerce platform](/solutions/mercadolibre). Go produces efficient code that readily scales as MercadoLibre’s online commerce grows and supports the company as a boon for developers—improving their productivity while streamlining and expanding MercadoLibre services. Go started with the core APIs team, which builds and maintains the largest APIs at the center of MercadoLibre’s microservices solutions. With Go, MercadoLibre’s build times are three times (3x) faster and their test suite runs an amazing 24 times faster. This means the company’s developers can make a change, then build and test that change much faster than they could before. And dropping MercadoLibre’s test suite runtimes from 90-seconds to just 3-seconds with Go was a huge boon for its developers—allowing them to keep focus (and context) while the much faster tests complete. MercadoLibre leverages Go’s expressive and clean syntax to make it easier for developers to write programs that get the most out of the company’s multicore and networked machines. And while speed in development yields cost efficiency for the company, developers individually benefit from the swift learning curve Go delivers. Not only are MercadoLibre's very experienced developers able to build highly critical applications very, very quickly with Go, but even new programmers have been able to produce significant solutions. +### **Netflix** + +Netflix uses Go to [handle large scale data caching](https://medium.com/netflix-techblog/application-data-caching-using-ssds-5bf25df851ef), with a service called [Rend](https://github.com/netflix/rend), which manages globally replicated storage for personalization data. It's a high-performance server written in Go that acts as a proxy in front of other processes that that actually store the data - and plays a critical role in member personalization for over 150 million users. + +Their decision to write the service in Go was quite deliberate, as they "needed something that had lower latency than Java (where garbage collection pauses are an issue) and is more productive for developers than C, while also handling tens of thousands of client connections." + +### **PayPal** + +PayPal [uses Go across its payment ecosystem](/solutions/paypal), from build, test, and release pipelines, to NoSQL databases, to a large build farm completely managed in Go. The team originally explored using Go to decrease the complexity of a NoSQL databases' code (which was written in C++). The NoSQL team rebuilt one of their databases in Go and immediately noticed the benefits of having a language built for concurrency, simplicity, and speed. + +Other teams noticed how well Go was suited for various systems at PayPal and decided to start adopting the language. Go usage at PayPal has now grown to over 100 engineers and the team is continuing to evaluate new ways to expand Go's usage to increase developer productivity and software efficiency. + +### **Twitch** + +Twitch [uses Go to power many of its busiest systems](https://blog.twitch.tv/en/2016/07/05/gos-march-to-low-latency-gc-a6fa96f06eb7/) that serve live video and chat to millions of users. + +### **Uber** + +Uber uses Go to power several of its critical services that impact the experience of millions of drivers and passengers around the world. From their [real-time analytics engine](https://eng.uber.com/aresdb/), AresDB, to their [microservice for Geo-querying](https://eng.uber.com/go-geofence/), Geofence, and [their resource scheduler](https://eng.uber.com/open-sourcing-peloton/), Peloton, Uber uses Go to maintain high levels of reliability, developer productivity, and complex workloads at scale. + ## **How to use Go for Cloud Computing** Go's strengths shine when it comes to building services. Its speed and built-in support for concurrency results in fast and efficient services, while static typing, robust tooling, and emphasis on simplicity and readability help build reliable and maintainable code. diff --git a/go.dev/data/learn/guidedLearning.yaml b/go.dev/data/learn/guidedLearning.yaml index 720c027a..05ccf2c1 100644 --- a/go.dev/data/learn/guidedLearning.yaml +++ b/go.dev/data/learn/guidedLearning.yaml @@ -3,10 +3,6 @@ links: description: Hello World tutorial for building web applications in Go. url: https://gowebexamples.com thumbnail: /images/learn/helloworld.png - - title: Cloud / Services / APIs - description: Introduction to building applications locally and deploying them on cloud providers using the Go Cloud Development Kit. - url: https://gocloud.dev/tutorials/ - thumbnail: /images/learn/go_cdk_logo.png - title: CLIs description: A guided workshop on building command-line interfaces with Go. url: https://spf13.com/presentation/building-an-awesome-cli-app-in-go-oscon/ diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index 41e3f505..f3d28c8f 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -189,7 +189,7 @@
      • {{if .thumbnailurl}} - {{.name}} group photo. + /images/meetup.svg {{end}}
        diff --git a/go.dev/themes/default/static/images/meetup.svg b/go.dev/themes/default/static/images/meetup.svg new file mode 100644 index 00000000..19704929 --- /dev/null +++ b/go.dev/themes/default/static/images/meetup.svg @@ -0,0 +1,49 @@ + + + + + + -- cgit v1.3 From 19b1ab3c39e1ef82e99f343d85846da8d305386e Mon Sep 17 00:00:00 2001 From: Matt Pearring Date: Mon, 4 Nov 2019 11:55:49 -0800 Subject: [x/go.dev] updating headers in case studies X-GoDev-Commit: b84ba85efc8fdc0c27ec23d724368d0971e55a22 --- go.dev/content/solutions/mercadolibre/index.md | 16 ++++++++-------- go.dev/content/solutions/paypal/index.md | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/go.dev/content/solutions/mercadolibre/index.md b/go.dev/content/solutions/mercadolibre/index.md index e1f951d0..ec4d1923 100644 --- a/go.dev/content/solutions/mercadolibre/index.md +++ b/go.dev/content/solutions/mercadolibre/index.md @@ -11,14 +11,14 @@ resources: alt: MercadoLibre --- -## Go Helps Integrated Ecosystem Attract Developers and Scale eCommerce +## Go helps integrated ecosystem attract developers and scale eCommerce MercadoLibre, Inc. hosts the largest online commerce ecosystem in Latin America and is present in 18 countries. Founded in 1999 and headquartered in Argentina, the company has turned to Go to help it scale and modernize its ecosystem. Go provides clean, efficient code that readily scales as MercadoLibre’s online commerce grows, and increases developer productivity by allowing their engineers to serve their ever-increasing audience while writing less code. -## MercadoLibre Taps Go for Scale +## MercadoLibre taps Go for scale Back in 2015, there was a growing sense within MercadoLibre that their existing API framework, on Groovy and Grails, was reaching its limits and the company needed a different platform to continue scaling. MercadoLibre’s platform was (and @@ -29,7 +29,7 @@ to develop and tune to achieve desired performance. Test execution times were sl slow. Thus, the need for code efficiency and scalability became as important as the need for speed in code development. -## Go Improves System Efficiency +## Go improves system efficiency As one example of Go’s contributions to network efficiency, the core API team builds and maintains the largest APIs at the center of the company’s microservices solutions. This team creates user APIs, which in turn are used by the @@ -47,7 +47,7 @@ was able to accomplish this with just a few lines of Go code, and the success of migrate more and more microservices to Go. The end result for MercadoLibre has been improved cost-efficiencies and system response times. -## Go for Scalability +## Go for scalability Historically, much of the company’s stack was based on Grails and Groovy backed by relational databases. However this big framework with multiple layers was soon found encountering scalability issues. @@ -76,7 +76,7 @@ up a new project—all while effectively standardizing the build and deployment Today, **roughly half of Mercadolibre's traffic is handled by Go applications.** -## MercadoLibre Uses Go for Developers +## MercadoLibre uses Go for developers {{% gopher gopher=wrench %}} The programming _lingua francas_ for MercadoLibre’s infrastructure are currently Go and Java. Every app, every program, @@ -90,7 +90,7 @@ fosters internal working groups to provide training sessions for new MercadoLibr for external developers to help build a broader community of Latin American Go developers. -## Go as a Recruiting Tool +## Go as a recruiting tool MercadoLibre’s Go advocacy has also become a strong recruiting tool for the company. MercadoLibre was among the first companies using Go in Argentina, and is perhaps the largest in Latin America using the language so widely in production. @@ -108,7 +108,7 @@ to provide an exciting workplace and strong career path. Go has proven to be a k company organizes Go workshops for external developers so they can come and learn Go, and when they enjoy what they are doing and the people they talk to, they quickly recognize MercadoLibre as an enticing place to work. -## Go Enabling Developers +## Go enabling developers MercadoLibre employs Go for its simplicity with systems at scale, but that simplicity is also why the company's developers love Go. @@ -149,7 +149,7 @@ education. The company sends key engineering leaders to GopherCon and other Go e infrastructure and security teams encourage all the development teams to keep Go versions up to date, and the company has a team developing a _Go-meli-toolkit_: A complete Go library to interface all the services provided by Fury. -## Getting Your Enterprise Started With Go +## Getting your enterprise started with Go Just as MercadoLibre started with a proof-of-concept project to implement Go, dozens of other large enterprises are adopting Go as well. Beyond MercadoLibre, there are approximately two million developers using Go worldwide—spanning diff --git a/go.dev/content/solutions/paypal/index.md b/go.dev/content/solutions/paypal/index.md index b1c44d6f..08c00430 100644 --- a/go.dev/content/solutions/paypal/index.md +++ b/go.dev/content/solutions/paypal/index.md @@ -11,7 +11,7 @@ resources: alt: PayPal --- -## New Code Infrastructure Built on Go +## New code infrastructure built on Go PayPal was created to democratize financial services and empower people and businesses to join and thrive in the global economy. Central to this effort is PayPal's Payments Platform, which uses a combination of proprietary and third-party technologies to efficiently and securely facilitate transactions between millions of merchants and consumers worldwide. As the Payments Platform grew larger and more complicated, PayPal sought to modernize its systems and reduce time-to-market for new applications. @@ -23,7 +23,7 @@ PayPal had a NoSQL database in C++, but the complexity of the code was substanti As a proof of concept, a development team spent six months learning Go and reimplementing the NoSQL system from the ground up in Go, during which they also provided insights on how Go could be implemented more broadly at PayPal. -## Using Go To Simplify For Scale +## Using Go to simplify for scale As PayPal’s platform becomes more intricate, Go provides a way to readily simplify the complexity of creating and running software at scale. The language provides PayPal with great libraries and fast tools, plus concurrency, garbage collection, and type safety. @@ -35,7 +35,7 @@ Since our NoSQL and DB proxy used quite a bit of system details in a multi-threa After the success of this newly re-written NoSQL system, more platform and content teams within PayPal began adopting Go. Natarajan’s current team is responsible for PayPal’s build, test, and release pipelines—all built in Go. The company has a large build farm which is completely managed using Go infrastructure and supports builds-as-a-service for developers across the company. -## Modernizing PayPal Systems With Go +## Modernizing PayPal systems with Go With the distributed computing required by PayPal, Go was the right language to refresh their systems. PayPal needed programming that is concurrent and parallel, compiled for high performance and highly portable, and that brings developers the benefits of a modular, composable open-source architecture—Go has delivered all that and more to help PayPal modernize its systems. @@ -47,7 +47,7 @@ As PayPal continues to modernize their software-defined networking (SDN) infrast In our tightly managed environments where we run Go code, we have seen a CPU reduction of approximately 10% with cleaner and maintainable code. {{% /pullquote %}} -## Go Increases Developer Productivity +## Go increases developer productivity As a global operation, PayPal needs its development teams to be effective at managing two kinds of scale: production scale, especially concurrent systems interacting with many other servers (such as cloud services); and development scale, especially large codebases developed by many programmers in coordination (such as open-source development). @@ -58,7 +58,7 @@ There are currently over 100 Go developers at PayPal, and future developers who Most importantly, PayPal developers have increased their productivity with Go. Go’s concurrency mechanisms have made it easy to write programs that get the most out of PayPal’s multicore and networked machines. Developers using Go also benefit from the fact that it compiles quickly to machine code, and their apps gain the convenience of garbage collection and the power of run-time reflection. -## Speeding PayPal's Time To Market +## Speeding PayPal's time to market The first-class languages at PayPal today are Java and Node, with Go primarily used as an infrastructure language. While Go may never replace Node.js for certain applications, Natarajan is pushing to make Go a first-class language at PayPal. @@ -70,7 +70,7 @@ For PayPal, deploying to GKE would enable rapid development and iteration by mak Most importantly for PayPal, the combination of Go development and the GKE allows the company to scale effortless to meet demand, as Kubernetes autoscaling will allow PayPal to handle increased user demand for services—keeping them available when it matters most, then scale back in the quiet periods to save money. -## Getting Your Enterprise Started With Go +## Getting your enterprise started with Go PayPal’s story is not unique; dozens of other large enterprises are discovering how Go can help them ship reliable software faster. There are approximately two million developers using Go worldwide, spanning banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as Dropbox, New York Times, Salesforce, Target, Capital One, Monzo, Twitch, IBM, Square, Uber, and of course Google. -- cgit v1.3 From 7025987b33fe1b61051e76e4ede9f226f45eadc8 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Mon, 4 Nov 2019 15:49:10 -0500 Subject: [x/go.dev] add books to webdev + shortcode Change-Id: Ida1f1d77212df4284edf66ef582b3fe09380c9f4 X-GoDev-Commit: 1037f98f3a44b8dea5833768b04d49e57475963d --- go.dev/content/solutions/webdev/index.md | 26 ++++++++++++++------- go.dev/layouts/shortcodes/books.html | 18 ++++++++++++++ .../building-restful-web-services-with-go.jpg | Bin 0 -> 29323 bytes .../images/books/go-web-development-cookbook.jpg | Bin 0 -> 29115 bytes .../static/images/books/go-web-programming.jpg | Bin 0 -> 24295 bytes .../images/books/mastering-go-web-services.jpg | Bin 0 -> 29199 bytes .../images/books/web-development-with-go.jpg | Bin 0 -> 19536 bytes 7 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 go.dev/layouts/shortcodes/books.html create mode 100644 go.dev/themes/default/static/images/books/building-restful-web-services-with-go.jpg create mode 100644 go.dev/themes/default/static/images/books/go-web-development-cookbook.jpg create mode 100644 go.dev/themes/default/static/images/books/go-web-programming.jpg create mode 100644 go.dev/themes/default/static/images/books/mastering-go-web-services.jpg create mode 100644 go.dev/themes/default/static/images/books/web-development-with-go.jpg diff --git a/go.dev/content/solutions/webdev/index.md b/go.dev/content/solutions/webdev/index.md index d90880ca..a2a91382 100644 --- a/go.dev/content/solutions/webdev/index.md +++ b/go.dev/content/solutions/webdev/index.md @@ -4,6 +4,22 @@ linkTitle: "Web Development" description: "With enhanced memory performance and support for several IDEs, Go powers fast and scalable web applications." date: 2019-10-04T15:26:31-04:00 series: Use Cases +books: + - title: Web Development with Go + url: https://www.amazon.com/Web-Development-Go-Building-Scalable-ebook/dp/B01JCOC6Z6 + thumbnail: /images/books/web-development-with-go.jpg + - title: Web Programming by San Sheong Chang + url: https://www.amazon.com/Web-Programming-Sau-Sheong-Chang/dp/1617292567 + thumbnail: /images/books/go-web-programming.jpg + - title: "Web Development Cookbook: Build full-stack web applications with Go" + url: https://www.amazon.com/Web-Development-Cookbook-full-stack-applications-ebook/dp/B077TVQ28W + thumbnail: /images/books/go-web-development-cookbook.jpg + - title: Building RESTful Web services with Go + url: https://www.amazon.com/Building-RESTful-Web-services-gracefully-ebook/dp/B072QB8KL1 + thumbnail: /images/books/building-restful-web-services-with-go.jpg + - title: Mastering Go Web Services + url: https://www.amazon.com/Mastering-Web-Services-Nathan-Kozyra-ebook/dp/B00W5GUKL6 + thumbnail: /images/books/mastering-go-web-services.jpg resources: - name: icon src: globe.png @@ -79,10 +95,8 @@ Web developers prefer Hugo because it is completely cross platform, renders chan Other popular web development tools include: * [Bleve](http://blevesearch.com/), full-text search and indexing for Go, providing a simple top-level API to index any object in the data model and override default mapping to customize behavior. - * [Buffalo](https://gobuffalo.io/en/), for rapid web development in Go. While Buffalo can be considered as a framework, it's mostly an ecosystem of Go and Javascript libraries curated to fit together. * [CockroachDB](https://www.cockroachlabs.com/), an evolution of the database—architected for the cloud to deliver resilient, consistent, distributed SQL at scale. - * [Echo](https://echo.labstack.com), a high performance, extensible, and minimalist Go web framework providing optimized HTTP router, group APIs, data binding for JSON and XML, HTTP/2 support, and much more. * [Flamingo](https://www.flamingo.me), a fast open-source framework based on Go with clean and scalable architecture designed to build custom, fast and flexible frontend interfaces. Includes Flamingo Core and Flamingo Commerce. * [GopherJS](https://github.com/gopherjs/gopherjs), a compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers. @@ -108,13 +122,9 @@ In quick comparison, while Node.js often presents type issues and weird conversi Similarly, Python struggles with concurrency and scaling, and is not the fastest language for performance. Whereas Go provides concurrent process channeling for concurrency, is compiled to a tiny binary for scale, and "[trumps Python when it comes to performance](https://dzone.com/articles/golang-vs-python-which-one-to-choose)" in both memory usage and time spent solving complex functions. -## **Books on Go for Web Development** +## Go books on web development -* [Web Programming by San Sheong Chang](https://www.amazon.com/Web-Programming-Sau-Sheong-Chang/dp/1617292567) -* [Web Development Cookbook: Build full-stack web applications with Go](https://www.amazon.com/Web-Development-Cookbook-full-stack-applications-ebook/dp/B077TVQ28W) -* [Building RESTful Web services with Go](https://www.amazon.com/Building-RESTful-Web-services-gracefully-ebook/dp/B072QB8KL1) -* [Web Development with Go](https://www.amazon.com/Web-Development-Go-Building-Scalable-ebook/dp/B01JCOC6Z6) -* [Mastering Go Web Services](https://www.amazon.com/Mastering-Web-Services-Nathan-Kozyra-ebook/dp/B00W5GUKL6) +{{% books %}} ## **Popular frameworks for Go** diff --git a/go.dev/layouts/shortcodes/books.html b/go.dev/layouts/shortcodes/books.html new file mode 100644 index 00000000..38adc9ec --- /dev/null +++ b/go.dev/layouts/shortcodes/books.html @@ -0,0 +1,18 @@ +{{$books := .Page.Param "books"}} + + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/books/building-restful-web-services-with-go.jpg b/go.dev/themes/default/static/images/books/building-restful-web-services-with-go.jpg new file mode 100644 index 00000000..b76f2b5a Binary files /dev/null and b/go.dev/themes/default/static/images/books/building-restful-web-services-with-go.jpg differ diff --git a/go.dev/themes/default/static/images/books/go-web-development-cookbook.jpg b/go.dev/themes/default/static/images/books/go-web-development-cookbook.jpg new file mode 100644 index 00000000..c82a0427 Binary files /dev/null and b/go.dev/themes/default/static/images/books/go-web-development-cookbook.jpg differ diff --git a/go.dev/themes/default/static/images/books/go-web-programming.jpg b/go.dev/themes/default/static/images/books/go-web-programming.jpg new file mode 100644 index 00000000..448a29fd Binary files /dev/null and b/go.dev/themes/default/static/images/books/go-web-programming.jpg differ diff --git a/go.dev/themes/default/static/images/books/mastering-go-web-services.jpg b/go.dev/themes/default/static/images/books/mastering-go-web-services.jpg new file mode 100644 index 00000000..d387f74d Binary files /dev/null and b/go.dev/themes/default/static/images/books/mastering-go-web-services.jpg differ diff --git a/go.dev/themes/default/static/images/books/web-development-with-go.jpg b/go.dev/themes/default/static/images/books/web-development-with-go.jpg new file mode 100644 index 00000000..9f76789e Binary files /dev/null and b/go.dev/themes/default/static/images/books/web-development-with-go.jpg differ -- cgit v1.3 From 923e822c1c8779e2a16b2eb414931b5bacd25684 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Mon, 4 Nov 2019 16:17:12 -0500 Subject: [x/go.dev] Organize templates so each type has own layout Change-Id: Iad004cf7fd2adea4ae4734755f9822f62807f0c0 X-GoDev-Commit: f247e5742fa601f58446df48c8cc9eb29566fddd --- go.dev/themes/default/layouts/_default/single.html | 6 +----- go.dev/themes/default/layouts/solutions/single.html | 12 ++++++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 go.dev/themes/default/layouts/solutions/single.html diff --git a/go.dev/themes/default/layouts/_default/single.html b/go.dev/themes/default/layouts/_default/single.html index 628b5116..3908707d 100644 --- a/go.dev/themes/default/layouts/_default/single.html +++ b/go.dev/themes/default/layouts/_default/single.html @@ -1,10 +1,6 @@ {{define "main"}}

        {{.Title}}

        - {{range .Params.authors}} - - {{end}} - {{.Content}}
        -{{end}} +{{end}} \ No newline at end of file diff --git a/go.dev/themes/default/layouts/solutions/single.html b/go.dev/themes/default/layouts/solutions/single.html new file mode 100644 index 00000000..f0f9a0aa --- /dev/null +++ b/go.dev/themes/default/layouts/solutions/single.html @@ -0,0 +1,12 @@ +{{define "main"}} +
        +

        {{.Title}}

        + {{if eq .Params.Series "Case Studies"}} + {{range .Params.authors}} + + {{end}} + + {{end}} + {{.Content}} +
        +{{end}} -- cgit v1.3 From 5bdb0bc92a071b04386bf33f0a13805dace5405c Mon Sep 17 00:00:00 2001 From: Alexander Rakoczy Date: Mon, 4 Nov 2019 16:01:07 -0500 Subject: [x/go.dev] all: generate footer from menu config Adds a configurable footer menu to the site, with nested menu entries. Hugo seems to downcase link fragments in menus, so use all lowercase IDs for anchors. Fixes b/142726427 Change-Id: I79c0965cab570fffb8a545e74deed10b4191b34e Reviewed-on: https://team-review.git.corp.google.com/c/golang/go.dev/+/591495 Reviewed-by: Alexander Rakoczy CI-Result: Cloud Build X-GoDev-Commit: c16bcd6fda10debf3dcc28373df754e05e664abe --- go.dev/config.toml | 44 ++++++++++++++++++++++ go.dev/layouts/partials/footer/link.html | 10 +++++ go.dev/themes/default/layouts/_default/baseof.html | 26 ++++--------- .../themes/default/layouts/solutions/section.html | 4 +- 4 files changed, 64 insertions(+), 20 deletions(-) create mode 100644 go.dev/layouts/partials/footer/link.html diff --git a/go.dev/config.toml b/go.dev/config.toml index eb10b83d..efee4184 100644 --- a/go.dev/config.toml +++ b/go.dev/config.toml @@ -31,3 +31,47 @@ theme = "default" title = "golang.org" url = "https://golang.org" weight = -80 + + [[menu.footer]] + identifier = "solutions" + name = "Solutions" + title = "Solutions" + url = "/solutions" + weight = -110 + + [[menu.footer]] + identifier = "usecases" + name = "Use Cases" + title = "Use Cases" + url = "/solutions#use-cases" + parent = "solutions" + weight = -112 + + [[menu.footer]] + identifier = "casestudies" + name = "Case Studies" + title = "Case Studies" + url = "/solutions#case-studies" + parent = "solutions" + weight = -111 + + [[menu.footer]] + identifier = "learn" + name = "Learn" + title = "Learn" + url = "/learn" + weight = -100 + + [[menu.footer]] + identifier = "explore" + name = "Explore" + title = "Explore" + url = "https://pkg.go.dev" + weight = -90 + + [[menu.footer]] + identifier = "about" + name = "About" + title = "About" + url = "https://www.golang.org" + weight = -80 diff --git a/go.dev/layouts/partials/footer/link.html b/go.dev/layouts/partials/footer/link.html new file mode 100644 index 00000000..2d3b8017 --- /dev/null +++ b/go.dev/layouts/partials/footer/link.html @@ -0,0 +1,10 @@ +{{- $url := .menuItem.URL}} +{{- if and (not .Site.IsServer) (eq .Identifier "learn")}} + {{- $url = "https://learn.go.dev"}} +{{- end}} +{{- if not .Site.IsServer}} + {{- $url = $url | absURL}} +{{- end}} + + {{.menuItem.Name}} + diff --git a/go.dev/themes/default/layouts/_default/baseof.html b/go.dev/themes/default/layouts/_default/baseof.html index 227c819e..051556e3 100644 --- a/go.dev/themes/default/layouts/_default/baseof.html +++ b/go.dev/themes/default/layouts/_default/baseof.html @@ -91,24 +91,14 @@ diff --git a/go.dev/themes/default/layouts/solutions/section.html b/go.dev/themes/default/layouts/solutions/section.html index 608cef10..67bdd1f6 100644 --- a/go.dev/themes/default/layouts/solutions/section.html +++ b/go.dev/themes/default/layouts/solutions/section.html @@ -11,7 +11,7 @@

      • -
        +

        Designed for today's needs

        @@ -41,7 +41,7 @@
      -
      +

      Companies use, love, and depend on Go

      -- cgit v1.3 From b5f3bdc143f5c2cd1291aa52ddf8acf5febdc2e9 Mon Sep 17 00:00:00 2001 From: Matt Pearring Date: Mon, 4 Nov 2019 15:12:23 -0800 Subject: [x/go.dev] updating netflix cloud language updating events background color adding meetup logo as backup events image to home and learn page X-GoDev-Commit: 0b2f47a26a66a007c40d4e88496338366dfe02b2 --- go.dev/content/solutions/cloud/index.md | 2 +- go.dev/themes/default/assets/css/styles.css | 8 ++++++-- go.dev/themes/default/layouts/index.html | 4 +++- go.dev/themes/default/layouts/learn/section.html | 4 +++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/go.dev/content/solutions/cloud/index.md b/go.dev/content/solutions/cloud/index.md index deb98e20..b5275220 100644 --- a/go.dev/content/solutions/cloud/index.md +++ b/go.dev/content/solutions/cloud/index.md @@ -71,7 +71,7 @@ MercadoLibre leverages Go’s expressive and clean syntax to make it easier for ### **Netflix** -Netflix uses Go to [handle large scale data caching](https://medium.com/netflix-techblog/application-data-caching-using-ssds-5bf25df851ef), with a service called [Rend](https://github.com/netflix/rend), which manages globally replicated storage for personalization data. It's a high-performance server written in Go that acts as a proxy in front of other processes that that actually store the data - and plays a critical role in member personalization for over 150 million users. +Netflix uses Go to [handle large scale data caching](https://medium.com/netflix-techblog/application-data-caching-using-ssds-5bf25df851ef), with a service called [Rend](https://github.com/netflix/rend), which manages globally replicated storage for personalization data. It's a high-performance server written in Go that acts as a proxy in front of other processes that actually store the data - and plays a critical role in member personalization for over 150 million users. Their decision to write the service in Go was quite deliberate, as they "needed something that had lower latency than Java (where garbage collection pauses are an issue) and is more productive for developers than C, while also handling tens of thousands of client connections." diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index d224b769..8cda4240 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -631,7 +631,7 @@ h5, h6 { margin-right: 1rem; } .LearnGo-eventThumbnail--noimage { - background-color: #d8d8d8; + background-color: #ffffff; } .LearnGo-eventThumbnail img { height: auto; @@ -765,6 +765,10 @@ a.Footer-link { height: 14.6875rem; width: 22rem; } +.Learn-quickstartThumbnail img { + padding: 2em; + width: 100%; +} .Learn-quickstarts { display: flex; flex: 1 0 100%; @@ -933,7 +937,7 @@ a.Footer-link { width: 3rem; } .Learn-eventThumbnail--noimage { - background-color: #d8d8d8; + background-color: #ffffff; } .Learn-eventThumbnail img { margin: auto; diff --git a/go.dev/themes/default/layouts/index.html b/go.dev/themes/default/layouts/index.html index f3d28c8f..b7f65a28 100644 --- a/go.dev/themes/default/layouts/index.html +++ b/go.dev/themes/default/layouts/index.html @@ -189,7 +189,9 @@
    • {{if .thumbnailurl}} - /images/meetup.svg + {{.name}} group photo + {{else}} + meetup logo {{end}}
      diff --git a/go.dev/themes/default/layouts/learn/section.html b/go.dev/themes/default/layouts/learn/section.html index 5b734f3a..f0a32ae9 100644 --- a/go.dev/themes/default/layouts/learn/section.html +++ b/go.dev/themes/default/layouts/learn/section.html @@ -144,7 +144,9 @@
    • {{if .thumbnailurl}} - {{.name}} group photo. + {{.name}} group photo + {{else}} + meetup logo {{end}}
      -- cgit v1.3 From 654c9e2d9b00ec849aca05321e30541766359984 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Mon, 4 Nov 2019 18:28:26 -0500 Subject: [x/go.dev] external links now open in new window in markdown Change-Id: I5fae921be43186b29d2bd35bc73b889d2595280d X-GoDev-Commit: 4d31c0a1af492254d5136fb3eafa0fb52cc8530f --- go.dev/config.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/go.dev/config.toml b/go.dev/config.toml index efee4184..81b8183a 100644 --- a/go.dev/config.toml +++ b/go.dev/config.toml @@ -2,6 +2,9 @@ baseURL = "https://go.dev/" languageCode = "en" title = "go.dev" theme = "default" +[blackfriday] + plainIDAnchors = true + hrefTargetBlank = true [menu] [[menu.main]] -- cgit v1.3 From 318786293cf0254b125866a71e01a331752cbda4 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Mon, 4 Nov 2019 18:29:35 -0500 Subject: [x/go.dev] +headerWithLink shortcode Change-Id: I8f26fefb5dc23d39f5e37974797db202eabaf71b X-GoDev-Commit: 4992c108eec5de3ba0045f6f8023fd70ec2da27f --- go.dev/layouts/shortcodes/headerWithLink.html | 10 ++++++++++ go.dev/themes/default/assets/css/styles.css | 14 ++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 go.dev/layouts/shortcodes/headerWithLink.html diff --git a/go.dev/layouts/shortcodes/headerWithLink.html b/go.dev/layouts/shortcodes/headerWithLink.html new file mode 100644 index 00000000..5b596f64 --- /dev/null +++ b/go.dev/layouts/shortcodes/headerWithLink.html @@ -0,0 +1,10 @@ +

    + +
    \ No newline at end of file diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index d224b769..ae5c87cc 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -547,6 +547,20 @@ h5, h6 { .WhyGo-gopher img { width: 100%; } + +.headerWithLink { + display: flex; + justify-content: space-between; + width: 100%; +} + +.headerLink { + margin: 0; + align-self: center; + font-size: 1.125rem; + font-weight: 600; +} + .LearnGo-subHeader { display: flex; justify-content: space-between; -- cgit v1.3 From 7d17a02b12bd2e1e75c54e34361e1131e3872766 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Mon, 4 Nov 2019 18:29:49 -0500 Subject: [x/go.dev] updates to web use case Change-Id: Iabdc01dfc48f7fd50d342fa96e8789b962d2b07c X-GoDev-Commit: 51c599b6dd9bb6f84daa983bd5f101da0831cbc4 --- go.dev/content/solutions/webdev/index.md | 86 ++++++++-------------- .../themes/default/static/images/logos/caddy.svg | 1 + go.dev/themes/default/static/images/logos/hugo.svg | 13 ++++ 3 files changed, 44 insertions(+), 56 deletions(-) create mode 100644 go.dev/themes/default/static/images/logos/caddy.svg create mode 100644 go.dev/themes/default/static/images/logos/hugo.svg diff --git a/go.dev/content/solutions/webdev/index.md b/go.dev/content/solutions/webdev/index.md index a2a91382..c49f9c05 100644 --- a/go.dev/content/solutions/webdev/index.md +++ b/go.dev/content/solutions/webdev/index.md @@ -8,7 +8,7 @@ books: - title: Web Development with Go url: https://www.amazon.com/Web-Development-Go-Building-Scalable-ebook/dp/B01JCOC6Z6 thumbnail: /images/books/web-development-with-go.jpg - - title: Web Programming by San Sheong Chang + - title: Go Web Programming url: https://www.amazon.com/Web-Programming-Sau-Sheong-Chang/dp/1617292567 thumbnail: /images/books/go-web-programming.jpg - title: "Web Development Cookbook: Build full-stack web applications with Go" @@ -31,11 +31,9 @@ resources: alt: globe --- -### _Go delivers speed, concurrency, and developer-friendly tools for Web Applications_ +## Go delivers speed, security, and developer-friendly tools for Web Applications -## **Why use Go for Web Development** - -Go is designed to enable developers to rapidly develop scalable web applications. Go ships with an easy to use, secure and performant web server and includes it own web templating library. Go has excellent support for all of the latest technologies from HTTP/2, to databases like MySQL and MongoDB and ElasticSearch, to the latest encryption standards. Go applications run well on the Google App Engine (for easy hosting) or on any environment, cloud, or operating system thanks to Go’s portable nature. +Go is designed to enable developers to rapidly develop scalable and secure web applications. Go ships with an easy to use, secure and performant web server and includes it own web templating library. Go has excellent support for all of the latest technologies from [HTTP/2](https://pkg.go.dev/net/http), to databases like [MySQL](https://pkg.go.dev/mod/github.com/go-sql-driver/mysql), [MongoDB](https://pkg.go.dev/mod/go.mongodb.org/mongo-driver) and [ElasticSearch](https://pkg.go.dev/mod/github.com/elastic/go-elasticsearch/v7), to the latest encryption standards including [TLS 1.3](https://pkg.go.dev/crypto/tls). Go web applications run natively on [Google App Engine](https://cloud.google.com/appengine/) (for easy scaling) or on any environment, cloud, or operating system thanks to Go’s extreme portability. {{% pullquote author="Tigran Bayburtsyan, Co-Founder and CTO at Hexact Inc." link="https://hackernoon.com/5-reasons-why-we-switched-from-python-to-go-4414d5f42690" %}} Go Language is the easiest language that I’ve ever seen and used... For me, Go is easier to learn than even JavaScript. @@ -56,86 +54,62 @@ Bayburtsyan summarizes the five key reasons his company switched to Go: {{% gopher gopher=front align=right %}} For enterprises, Go is preferred for providing rapid cross-platform deployment. With its goroutines, native compilation, and the URI-based package namespacing, Go code executes to a single, small binary—with zero dependencies—making it very fast. -Sau Sheong Chang, CEO at Singapore Power, wrote Go Web Programming, in which he [champions Go](https://www.amazon.com/s?k=9781617292569&i=stripbooks&linkCode=qs) for handling the demands of scalable, high-performance web applications. “Go is statically typed and easy to learn, with strong integrated development environment (IDE) support and debugging.” - -Go syntax keeps code readable and compact. “Most of the features of Go and its tools follow the UNIX pattern,” adds [eduCBA](https://www.educba.com/python-vs-go/) (Corporate Bridge Consultancy). “So instead of merging into the language structure, a developer can now focus more on the development logic.” - “If you are looking for powerful tools for web programming, mobile development, microservices, and ERP systems,” [writes Andrew Smith](https://dzone.com/articles/golang-web-development-better-than-python), marketing manager at QArea. “Go web development has proved to be faster than using Python for the same kind of tasks in many use cases.” -## **Who uses Go for Web Development** +## Featured Go web development users and projects {{% mediaList %}} - {{% mediaListBox img-src="/images/logos/govuk.svg" img-alt="Gov.UK Logo" img-link="https://gov.uk" title="Gov.UK" align=top %}} -GOV.UK made the decision to develop in Go back in 2013. The simplicity and safety of the Go language were a good fit for a core component of their HTTP infrastructure, and some brief experiments with the excellent net/http package convinced web developers they were on the right track. “In particular, Go’s concurrency model makes it absurdly easy to build performant I/O-bound applications,” note Nick Stenning and James Stewart in their [Technology in Government blog](https://technology.blog.gov.uk/2013/12/05/building-a-new-router-for-gov-uk/). - + {{% mediaListBox img-src="/images/logos/hugo.svg" img-alt="Hugo Logo" img-link="https://gohugo.io" title="Hugo" align=top %}} +[Hugo](https://gohugo.io) is a fast and modern static site generator written in Go, and designed to make website creation fun again. Hugo is one of the most popular website engines available today. Websites built with Hugo are extremely fast and secure and can be hosted anywhere without any dependencies. + {{% /mediaListBox %}} + {{% mediaListBox img-src="/images/logos/caddy.svg" img-alt="Caddy Logo" img-link="https://caddyserver.com" title="Caddy" align=top %}} +[Caddy 2](https://caddyserver.com) is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go. Written in Go, Caddy offers greater memory safety than servers written in C. A hardened TLS stack powered by the Go standard library serves a significant portion of all Internet traffic. {{% /mediaListBox %}} {{% mediaListBox img-src="/images/logos/lets-encrypt-icon.svg" img-alt="Let's Encrypt Logo" img-link="https://letsencrypt.org" title="Let's Encrypt" align=top %}} Let’s Encrypt is a free, automated, and open Certificate Authority run by the non-profit Internet Security Research Group (ISRG). The CA's [website](https://letsencrypt.org/) is powered by Hugo—a static site generator written in Go. Plus, for web services written in Go (using the built-in Go web server), Let's Encrypt allows web developers to serve pages over HTTPS with quick and minimal setup. + {{% /mediaListBox %}} + {{% mediaListBox img-src="Cloudflare Logo" img-alt="" title="hold" align="top" %}} + + {{% /mediaListBox %}} + {{% mediaListBox img-src="/images/logos/govuk.svg" img-alt="Gov.UK Logo" img-link="https://gov.uk" title="Gov.UK" align=top %}} +GOV.UK made the decision to develop in Go back in 2013. The simplicity and safety of the Go language were a good fit for a core component of their HTTP infrastructure, and some brief experiments with the excellent net/http package convinced web developers they were on the right track. “In particular, Go’s concurrency model makes it absurdly easy to build performant I/O-bound applications,” note Nick Stenning and James Stewart in their [Technology in Government blog](https://technology.blog.gov.uk/2013/12/05/building-a-new-router-for-gov-uk/). {{% /mediaListBox %}} {{% mediaListBox img-src="/images/logos/uber-app-icon.svg" img-alt="Uber Logo" title="Uber" align=top %}} [In early 2015](https://eng.uber.com/go-geofence/), Uber leveraged Go to build a microservice for their geofence lookups. At Uber, a geofence refers to a human-defined geographic area on the Earth’s surface, and Uber uses geofences to show its users which products are available at a given location, to define areas with specific requirements such as airports, and to implement dynamic pricing in areas where many people are requesting rides at the same time. By 2016, this service was Uber’s highest queries per second (QPS) service out of the hundreds they run in production—thanks to Go helping them build and scale it so fast. {{% /mediaListBox %}} - {{% mediaListBox img-src="" img-alt="" title="hold" align="top" %}} - - {{% /mediaListBox %}} {{% /mediaList %}} +## Key Solutions -## **How to use Go for Web Development** - -Web developers can use Go to build web applications from scratch—from basic web servers to robust web applications. Using MVC (model-view-controller) and REST for advanced design, web developers leverage Go to create HTML pages with dynamic content, custom dashboards, galleries, and images tailored to individual users. Go delivers an authentication system with hashed passwords and user session, plus processes to normalize and validate data before saving to a database. - -Go runs on FreeBSD, Linux, OS X, or Windows machines. An online course dedicated to web development tips can be found at https://www.usegolang.com +### Go books on web development -**Hugo is the world’s fastest framework for building websites.** It is a static site generator, written in Go, that works on macOS, Windows, Linux, FreeBSD, and other operating systems. Hugo is today one of the most popular open-source site generators, providing speed and flexibility to [make building websites fun again](https://gohugo.io/). - -Web developers prefer Hugo because it is completely cross platform, renders changes on the fly as they are developed, can be hosted anywhere, and includes customizable themes/templates for rapid deployment. +{{% books %}} -Other popular web development tools include: +{{< headerWithLink header="Web Frameworks" link="https://pkg.go.dev/search?q=web+framework" level=3 >}} -* [Bleve](http://blevesearch.com/), full-text search and indexing for Go, providing a simple top-level API to index any object in the data model and override default mapping to customize behavior. * [Buffalo](https://gobuffalo.io/en/), for rapid web development in Go. While Buffalo can be considered as a framework, it's mostly an ecosystem of Go and Javascript libraries curated to fit together. -* [CockroachDB](https://www.cockroachlabs.com/), an evolution of the database—architected for the cloud to deliver resilient, consistent, distributed SQL at scale. * [Echo](https://echo.labstack.com), a high performance, extensible, and minimalist Go web framework providing optimized HTTP router, group APIs, data binding for JSON and XML, HTTP/2 support, and much more. * [Flamingo](https://www.flamingo.me), a fast open-source framework based on Go with clean and scalable architecture designed to build custom, fast and flexible frontend interfaces. Includes Flamingo Core and Flamingo Commerce. -* [GopherJS](https://github.com/gopherjs/gopherjs), a compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers. +* [Gin](https://gin-gonic.com/), a web framework written in Go. It features a martini-like API with much better performance, up to 40 times faster. If you need performance and good productivity, you will love Gin. * [Gorilla](http://www.gorillatoolkit.org/), a web toolkit for the Go programming language. Packages include a powerful URL router and dispatcher, context, RPC, schema, sessions, websocket, and more. -Behind these tools, Go 1.13 was [released in September 2019](https://blog.golang.org/go1.13). Go 1.13 enables support for TLS 1.3 in the crypto/TLS package, its latest compiler has a new implementation of escape analysis that is more precise (i.e., more Go variables and expressions allocated on the stack instead of heap), and the Go runtime is now more aggressive with returning memory to the operating system to make it available to co-tenant applications. - -## **Go solutions to legacy challenges** - -A common pattern for web developers is to use Go to build clean, fast-functioning APIs and then use a front-end stack to build the user interface. - -Go is [ideal for tackling some consistent challenges](https://www.udemy.com/course/go-for-web-development/) faced by web developers, including: -* Getting a web server up and running quickly with Go’s standard library -* Designing a UI with Go’s multiple template engines for improved flexibility -* Calling on the services of an external API -* Incorporating web middleware -* Using AJAX requests to build web applications -* Integrating Gorilla/MUX for route handling -* Creating users securely by using bcrypt to hash user passwords +{{< headerWithLink header="Routers" search="http router" level=3 >}} -In quick comparison, while Node.js often presents type issues and weird conversions, memory leaks, and logic bugs, Go is much easier for web developers to learn, brings a very low memory footprint, readily scales, provides fantastic profiling tools (to find CPU and memory leaks), and simple concurrency with channels that are much more efficient than async/await. +{{< headerWithLink header="Template Engines" search="templates" level=3 >}} -Similarly, Python struggles with concurrency and scaling, and is not the fastest language for performance. Whereas Go provides concurrent process channeling for concurrency, is compiled to a tiny binary for scale, and "[trumps Python when it comes to performance](https://dzone.com/articles/golang-vs-python-which-one-to-choose)" in both memory usage and time spent solving complex functions. +{{< headerWithLink header="Databases" search="database" level=3 >}} -## Go books on web development - -{{% books %}} - -## **Popular frameworks for Go** - -* [Gorilla](http://www.gorillatoolkit.org/) -* [Gobuffalo](https://gobuffalo.io/en/) -* [Flamingo](https://www.flamingo.me/) -* [Echo](https://echo.labstack.com/) +* [Bleve](http://blevesearch.com/), full-text search and indexing for Go, providing a simple top-level API to index any object in the data model and override default mapping to customize behavior. +* [CockroachDB](https://www.cockroachlabs.com/), an evolution of the database—architected for the cloud to deliver resilient, consistent, distributed SQL at scale. -## **Popular Go Web Applications** +### Courses +* https://www.usegolang.com +### Projects +* [GopherJS](https://github.com/gopherjs/gopherjs), a compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers. * [Hugo](https://gohugo.io/) * [Mattermost](https://mattermost.com/) -* [Caddy](https://caddyserver.com/) \ No newline at end of file +* [Caddy](https://caddyserver.com/) diff --git a/go.dev/themes/default/static/images/logos/caddy.svg b/go.dev/themes/default/static/images/logos/caddy.svg new file mode 100644 index 00000000..d9b8a67c --- /dev/null +++ b/go.dev/themes/default/static/images/logos/caddy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/logos/hugo.svg b/go.dev/themes/default/static/images/logos/hugo.svg new file mode 100644 index 00000000..8a1a9bbc --- /dev/null +++ b/go.dev/themes/default/static/images/logos/hugo.svg @@ -0,0 +1,13 @@ + + + + Slice 1 + Created with Sketch. + + + + + + + + \ No newline at end of file -- cgit v1.3 From 8b98350b24cd7c95bb4bc1d90167e1ba19659edb Mon Sep 17 00:00:00 2001 From: Matt Pearring Date: Mon, 4 Nov 2019 17:08:26 -0800 Subject: [x/go.dev] restructured devops use case restructured cli use case added various company logos X-GoDev-Commit: 123691b93e0af641ebda744f524593ba52608861 --- go.dev/content/solutions/clis/index.md | 35 ++--- go.dev/content/solutions/devops/index.md | 100 ++++--------- .../themes/default/static/images/logos/comcast.svg | 65 +++++++++ .../themes/default/static/images/logos/docker.svg | 1 + .../themes/default/static/images/logos/github.svg | 59 ++++++++ .../themes/default/static/images/logos/google.svg | 28 ++++ go.dev/themes/default/static/images/logos/ibm.svg | 1 + .../default/static/images/logos/microsoft.svg | 160 +++++++++++++++++++++ .../default/static/images/logos/terraform.png | Bin 0 -> 11770 bytes go.dev/themes/default/static/images/logos/uber.svg | 39 +++++ 10 files changed, 400 insertions(+), 88 deletions(-) create mode 100644 go.dev/themes/default/static/images/logos/comcast.svg create mode 100644 go.dev/themes/default/static/images/logos/docker.svg create mode 100644 go.dev/themes/default/static/images/logos/github.svg create mode 100644 go.dev/themes/default/static/images/logos/google.svg create mode 100644 go.dev/themes/default/static/images/logos/ibm.svg create mode 100644 go.dev/themes/default/static/images/logos/microsoft.svg create mode 100644 go.dev/themes/default/static/images/logos/terraform.png create mode 100644 go.dev/themes/default/static/images/logos/uber.svg diff --git a/go.dev/content/solutions/clis/index.md b/go.dev/content/solutions/clis/index.md index 014213dd..be471269 100644 --- a/go.dev/content/solutions/clis/index.md +++ b/go.dev/content/solutions/clis/index.md @@ -21,30 +21,31 @@ resources: Command line interfaces (CLIs), unlike graphical user interfaces (GUIs), use text-only instructions and syntax to interact with applications and operating systems. While desktop and mobile are primarily GUI-based, cloud and infrastructure are CLI-based due to their easy automation and remote capabilities. CLIs allow users to perform specific computing tasks by typing text commands and receiving system replies via text outputs, and CLIs are easily automated and can be combined to create custom workflows. -Developers of CLIs find Go to be ideal for designing their applications. Go compiles very quickly into a single binary, works across platforms with a consistent style, and brings a strong development community. “The design of Go lends itself incredibly well to [many] styles of application,” [writes Elliot Forbes](https://tutorialedge.net/golang/building-a-cli-in-go/), software engineer at JP Morgan Chase. “And the ability to cross-compile a binary executable for all major platforms easily is a massive win.” - {{% gopher gopher=happy align=right %}} -Specifically, **programs written in Go run on any system without requiring any existing libraries, runtimes, or dependencies**. And **programs written in Go have an immediate startup time**—similar to C or C++ but unobtainable with other programming languages. -These two distinguishing features ensure that installing and using a Go program is just about the easiest thing ever: Unlike Java, JavaScript, PHP, Python, Ruby, or any JVM language which all require installing the right version of interpreters/runtimes (which often conflict with the system version); and unlike C or C++ which are dynamically linked to specific versions of libraries resulting in the accurately named “dependency hell” that occurs when different programs depend on different versions of libraries. +Developers of CLIs find Go to be ideal for designing their applications. Go compiles very quickly into a single binary, works across platforms with a consistent style, and brings a strong development community. “The design of Go lends itself incredibly well to [many] styles of application,” [writes Elliot Forbes](https://tutorialedge.net/golang/building-a-cli-in-go/), software engineer at JP Morgan Chase. “And the ability to cross-compile a binary executable for all major platforms easily is a massive win.” -“Go is steadily rising towards being the de facto language for servers and CLI tools,” [says Sam Boyer](https://www.sonatype.com/press-release-blog/sonatype-goes-long-with-godelivers-fully-automated-security-solution-for-fast-growing-programming-language), lead engineer at Sonatype. “The addition of formal package management support to the toolchain will only accelerate this process.” +Specifically, **programs written in Go run on any system without requiring any existing libraries, runtimes, or dependencies**. And **programs written in Go have an immediate startup time**—similar to C or C++ but unobtainable with other programming languages. -Carolyn Van Slyck, senior software engineer at Microsoft, has worked on CLIs such as dep, Docker Version Manager, Kubernetes Service Catalog, and Porter. She adds, “CLIs are best designed with predictable, task-oriented commands and you [want to use Go](https://www.youtube.com/watch?v=eMz0vni6PAw&list=PL2ntRZ1ySWBdDyspRTNBIKES1Y-P__59_&index=11&t=0s).” +{{% pullquote author="Carolyn Van Slyck, Senior Software Engineer at Microsoft." link="https://www.youtube.com/watch?v=eMz0vni6PAw&list=PL2ntRZ1ySWBdDyspRTNBIKES1Y-P__59_&index=11&t=0s" %}} +CLIs are best designed with predictable, task-oriented commands and you want to use Go. +{{% /pullquote %}} ## **Who uses Go for CLIs** -### **Comcast** - -Go has found success for teams building CLIs at Comcast. For example, Go is the Video on Demand (VOD) team’s primary language, and a good fit for CLI development because the standard library is simple to write platform-independent code that is readily cross-compiled for use in both Mac and Linux environments. The standard library makes it easy to handle command line flags, stdin, and stdout, which are all important when developing CLIs. - -### **The New York Times Company** - -The publishing company uses a lot of CLIs built in Go. “We’ve become more confident and familiar with Go,” [writes JP Robinson](https://open.blogs.nytimes.com/2014/07/10/emr-streaming-in-go/), principal software engineer at The New York Times Company. “From daemon services to simple MapReduce scripts, Go has been my team’s first choice for server-side code. It’s enabled us to build performant and reliable services that have been easy to maintain, and the Go community’s enthusiasm along with the speed of quality releases have kept us excited and eager to see what’s next for the language.” +{{% mediaList %}} + {{% mediaListBox img-src="/images/logos/comcast.svg" img-alt="Comcast Logo" img-link="https://xfinity.com" title="" align=top %}} +Comcast [uses Go for a CLI client](https://github.com/Comcast/pulsar-client-go/blob/master/cli/main.go) used to publish and subscribe to it's high-traffic sites. The company also supports an [open source client library](https://github.com/Comcast/pulsar-client-go) which is written in Go - designed for working with Apache Pulsar. + {{% /mediaListBox %}} + {{% mediaListBox img-src="/images/logos/github.svg" img-alt="GitHub Logo" img-link="https://github.com" title="" align=top %}} +GitHub [uses Go for a command-line tool](https://github.com/github/hub) that makes it easier to work with GitHub, wrapping git in order to extend it with extra features and commands. + {{% /mediaListBox %}} + {{% mediaListBox img-src="/images/logos/uber.svg" img-alt="Uber Logo" img-link="https://uber.com" title="" align=top %}} +Uber uses Go for several CLI tools, including the [CLI API for Jaeger](https://www.jaegertracing.io/docs/1.14/cli/), a distributed tracing system used for monitoring micro-service distributed systems. + {{% /mediaListBox %}} -### **Uber** +{{% /mediaListBox %}} -Uber also has several CLI tools built in Go. Go is widely used at Uber and the company's developers like to write CLIs in the same language. Again, Go's cross compilation and built-in support for working with input/output streams and CLI parameters are key benefits. One noted instance is the CLI API for [Jaeger](https://www.jaegertracing.io/docs/1.14/cli/) backend components (as a way of configuration). The Uber CLI API supports env vars, CLI flags, and config files. ## **How to use Go for CLIs** @@ -80,7 +81,9 @@ Again, programs written in Go run on any system without requiring any existing l While CLIs do not have graphical user interfaces, the UNIX philosophy that drives them suggests that they be simple, clear, composable, extensible, modular, and small. Go delivers all six elements. With Go, initialization is expressive, automatic, and easy to use. Syntax is clean and light on keywords. Go combines the ease of programming in an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. And goroutines have little overhead beyond the memory for the stack (which is just a few kilobytes). -"There are many reasons to use Go to build your next killer CLI," [concludes Ellis](https://blog.alexellis.io/5-keys-to-a-killer-go-cli/). "From the speed of compilation and execution, the availability of built-in or high-quality packages, to the ease of automation." +{{% pullquote author="Alex Ellis, founder of OpenFaaS." link="https://blog.alexellis.io/5-keys-to-a-killer-go-cli/" %}} +There are many reasons to use Go to build your next killer CLI ... From the speed of compilation and execution, the availability of built-in or high-quality packages, to the ease of automation. +{{% /pullquote %}} ## **Resources for learning more** diff --git a/go.dev/content/solutions/devops/index.md b/go.dev/content/solutions/devops/index.md index 68a194b0..62d9902c 100644 --- a/go.dev/content/solutions/devops/index.md +++ b/go.dev/content/solutions/devops/index.md @@ -41,59 +41,30 @@ scaling for speed and code maintainability as development infrastructure grows o ## **Who uses Go for DevOps & SRE** - -### **Docker** - -Docker is a software-as-a-service (SaaS) product, written in Go, that uses operating-system level virtualization to -develop and deliver software in containers hosted on a Docker Engine. DevOps/SRE teams leverage Docker to “[drive secure +{{% mediaList %}} + {{% mediaListBox img-src="/images/logos/docker.svg" img-alt="Docker Logo" img-link="https://docker.com" title="" align=top %}} +Docker is a software-as-a-service (SaaS) product, written in Go, that DevOps/SRE teams leverage to “[drive secure automation and deployment at massive scale](https://www.docker.com/solutions/cicd),” supporting their CI/CD efforts. - - - - -### **Google** - -Google leverages Go for the Google Cloud Platform (GCP), as well as at the heart of Kubernetes—an open-source -container-orchestration system, written in Go, for automating application deployment, scaling, and management. At[ -Google](https://landing.google.com/sre/), SRE's "protect, provide for, and progress the software and systems behind all -of Google’s public services—Google Search, Ads, Gmail, Android, YouTube, and App Engine, to name just a few—with an -ever-watchful eye on their availability, latency, performance, and capacity… they keep important, revenue-critical -systems up and running.” - - -### **IBM** - -IBM’s DevOps teams are heavily invested in Docker and Kubernetes, plus other DevOps and CI/CD tools written in Go as -found on the company’s [GitHub](https://github.com/IBM?utf8=%E2%9C%93&q=&type=&language=go). IBM engineering -organizations leverage Red Hat's cloud platform, [OpenShift](https://www.openshift.com), written primarily in Go, and -Red Hat's new addition, [CoreOS](https://coreos.com). CoreOS, also written in Go, delivers one of the best enterprise -Kubernetes distributions available in Tectonic—bringing automated operations, Open Cloud Services, Prometheus -monitoring, and more to simplify Kubernetes deployments, reduce engineering operating costs, and speed time to -production. - - -### **Microsoft** - -Microsoft DevOps includes the company's fully managed Azure Kubernetes Service -([AKS](https://azure.microsoft.com/en-us/services/kubernetes-service/)). AKS was designed to make deploying and managing -containerized applications easy by offering serverless Kubernetes, an integrated CI/CD experience, and enterprise-grade -security and governance. - -Like IBM, Microsoft is also leveraging Red Hat's OpenShift, written in Go, via [Azure Red Hat + {{% /mediaList %}} + {{% mediaListBox img-src="/images/logos/google.svg" img-alt="Google Logo" img-link="https://google.com" title="" align=top %}} +[Google SREs use Go](https://landing.google.com/sre/) to protect, provide for, and progress the software and systems behind all +of Google’s public services. Google now recommends that Go be used for all new SRE code. + {{% /mediaList %}} + {{% mediaListBox img-src="/images/logos/ibm.svg" img-alt="IBM Logo" img-link="https://ibm.com" title="" align=top %}} +IBM’s DevOps teams use Go through Docker and Kubernetes, plus other DevOps and CI/CD tools written in Go. The company also supports connection to it's messaging middleware through a [Go-specific API](https://developer.ibm.com/messaging/2019/02/05/simplified-ibm-mq-applications-golang/). + {{% /mediaList %}} + {{% mediaListBox img-src="/images/logos/microsoft.svg" img-alt="Microsoft Logo" img-link="https://microsoft.com" title="" align=top %}} +Microsoft uses Go in [Azure Red Hat OpenShift](https://azure.microsoft.com/en-us/services/openshift/) services. This Microsoft solution provides DevOps teams with OpenShift clusters to maintain regulatory compliance and focus on application development. + {{% /mediaList %}} + {{% mediaListBox img-src="/images/logos/terraform.png" img-alt="Terraform Logo" img-link="https://terraform.io" title="" align=top %}} +Terraform is a [tool for building, changing, and versioning infrastructure](https://www.terraform.io/intro/index.html) +safely and efficiently. It supports a number of cloud providers such as AWS, IBM Cloud, GCP, and Microsoft +Azure - and its written in Go. + {{% /mediaList %}} -[summary of how Microsoft uses Go for DevOps/SRE? Does Robert van Gent have details?] - - -### **Terraform** - -Terraform is a[ tool for building, changing, and versioning infrastructure](https://www.terraform.io/intro/index.html) -safely and efficiently. It can manage existing and popular service providers as well as custom in-house solutions. -Written in Go, Terraform supports a number of cloud infrastructure providers such as AWS, IBM Cloud, GCP, and Microsoft -Azure. From a DevOps/SRE perspective, Terraform describes infrastructure as code using a high-level configuration -syntax. It leverages execution plans and resource graphs to automate changes to infrastructure with minimal human -interaction. +{{% /mediaList %}} ## **How to use Go for DevOps & SRE** @@ -102,12 +73,8 @@ Go has been enthusiastically adopted by the DevOps and SRE communities. As previ modern cloud environment are themselves written in Go—including Docker, Etcd, Istio, Kubernetes, Prometheus, Terraform, and many others. -[do we want text for featured users/projects, or just logos? links?] - -[can we say that Google has switched to recommend Go for all new SRE code?] - DevOps/SRE teams write software ranging from small one-time scripts, to command-line interfaces (CLI), to complex -automation and services where Go excels for all of them. +automation and services, and Go's feature set has benefits for every situation. **For small scripts:** Go's fast build times and automatic formatter ([gofmt](https://golang.org/cmd/gofmt/)) enable rapid iteration. Go’s extensive standard library—including packages for common needs like HTTP, file I/O, time, regular expressions, exec, and JSON/CSV formats—lets DevOps/SREs get right into their business logic. Plus, Go's static type system and explicit error handling make even small scripts more robust. @@ -126,6 +93,8 @@ deployments,"[ says Matt Watson](https://stackify.com/site-reliability-engineeri reliability engineering is more focused on operations and monitoring. Depending on how you define DevOps, it could be related or not." +{{% gopher gopher=machine align=right %}} + Across deployment, operations, and monitoring, DevOps/SRE teams strive to achieve simplicity, reliability, and speed with their systems. But in complex development environments, such disparate goals are hard to unite. @@ -133,42 +102,29 @@ with their systems. But in complex development environments, such disparate goal allowing engineers to focus on building**, even as they optimize for deployment and support. For simplicity, Go delivers code readability, built in testing/profiling/benchmarking, a standard library, and a -homogenous environment—statically linked—[ meaning](https://blog.gopheracademy.com/advent-2018/go-devops/) “there’s no -need for external libraries, copy dependencies or worry for imports. All the code and its dependencies are in the -binary, so that’s all you need to distribute.” +homogenous environment that is statically linked. - +{{% pullquote author="Natalie Pistunovich, Engineering Manager at Fraugster." link="https://blog.gopheracademy.com/advent-2018/go-devops/" %}} +[With Go] there’s no need for external libraries, copy dependencies or worry for imports. All the code and its dependencies are in the +binary, so that’s all you need to distribute. +{{% /pullquote%}} For reliability, open source Go delivers pointers, error handling, and safe Type, meaning string operations on an int cannot happen, because it will be caught by the compiler. - - For speed, Go delivers fast compilation and machine-code execution, small binary sizes, superior garbage collection, and import-defined dependences, meaning all dependencies are included in the binary. For a list of practical Go benchmarks, visit this[ list of performance benchmarks](https://stackimpact.com/blog/practical-golang-benchmarks/) in various functionalities. - - -"With systems becoming distributed and more complex—spread over a group of services (or microservices),"[ writes Natalie -Pistunovich](https://blog.gopheracademy.com/advent-2018/go-devops/), engineering manager at Fraugster. "Observability is -becoming a trade that helps keep you on track with the system’s health." - - - Many of the modern tooling apps, for DevOps/SRE and for observability, are written in Go. For example: - - * [Grafana](https://grafana.com/) * [Helm](https://helm.sh/) * [Istio](https://istio.io/) * [Jaeger](https://www.jaegertracing.io/) * [The Open Tracing Project](https://opentracing.io/) - - As DevOps/SRE teams automate the processes between software development and IT teams, Go can help them build, test, and release software faster and more reliably. Scaling infrastructure and development for CI/CD is critical to many large technology firms today, and Go is the right language for enterprises looking to scale successfully. diff --git a/go.dev/themes/default/static/images/logos/comcast.svg b/go.dev/themes/default/static/images/logos/comcast.svg new file mode 100644 index 00000000..f8ce7a1e --- /dev/null +++ b/go.dev/themes/default/static/images/logos/comcast.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/go.dev/themes/default/static/images/logos/docker.svg b/go.dev/themes/default/static/images/logos/docker.svg new file mode 100644 index 00000000..42426899 --- /dev/null +++ b/go.dev/themes/default/static/images/logos/docker.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/logos/github.svg b/go.dev/themes/default/static/images/logos/github.svg new file mode 100644 index 00000000..977cf9d7 --- /dev/null +++ b/go.dev/themes/default/static/images/logos/github.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/go.dev/themes/default/static/images/logos/google.svg b/go.dev/themes/default/static/images/logos/google.svg new file mode 100644 index 00000000..4d8b0b63 --- /dev/null +++ b/go.dev/themes/default/static/images/logos/google.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + diff --git a/go.dev/themes/default/static/images/logos/ibm.svg b/go.dev/themes/default/static/images/logos/ibm.svg new file mode 100644 index 00000000..ad0cb64b --- /dev/null +++ b/go.dev/themes/default/static/images/logos/ibm.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/logos/microsoft.svg b/go.dev/themes/default/static/images/logos/microsoft.svg new file mode 100644 index 00000000..28ec5f11 --- /dev/null +++ b/go.dev/themes/default/static/images/logos/microsoft.svg @@ -0,0 +1,160 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/go.dev/themes/default/static/images/logos/terraform.png b/go.dev/themes/default/static/images/logos/terraform.png new file mode 100644 index 00000000..e604c32a Binary files /dev/null and b/go.dev/themes/default/static/images/logos/terraform.png differ diff --git a/go.dev/themes/default/static/images/logos/uber.svg b/go.dev/themes/default/static/images/logos/uber.svg new file mode 100644 index 00000000..bc0bd54d --- /dev/null +++ b/go.dev/themes/default/static/images/logos/uber.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + -- cgit v1.3 From e3e99d96ec4f511b04b1ffd7a54f4fd411030685 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Tue, 5 Nov 2019 00:21:59 -0500 Subject: [x/go.dev] Update web development case study Change-Id: Icca7332b14729229499b59d49c29ba1955c244d8 X-GoDev-Commit: ce2cd05848193b2ee68a663bf8e59518c51beb26 --- go.dev/content/solutions/webdev/index.md | 51 ++++++++++++++-------- .../static/images/logos/cloudflare-icon.svg | 1 + .../default/static/images/logos/economist.svg | 20 +++++++++ .../themes/default/static/images/logos/medium.svg | 1 + 4 files changed, 55 insertions(+), 18 deletions(-) create mode 100644 go.dev/themes/default/static/images/logos/cloudflare-icon.svg create mode 100644 go.dev/themes/default/static/images/logos/economist.svg create mode 100644 go.dev/themes/default/static/images/logos/medium.svg diff --git a/go.dev/content/solutions/webdev/index.md b/go.dev/content/solutions/webdev/index.md index c49f9c05..97401008 100644 --- a/go.dev/content/solutions/webdev/index.md +++ b/go.dev/content/solutions/webdev/index.md @@ -35,6 +35,11 @@ resources: Go is designed to enable developers to rapidly develop scalable and secure web applications. Go ships with an easy to use, secure and performant web server and includes it own web templating library. Go has excellent support for all of the latest technologies from [HTTP/2](https://pkg.go.dev/net/http), to databases like [MySQL](https://pkg.go.dev/mod/github.com/go-sql-driver/mysql), [MongoDB](https://pkg.go.dev/mod/go.mongodb.org/mongo-driver) and [ElasticSearch](https://pkg.go.dev/mod/github.com/elastic/go-elasticsearch/v7), to the latest encryption standards including [TLS 1.3](https://pkg.go.dev/crypto/tls). Go web applications run natively on [Google App Engine](https://cloud.google.com/appengine/) (for easy scaling) or on any environment, cloud, or operating system thanks to Go’s extreme portability. +{{% gopher gopher=front align=right %}} +For enterprises, Go is preferred for providing rapid cross-platform deployment. With its goroutines, native compilation, and the URI-based package namespacing, Go code executes to a single, small binary—with zero dependencies—making it very fast. + +“If you are looking for powerful tools for web programming, mobile development, microservices, and ERP systems,” [writes Andrew Smith](https://dzone.com/articles/golang-web-development-better-than-python), marketing manager at QArea. “Go web development has proved to be faster than using Python for the same kind of tasks in many use cases.” + {{% pullquote author="Tigran Bayburtsyan, Co-Founder and CTO at Hexact Inc." link="https://hackernoon.com/5-reasons-why-we-switched-from-python-to-go-4414d5f42690" %}} Go Language is the easiest language that I’ve ever seen and used... For me, Go is easier to learn than even JavaScript. {{% /pullquote %}} @@ -51,10 +56,6 @@ Bayburtsyan summarizes the five key reasons his company switched to Go: 5. **Great IDE support and debugging** — “After rewriting all projects to Go, we got 64 percent less code than we had earlier.” -{{% gopher gopher=front align=right %}} -For enterprises, Go is preferred for providing rapid cross-platform deployment. With its goroutines, native compilation, and the URI-based package namespacing, Go code executes to a single, small binary—with zero dependencies—making it very fast. - -“If you are looking for powerful tools for web programming, mobile development, microservices, and ERP systems,” [writes Andrew Smith](https://dzone.com/articles/golang-web-development-better-than-python), marketing manager at QArea. “Go web development has proved to be faster than using Python for the same kind of tasks in many use cases.” ## Featured Go web development users and projects @@ -65,17 +66,18 @@ For enterprises, Go is preferred for providing rapid cross-platform deployment. {{% mediaListBox img-src="/images/logos/caddy.svg" img-alt="Caddy Logo" img-link="https://caddyserver.com" title="Caddy" align=top %}} [Caddy 2](https://caddyserver.com) is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go. Written in Go, Caddy offers greater memory safety than servers written in C. A hardened TLS stack powered by the Go standard library serves a significant portion of all Internet traffic. {{% /mediaListBox %}} - {{% mediaListBox img-src="/images/logos/lets-encrypt-icon.svg" img-alt="Let's Encrypt Logo" img-link="https://letsencrypt.org" title="Let's Encrypt" align=top %}} -Let’s Encrypt is a free, automated, and open Certificate Authority run by the non-profit Internet Security Research Group (ISRG). The CA's [website](https://letsencrypt.org/) is powered by Hugo—a static site generator written in Go. Plus, for web services written in Go (using the built-in Go web server), Let's Encrypt allows web developers to serve pages over HTTPS with quick and minimal setup. + {{% mediaListBox img-src="/images/logos/medium.svg" img-alt="Medium Logo" img-link="https://medium.org" title="Medium" align=top %}} +Medium gets "over 25 million unique readers every month and tens of thousands of posts published each week." Medium uses Go to power [their social graph](https://medium.engineering/how-medium-goes-social-b7dbefa6d413), their [image server and several auxiliary services](https://medium.engineering/how-medium-goes-social-b7dbefa6d413). "We’ve found Go very easy to build, package, and deploy. We like the type-safety without the verbosity and JVM tuning of Java." {{% /mediaListBox %}} - {{% mediaListBox img-src="Cloudflare Logo" img-alt="" title="hold" align="top" %}} - + {{% mediaListBox img-src="/images/logos/cloudflare-icon.svg" img-alt="Cloudflare Logo" title="Cloudflare" align="top" %}} +Cloudflare speeds up and protects millions of websites, APIs, SaaS services, and other properties connected to the Internet. "[Go is at the heart of CloudFlare's services](https://blog.cloudflare.com/what-weve-been-doing-with-go/) including handling compression for high-latency HTTP connections, our entire DNS infrastructure, SSL, load testing and more." Go's early support for TLS 1.3 enabled CloudFlare to be [one of the early adopters](https://blog.cloudflare.com/know-your-scm_rights/) of this critical improvement before OpenSSL or BoringSSL even had an implementation. {{% /mediaListBox %}} - {{% mediaListBox img-src="/images/logos/govuk.svg" img-alt="Gov.UK Logo" img-link="https://gov.uk" title="Gov.UK" align=top %}} -GOV.UK made the decision to develop in Go back in 2013. The simplicity and safety of the Go language were a good fit for a core component of their HTTP infrastructure, and some brief experiments with the excellent net/http package convinced web developers they were on the right track. “In particular, Go’s concurrency model makes it absurdly easy to build performant I/O-bound applications,” note Nick Stenning and James Stewart in their [Technology in Government blog](https://technology.blog.gov.uk/2013/12/05/building-a-new-router-for-gov-uk/). + {{% mediaListBox img-src="/images/logos/economist.svg" img-alt="Economist Logo" img-link="https://economist.com" title="The Economist" align=top %}} +The Economist needed more flexibility to deliver content to increasingly diverse digital channels. Services written in Go was a key component of the new system that would enable The Economist to deliver scalable, high performing services and quickly iterate new products. +[“Overall, it was determined that Go was the language best designed for usability and efficiency in a distributed, cloud-based system.”](https://www.infoq.com/articles/golang-the-economist/) {{% /mediaListBox %}} - {{% mediaListBox img-src="/images/logos/uber-app-icon.svg" img-alt="Uber Logo" title="Uber" align=top %}} -[In early 2015](https://eng.uber.com/go-geofence/), Uber leveraged Go to build a microservice for their geofence lookups. At Uber, a geofence refers to a human-defined geographic area on the Earth’s surface, and Uber uses geofences to show its users which products are available at a given location, to define areas with specific requirements such as airports, and to implement dynamic pricing in areas where many people are requesting rides at the same time. By 2016, this service was Uber’s highest queries per second (QPS) service out of the hundreds they run in production—thanks to Go helping them build and scale it so fast. + {{% mediaListBox img-src="/images/logos/govuk.svg" img-alt="Gov.UK Logo" img-link="https://gov.uk" title="Gov.UK" align=top %}} +The simplicity and safety of the Go language were a good fit for a core component of their HTTP infrastructure, and some brief experiments with the excellent net/http package convinced web developers they were on the right track. [“In particular, Go’s concurrency model makes it absurdly easy to build performant I/O-bound applications,”](https://technology.blog.gov.uk/2013/12/05/building-a-new-router-for-gov-uk/). {{% /mediaListBox %}} {{% /mediaList %}} @@ -97,19 +99,32 @@ GOV.UK made the decision to develop in Go back in 2013. The simplicity and safet {{< headerWithLink header="Routers" search="http router" level=3 >}} +* [httprouter](https://pkg.go.dev/github.com/julienschmidt/httprouter?tab=overview), a lightweight high performance HTTP request router +* [Gorilla/mux](http://www.gorillatoolkit.org/pkg/mux), a powerful HTTP router and URL matcher for building Go web servers with 🦍 +* [Chi](https://pkg.go.dev/github.com/go-chi/chi?tab=overview), a lightweight, idiomatic and composable router for building Go HTTP services. +* [net/http](https://pkg.go.dev/net/http), standard library HTTP package + {{< headerWithLink header="Template Engines" search="templates" level=3 >}} +* [html/template](https://pkg.go.dev/html/template), standard library HTML template engine +* [pongo2](https://pkg.go.dev/github.com/flosch/pongo2?tab=overview), a Django-syntax like templating-language + {{< headerWithLink header="Databases" search="database" level=3 >}} -* [Bleve](http://blevesearch.com/), full-text search and indexing for Go, providing a simple top-level API to index any object in the data model and override default mapping to customize behavior. -* [CockroachDB](https://www.cockroachlabs.com/), an evolution of the database—architected for the cloud to deliver resilient, consistent, distributed SQL at scale. +* [database/sql](https://pkg.go.dev/database/sql), standard library interface with driver support for MySQL, Postgres, Oracle, MS SQL, BigQuery and [most SQL databases](https://github.com/golang/go/wiki/SQLDrivers) +* [GORM](https://gorm.io/), an ORM library for Go +* [mongo](https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo?tab=overview), The MongoDB supported driver for Go +* [elastic](https://pkg.go.dev/github.com/olivere/elastic?tab=overview), an Elasticsearch client for Go +* [Bleve](http://blevesearch.com/), full-text search and indexing for Go +* [CockroachDB](https://www.cockroachlabs.com/), an evolution of the database—architected for the cloud to deliver resilient, consistent, distributed SQL at scale ### Courses -* https://www.usegolang.com +* [Learn to Create Web Applications using Go](https://www.usegolang.com), a paid online course ### Projects * [GopherJS](https://github.com/gopherjs/gopherjs), a compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers. -* [Hugo](https://gohugo.io/) -* [Mattermost](https://mattermost.com/) -* [Caddy](https://caddyserver.com/) +* [Hugo](https://gohugo.io/), The world’s fastest framework for building websites +* [Mattermost](https://mattermost.com/), a flexible, open source messaging platform +that enables secure team collaboration +* [Caddy](https://caddyserver.com/), a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go diff --git a/go.dev/themes/default/static/images/logos/cloudflare-icon.svg b/go.dev/themes/default/static/images/logos/cloudflare-icon.svg new file mode 100644 index 00000000..8ad9cd68 --- /dev/null +++ b/go.dev/themes/default/static/images/logos/cloudflare-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/themes/default/static/images/logos/economist.svg b/go.dev/themes/default/static/images/logos/economist.svg new file mode 100644 index 00000000..666cef85 --- /dev/null +++ b/go.dev/themes/default/static/images/logos/economist.svg @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/go.dev/themes/default/static/images/logos/medium.svg b/go.dev/themes/default/static/images/logos/medium.svg new file mode 100644 index 00000000..c200c507 --- /dev/null +++ b/go.dev/themes/default/static/images/logos/medium.svg @@ -0,0 +1 @@ + \ No newline at end of file -- cgit v1.3 From 275e80631765a3e128ad3b5d10902822e8f7127d Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Tue, 5 Nov 2019 00:32:53 -0500 Subject: [x/go.dev] progress on cloud use case Change-Id: I53cc086745b3f23d3b38d3245498b1ecf3232be3 X-GoDev-Commit: b6d462159f1b705ab63a058bd197b35423816c67 --- go.dev/content/solutions/cloud/index.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/go.dev/content/solutions/cloud/index.md b/go.dev/content/solutions/cloud/index.md index b5275220..71ae043f 100644 --- a/go.dev/content/solutions/cloud/index.md +++ b/go.dev/content/solutions/cloud/index.md @@ -85,9 +85,13 @@ Other teams noticed how well Go was suited for various systems at PayPal and dec Twitch [uses Go to power many of its busiest systems](https://blog.twitch.tv/en/2016/07/05/gos-march-to-low-latency-gc-a6fa96f06eb7/) that serve live video and chat to millions of users. -### **Uber** -Uber uses Go to power several of its critical services that impact the experience of millions of drivers and passengers around the world. From their [real-time analytics engine](https://eng.uber.com/aresdb/), AresDB, to their [microservice for Geo-querying](https://eng.uber.com/go-geofence/), Geofence, and [their resource scheduler](https://eng.uber.com/open-sourcing-peloton/), Peloton, Uber uses Go to maintain high levels of reliability, developer productivity, and complex workloads at scale. +{{% mediaList %}} + {{% mediaListBox img-src="/images/logos/uber-app-icon.svg" img-alt="Uber Logo" title="Uber" align=top %}} +Uber uses Go to power several of its critical services that impact the experience of millions of drivers and passengers around the world. From their [real-time analytics engine](https://eng.uber.com/aresdb/), AresDB, to their [microservice for Geo-querying](https://eng.uber.com/go-geofence/), Geofence, and [their resource scheduler](https://eng.uber.com/open-sourcing-peloton/). + {{% /mediaListBox %}} +{{% /mediaList %}} + ## **How to use Go for Cloud Computing** -- cgit v1.3 From bddf0b578a8f11f0f59890ef9be84278a2d9a1c3 Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Tue, 5 Nov 2019 10:45:22 -0500 Subject: [x/go.dev] populate footer nav Change-Id: I4427f67eb31581a38b9d39e206735d5075e402d8 X-GoDev-Commit: ab4c3bbb3655153fb6dba4ffdbfe09ab036aa79a --- go.dev/config.toml | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/go.dev/config.toml b/go.dev/config.toml index 81b8183a..d1e311ca 100644 --- a/go.dev/config.toml +++ b/go.dev/config.toml @@ -65,6 +65,24 @@ theme = "default" url = "/learn" weight = -100 + [[menu.footer]] + name = "Playground" + url = "https://play.golang.org" + parent = "learn" + weight = -90 + + [[menu.footer]] + name = "Tour" + url = "https://tour.golang.org" + parent = "learn" + weight = -80 + + [[menu.footer]] + name = "Stack Overflow" + url = "https://stackoverflow.com/questions/tagged/go?tab=Newest" + parent = "learn" + weight = -70 + [[menu.footer]] identifier = "explore" name = "Explore" @@ -78,3 +96,76 @@ theme = "default" title = "About" url = "https://www.golang.org" weight = -80 + + [[menu.footer]] + name = "Download" + parent = "about" + url = "https://golang.org/dl/" + weight = -70 + + [[menu.footer]] + name = "Blog" + parent = "about" + url = "https://blog.golang.org" + weight = -60 + + [[menu.footer]] + name = "Issue Tracker" + parent = "about" + url = "https://github.com/golang/go/issues" + weight = -50 + + [[menu.footer]] + name = "Release Notes" + parent = "about" + url = "https://golang.org/doc/devel/release.html" + weight = -50 + + [[menu.footer]] + name = "Brand Guidelines" + parent = "about" + url = "https://blog.golang.org/go-brand" + weight = -40 + + [[menu.footer]] + identifier = "connect" + name = "Connect" + title = "Connect" + url = "https://www.twitter.com/golang" + weight = -70 + + [[menu.footer]] + name = "r/golang" + parent = "connect" + url = "https://reddit.com/r/golang" + weight = -70 + + [[menu.footer]] + name = "Twitter" + parent = "connect" + url = "https://www.twitter.com/golang" + weight = -70 + + [[menu.footer]] + name = "Github" + parent = "connect" + url = "https://github.com/golang" + weight = -50 + + [[menu.footer]] + name = "Slack" + parent = "connect" + url = "https://invite.slack.golangbridge.org/" + weight = -40 + + [[menu.footer]] + name = "Meetup" + parent = "connect" + url = "https://www.meetup.com/pro/go" + weight = -30 + + [[menu.footer]] + name = "Golang Weekly" + parent = "connect" + url = "https://golangweekly.com/" + weight = -20 \ No newline at end of file -- cgit v1.3 From 78cc10d64a0802566670893cf6f2d3a8f5373e1d Mon Sep 17 00:00:00 2001 From: Steve Francia Date: Tue, 5 Nov 2019 11:25:06 -0500 Subject: [x/go.dev] keep header consistent across site Change-Id: Ia03d9daca134fd542e3ee61c06d4d135985a718a X-GoDev-Commit: 15aa09c7cc99c8146c8e8e822ab59e1b395758f7 --- go.dev/themes/default/assets/css/styles.css | 18 +++++++++--------- go.dev/themes/default/layouts/_default/baseof.html | 16 ++++++++-------- go.dev/themes/default/layouts/index.html | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.dev/themes/default/assets/css/styles.css b/go.dev/themes/default/assets/css/styles.css index 9b85651b..03c0bf13 100644 --- a/go.dev/themes/default/assets/css/styles.css +++ b/go.dev/themes/default/assets/css/styles.css @@ -22,8 +22,8 @@ a:hover { font-family: 'Roboto', sans-serif; margin: 0; } -.Site--blue { - background: #007d9c; +.bluebg { + background: #007d9c; } .Site-content { flex: 1; @@ -34,10 +34,8 @@ a:hover { font-size: 14px; } .Site-header { - border-bottom: 1px solid #e0e0e0; -} -.Site-header--blue { border-bottom: none; + background: #007d9c; } .Header, .Footer, @@ -113,8 +111,8 @@ h5, h6 { } .Header-menuItem a:link, .Header-menuItem a:visited { - border-bottom: 2px solid transparent; - border-top: 2px solid transparent; /* To ensure the text remains centered. */ + border-bottom: 3px solid transparent; + border-top: 3px solid transparent; /* To ensure the text remains centered. */ color: #3e4042; display: inline-block; padding: 20px 15px; @@ -129,11 +127,13 @@ h5, h6 { } .Header-menuItem--active a:link, .Header-menuItem--active a:visited { - border-bottom-color: #00add8; + /* border-bottom-color: #00add8; */ + border-top-color: #00add8; font-weight: bold; } .Header-menuItem a:hover { - border-bottom-color: #542c7d; + /* border-bottom-color: #ce3262; */ + border-top-color: #ce3262; color: #3e4042; } .Header-navOpen { diff --git a/go.dev/themes/default/layouts/_default/baseof.html b/go.dev/themes/default/layouts/_default/baseof.html index 051556e3..29aaed9f 100644 --- a/go.dev/themes/default/layouts/_default/baseof.html +++ b/go.dev/themes/default/layouts/_default/baseof.html @@ -19,19 +19,19 @@ {{end -}} - -
    -
    + +
    @@ -30,12 +32,14 @@
    {{$logo := .Resources.GetMatch "logo"}} {{.Params.company}} - {{if not (eq .Params.company "Google")}} -

    - About {{.Params.company}} -

    +

    + About {{.Params.company}} +

    + {{if isset .Params "description"}} +

    {{- .Params.description | markdownify -}}

    + {{ else }} +

    {{- .Params.quote | markdownify -}}

    {{end}} -

    {{.Params.quote}}

    diff --git a/go.dev/static/images/SCN_magnifying_glass_cloud_site.png b/go.dev/static/images/SCN_magnifying_glass_cloud_site.png index c1d1d302..17c31360 100644 Binary files a/go.dev/static/images/SCN_magnifying_glass_cloud_site.png and b/go.dev/static/images/SCN_magnifying_glass_cloud_site.png differ diff --git a/go.dev/static/images/adobe-logo.png b/go.dev/static/images/adobe-logo.png index 802b3e89..044c811b 100644 Binary files a/go.dev/static/images/adobe-logo.png and b/go.dev/static/images/adobe-logo.png differ diff --git a/go.dev/static/images/books/building-microservices-with-go.jpg b/go.dev/static/images/books/building-microservices-with-go.jpg index bf0fd201..8891f281 100644 Binary files a/go.dev/static/images/books/building-microservices-with-go.jpg and b/go.dev/static/images/books/building-microservices-with-go.jpg differ diff --git a/go.dev/static/images/books/building-restful-web-services-with-go.jpg b/go.dev/static/images/books/building-restful-web-services-with-go.jpg index b76f2b5a..52e65dd2 100644 Binary files a/go.dev/static/images/books/building-restful-web-services-with-go.jpg and b/go.dev/static/images/books/building-restful-web-services-with-go.jpg differ diff --git a/go.dev/static/images/books/go-in-action.jpg b/go.dev/static/images/books/go-in-action.jpg index 4e3cb4b6..41f613b0 100644 Binary files a/go.dev/static/images/books/go-in-action.jpg and b/go.dev/static/images/books/go-in-action.jpg differ diff --git a/go.dev/static/images/books/go-programming-for-network-operations.jpg b/go.dev/static/images/books/go-programming-for-network-operations.jpg index fda496df..5c0e61aa 100644 Binary files a/go.dev/static/images/books/go-programming-for-network-operations.jpg and b/go.dev/static/images/books/go-programming-for-network-operations.jpg differ diff --git a/go.dev/static/images/books/go-web-development-cookbook.jpg b/go.dev/static/images/books/go-web-development-cookbook.jpg index c82a0427..3243d62b 100644 Binary files a/go.dev/static/images/books/go-web-development-cookbook.jpg and b/go.dev/static/images/books/go-web-development-cookbook.jpg differ diff --git a/go.dev/static/images/books/go-web-programming.jpg b/go.dev/static/images/books/go-web-programming.jpg index 448a29fd..af352b6c 100644 Binary files a/go.dev/static/images/books/go-web-programming.jpg and b/go.dev/static/images/books/go-web-programming.jpg differ diff --git a/go.dev/static/images/books/hands-on-software-architecture-with-golang.jpg b/go.dev/static/images/books/hands-on-software-architecture-with-golang.jpg index a0ddc719..1b9d507e 100644 Binary files a/go.dev/static/images/books/hands-on-software-architecture-with-golang.jpg and b/go.dev/static/images/books/hands-on-software-architecture-with-golang.jpg differ diff --git a/go.dev/static/images/books/mastering-go-web-services.jpg b/go.dev/static/images/books/mastering-go-web-services.jpg index d387f74d..2772ea58 100644 Binary files a/go.dev/static/images/books/mastering-go-web-services.jpg and b/go.dev/static/images/books/mastering-go-web-services.jpg differ diff --git a/go.dev/static/images/books/powerful-command-line-applications-in-go.jpg b/go.dev/static/images/books/powerful-command-line-applications-in-go.jpg index fd6846c4..548e7925 100644 Binary files a/go.dev/static/images/books/powerful-command-line-applications-in-go.jpg and b/go.dev/static/images/books/powerful-command-line-applications-in-go.jpg differ diff --git a/go.dev/static/images/books/web-development-with-go.jpg b/go.dev/static/images/books/web-development-with-go.jpg index 9f76789e..a93db9f2 100644 Binary files a/go.dev/static/images/books/web-development-with-go.jpg and b/go.dev/static/images/books/web-development-with-go.jpg differ diff --git a/go.dev/static/images/device-information.png b/go.dev/static/images/device-information.png index 01fa6065..d0a33311 100644 Binary files a/go.dev/static/images/device-information.png and b/go.dev/static/images/device-information.png differ diff --git a/go.dev/static/images/empty_case_study.png b/go.dev/static/images/empty_case_study.png new file mode 100644 index 00000000..0b1fb454 Binary files /dev/null and b/go.dev/static/images/empty_case_study.png differ diff --git a/go.dev/static/images/empty_case_study_2.png b/go.dev/static/images/empty_case_study_2.png new file mode 100644 index 00000000..290d9a48 Binary files /dev/null and b/go.dev/static/images/empty_case_study_2.png differ diff --git a/go.dev/static/images/go_amex_case_study.png b/go.dev/static/images/go_amex_case_study.png index b6d66e30..d6dba100 100644 Binary files a/go.dev/static/images/go_amex_case_study.png and b/go.dev/static/images/go_amex_case_study.png differ diff --git a/go.dev/static/images/go_amex_case_study_logo.png b/go.dev/static/images/go_amex_case_study_logo.png index 6092c906..d2f6a223 100644 Binary files a/go.dev/static/images/go_amex_case_study_logo.png and b/go.dev/static/images/go_amex_case_study_logo.png differ diff --git a/go.dev/static/images/go_at&t_case_study.png b/go.dev/static/images/go_at&t_case_study.png index 06e77ccd..a115a3e3 100644 Binary files a/go.dev/static/images/go_at&t_case_study.png and b/go.dev/static/images/go_at&t_case_study.png differ diff --git a/go.dev/static/images/go_at_t_case_study_logo.png b/go.dev/static/images/go_at_t_case_study_logo.png index a40894fc..bb57455f 100644 Binary files a/go.dev/static/images/go_at_t_case_study_logo.png and b/go.dev/static/images/go_at_t_case_study_logo.png differ diff --git a/go.dev/static/images/go_chrome_case_study.png b/go.dev/static/images/go_chrome_case_study.png new file mode 100644 index 00000000..4e22e431 Binary files /dev/null and b/go.dev/static/images/go_chrome_case_study.png differ diff --git a/go.dev/static/images/go_core_data_case_study.png b/go.dev/static/images/go_core_data_case_study.png new file mode 100644 index 00000000..2da16d14 Binary files /dev/null and b/go.dev/static/images/go_core_data_case_study.png differ diff --git a/go.dev/static/images/go_firebase_case_study.png b/go.dev/static/images/go_firebase_case_study.png new file mode 100644 index 00000000..5b35bfd2 Binary files /dev/null and b/go.dev/static/images/go_firebase_case_study.png differ diff --git a/go.dev/static/images/go_google_case_study_carousel.png b/go.dev/static/images/go_google_case_study_carousel.png new file mode 100644 index 00000000..885c400f Binary files /dev/null and b/go.dev/static/images/go_google_case_study_carousel.png differ diff --git a/go.dev/static/images/go_mercadolibre_case_study.png b/go.dev/static/images/go_mercadolibre_case_study.png index 16924b3f..07679222 100644 Binary files a/go.dev/static/images/go_mercadolibre_case_study.png and b/go.dev/static/images/go_mercadolibre_case_study.png differ diff --git a/go.dev/static/images/go_mercadolibre_case_study_logo.png b/go.dev/static/images/go_mercadolibre_case_study_logo.png index c136c5e2..822c6c39 100644 Binary files a/go.dev/static/images/go_mercadolibre_case_study_logo.png and b/go.dev/static/images/go_mercadolibre_case_study_logo.png differ diff --git a/go.dev/static/images/go_paypal_case_study.png b/go.dev/static/images/go_paypal_case_study.png index 7c34a9ef..eb96d7df 100644 Binary files a/go.dev/static/images/go_paypal_case_study.png and b/go.dev/static/images/go_paypal_case_study.png differ diff --git a/go.dev/static/images/go_paypal_case_study_logo.png b/go.dev/static/images/go_paypal_case_study_logo.png index dc8710f8..b1dde6e7 100644 Binary files a/go.dev/static/images/go_paypal_case_study_logo.png and b/go.dev/static/images/go_paypal_case_study_logo.png differ diff --git a/go.dev/static/images/google-grey.png b/go.dev/static/images/google-grey.png index 897a494b..36b90cc3 100644 Binary files a/go.dev/static/images/google-grey.png and b/go.dev/static/images/google-grey.png differ diff --git a/go.dev/static/images/google-logo.png b/go.dev/static/images/google-logo.png index 8fd4f201..05764e7d 100644 Binary files a/go.dev/static/images/google-logo.png and b/go.dev/static/images/google-logo.png differ diff --git a/go.dev/static/images/google-white.png b/go.dev/static/images/google-white.png index bf036746..c55ee301 100644 Binary files a/go.dev/static/images/google-white.png and b/go.dev/static/images/google-white.png differ diff --git a/go.dev/static/images/gophers/factory.png b/go.dev/static/images/gophers/factory.png index 7a1b4d37..d94dfb48 100644 Binary files a/go.dev/static/images/gophers/factory.png and b/go.dev/static/images/gophers/factory.png differ diff --git a/go.dev/static/images/gophers/newscasters.png b/go.dev/static/images/gophers/newscasters.png index 292e672d..76a17398 100644 Binary files a/go.dev/static/images/gophers/newscasters.png and b/go.dev/static/images/gophers/newscasters.png differ diff --git a/go.dev/static/images/gophers/shopping-cart.png b/go.dev/static/images/gophers/shopping-cart.png index ad9ab89b..de8e0f2f 100644 Binary files a/go.dev/static/images/gophers/shopping-cart.png and b/go.dev/static/images/gophers/shopping-cart.png differ diff --git a/go.dev/static/images/learn/codecademy.png b/go.dev/static/images/learn/codecademy.png index b07c7e82..89699716 100644 Binary files a/go.dev/static/images/learn/codecademy.png and b/go.dev/static/images/learn/codecademy.png differ diff --git a/go.dev/static/images/learn/codelabs.png b/go.dev/static/images/learn/codelabs.png index 0a2a56c5..7fa097cd 100644 Binary files a/go.dev/static/images/learn/codelabs.png and b/go.dev/static/images/learn/codelabs.png differ diff --git a/go.dev/static/images/learn/codelabs_2.png b/go.dev/static/images/learn/codelabs_2.png index 2bad1c1c..7dd71cba 100644 Binary files a/go.dev/static/images/learn/codelabs_2.png and b/go.dev/static/images/learn/codelabs_2.png differ diff --git a/go.dev/static/images/learn/concurrency-in-go.jpeg b/go.dev/static/images/learn/concurrency-in-go.jpeg index 8e544491..d2c140c6 100644 Binary files a/go.dev/static/images/learn/concurrency-in-go.jpeg and b/go.dev/static/images/learn/concurrency-in-go.jpeg differ diff --git a/go.dev/static/images/learn/coursera.png b/go.dev/static/images/learn/coursera.png index 0afd6473..42e094be 100644 Binary files a/go.dev/static/images/learn/coursera.png and b/go.dev/static/images/learn/coursera.png differ diff --git a/go.dev/static/images/learn/earth.png b/go.dev/static/images/learn/earth.png index 7599d297..cfcdfc3b 100644 Binary files a/go.dev/static/images/learn/earth.png and b/go.dev/static/images/learn/earth.png differ diff --git a/go.dev/static/images/learn/edureka.png b/go.dev/static/images/learn/edureka.png index ddbbdf0f..4800460d 100644 Binary files a/go.dev/static/images/learn/edureka.png and b/go.dev/static/images/learn/edureka.png differ diff --git a/go.dev/static/images/learn/exercism.png b/go.dev/static/images/learn/exercism.png index b1fb92a2..e299e83e 100644 Binary files a/go.dev/static/images/learn/exercism.png and b/go.dev/static/images/learn/exercism.png differ diff --git a/go.dev/static/images/learn/get-programming-with-go.jpeg b/go.dev/static/images/learn/get-programming-with-go.jpeg index f1ea94aa..605e4dba 100644 Binary files a/go.dev/static/images/learn/get-programming-with-go.jpeg and b/go.dev/static/images/learn/get-programming-with-go.jpeg differ diff --git a/go.dev/static/images/learn/go-programming-blueprints.png b/go.dev/static/images/learn/go-programming-blueprints.png index c95fdeda..e46dbb38 100644 Binary files a/go.dev/static/images/learn/go-programming-blueprints.png and b/go.dev/static/images/learn/go-programming-blueprints.png differ diff --git a/go.dev/static/images/learn/go-programming-language-book.png b/go.dev/static/images/learn/go-programming-language-book.png index e2cd9924..0c69a0cf 100644 Binary files a/go.dev/static/images/learn/go-programming-language-book.png and b/go.dev/static/images/learn/go-programming-language-book.png differ diff --git a/go.dev/static/images/learn/go_cdk_logo.png b/go.dev/static/images/learn/go_cdk_logo.png index 2607a203..25380f71 100644 Binary files a/go.dev/static/images/learn/go_cdk_logo.png and b/go.dev/static/images/learn/go_cdk_logo.png differ diff --git a/go.dev/static/images/learn/gobyexample.png b/go.dev/static/images/learn/gobyexample.png index 418cbc39..9256899c 100644 Binary files a/go.dev/static/images/learn/gobyexample.png and b/go.dev/static/images/learn/gobyexample.png differ diff --git a/go.dev/static/images/learn/gohelloworld.png b/go.dev/static/images/learn/gohelloworld.png index f573f3a4..108806e6 100644 Binary files a/go.dev/static/images/learn/gohelloworld.png and b/go.dev/static/images/learn/gohelloworld.png differ diff --git a/go.dev/static/images/learn/gophercises_1.png b/go.dev/static/images/learn/gophercises_1.png index a1e5d6b8..e2732eca 100644 Binary files a/go.dev/static/images/learn/gophercises_1.png and b/go.dev/static/images/learn/gophercises_1.png differ diff --git a/go.dev/static/images/learn/helloworld.png b/go.dev/static/images/learn/helloworld.png index 703625bb..4f36e920 100644 Binary files a/go.dev/static/images/learn/helloworld.png and b/go.dev/static/images/learn/helloworld.png differ diff --git a/go.dev/static/images/learn/install.png b/go.dev/static/images/learn/install.png index 1bde9f10..600cb2f5 100644 Binary files a/go.dev/static/images/learn/install.png and b/go.dev/static/images/learn/install.png differ diff --git a/go.dev/static/images/learn/introducing-go-book.png b/go.dev/static/images/learn/introducing-go-book.png index 8c6150bd..4eb3d3d2 100644 Binary files a/go.dev/static/images/learn/introducing-go-book.png and b/go.dev/static/images/learn/introducing-go-book.png differ diff --git a/go.dev/static/images/learn/qwiklabs.png b/go.dev/static/images/learn/qwiklabs.png index 4a32afb1..65acd019 100644 Binary files a/go.dev/static/images/learn/qwiklabs.png and b/go.dev/static/images/learn/qwiklabs.png differ diff --git a/go.dev/static/images/learn/tour.png b/go.dev/static/images/learn/tour.png index f8213da5..912f445c 100644 Binary files a/go.dev/static/images/learn/tour.png and b/go.dev/static/images/learn/tour.png differ diff --git a/go.dev/static/images/logos/american-express.png b/go.dev/static/images/logos/american-express.png new file mode 100644 index 00000000..242d9934 Binary files /dev/null and b/go.dev/static/images/logos/american-express.png differ diff --git a/go.dev/static/images/logos/american-express.svg b/go.dev/static/images/logos/american-express.svg new file mode 100644 index 00000000..fd3a5284 --- /dev/null +++ b/go.dev/static/images/logos/american-express.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/static/images/logos/amex-logo.png b/go.dev/static/images/logos/amex-logo.png index 298ccf6e..26080b0c 100644 Binary files a/go.dev/static/images/logos/amex-logo.png and b/go.dev/static/images/logos/amex-logo.png differ diff --git a/go.dev/static/images/logos/chrome.svg b/go.dev/static/images/logos/chrome.svg new file mode 100644 index 00000000..3a2a5a96 --- /dev/null +++ b/go.dev/static/images/logos/chrome.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/static/images/logos/cloudflare.png b/go.dev/static/images/logos/cloudflare.png index 90388fca..8cd4914c 100644 Binary files a/go.dev/static/images/logos/cloudflare.png and b/go.dev/static/images/logos/cloudflare.png differ diff --git a/go.dev/static/images/logos/cockroach.svg b/go.dev/static/images/logos/cockroach.svg index aa64d337..0954963d 100644 --- a/go.dev/static/images/logos/cockroach.svg +++ b/go.dev/static/images/logos/cockroach.svg @@ -1,8 +1 @@ - - - - - + \ No newline at end of file diff --git a/go.dev/static/images/logos/curve.png b/go.dev/static/images/logos/curve.png new file mode 100644 index 00000000..8cfb6188 Binary files /dev/null and b/go.dev/static/images/logos/curve.png differ diff --git a/go.dev/static/images/logos/dropbox.png b/go.dev/static/images/logos/dropbox.png new file mode 100644 index 00000000..d17804a9 Binary files /dev/null and b/go.dev/static/images/logos/dropbox.png differ diff --git a/go.dev/static/images/logos/facebook.png b/go.dev/static/images/logos/facebook.png new file mode 100644 index 00000000..59362688 Binary files /dev/null and b/go.dev/static/images/logos/facebook.png differ diff --git a/go.dev/static/images/logos/firebase.svg b/go.dev/static/images/logos/firebase.svg new file mode 100644 index 00000000..421d452a --- /dev/null +++ b/go.dev/static/images/logos/firebase.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/go.dev/static/images/logos/gokit.png b/go.dev/static/images/logos/gokit.png index c3259877..4c47041f 100644 Binary files a/go.dev/static/images/logos/gokit.png and b/go.dev/static/images/logos/gokit.png differ diff --git a/go.dev/static/images/logos/google-cloud.png b/go.dev/static/images/logos/google-cloud.png index 5b0a9803..80a47820 100644 Binary files a/go.dev/static/images/logos/google-cloud.png and b/go.dev/static/images/logos/google-cloud.png differ diff --git a/go.dev/static/images/logos/grail.png b/go.dev/static/images/logos/grail.png new file mode 100644 index 00000000..026099c2 Binary files /dev/null and b/go.dev/static/images/logos/grail.png differ diff --git a/go.dev/static/images/logos/mattermost.png b/go.dev/static/images/logos/mattermost.png index e194d09b..3a8116cf 100644 Binary files a/go.dev/static/images/logos/mattermost.png and b/go.dev/static/images/logos/mattermost.png differ diff --git a/go.dev/static/images/logos/mercado-libre.png b/go.dev/static/images/logos/mercado-libre.png new file mode 100644 index 00000000..93657b31 Binary files /dev/null and b/go.dev/static/images/logos/mercado-libre.png differ diff --git a/go.dev/static/images/logos/microsoft.png b/go.dev/static/images/logos/microsoft.png new file mode 100644 index 00000000..5ff7c6b1 Binary files /dev/null and b/go.dev/static/images/logos/microsoft.png differ diff --git a/go.dev/static/images/logos/paypal.svg b/go.dev/static/images/logos/paypal.svg index ba7a6d90..6528aee8 100644 --- a/go.dev/static/images/logos/paypal.svg +++ b/go.dev/static/images/logos/paypal.svg @@ -1,41 +1 @@ - - - -paypal - - - - - - - - - - - - + \ No newline at end of file diff --git a/go.dev/static/images/logos/target.svg b/go.dev/static/images/logos/target.svg index ef7cf04f..05974a05 100644 --- a/go.dev/static/images/logos/target.svg +++ b/go.dev/static/images/logos/target.svg @@ -1,24 +1 @@ - - - -target - - - - - - - - - + \ No newline at end of file diff --git a/go.dev/static/images/logos/terraform.png b/go.dev/static/images/logos/terraform.png index e604c32a..56e77473 100644 Binary files a/go.dev/static/images/logos/terraform.png and b/go.dev/static/images/logos/terraform.png differ diff --git a/go.dev/static/images/logos/vitess.png b/go.dev/static/images/logos/vitess.png index 51a7ae4e..7de16d2b 100644 Binary files a/go.dev/static/images/logos/vitess.png and b/go.dev/static/images/logos/vitess.png differ diff --git a/go.dev/static/images/sap-logo.png b/go.dev/static/images/sap-logo.png index a7ca3b90..df5ce9a1 100644 Binary files a/go.dev/static/images/sap-logo.png and b/go.dev/static/images/sap-logo.png differ diff --git a/go.dev/static/images/walmart-logo.png b/go.dev/static/images/walmart-logo.png index 5e568f3a..16358bd3 100644 Binary files a/go.dev/static/images/walmart-logo.png and b/go.dev/static/images/walmart-logo.png differ diff --git a/go.dev/static/js/misc.js b/go.dev/static/js/misc.js index 5cf1dd43..7ce23bc5 100644 --- a/go.dev/static/js/misc.js +++ b/go.dev/static/js/misc.js @@ -38,9 +38,9 @@ 'featured-users': 'Featured Users', 'get-started': 'Get Started', }; - const container = document.querySelector('.js-useCaseSubnav'); const subNavAnchorLinks = document.querySelector('.js-useCaseSubnavLinks'); + const siteHeader = document.querySelector('.js-siteHeader'); const header = document.querySelector('.js-useCaseSubnavHeader'); const icon = document.querySelector('.js-useCaseSubnavMenuIcon'); const menu = document.querySelector('.js-useCaseSubnavMenu'); @@ -53,10 +53,10 @@ window.pageYOffset + contentBody.getBoundingClientRect().top - headerHeightPx; - if (!header || !menu) return; container.addEventListener('click', handleClick); container.addEventListener('keydown', handleKeydown); + changeScrollPosition(); function handleClick(event) { if (event.target === header) { @@ -143,8 +143,39 @@ window.pageYOffset + contentBody.getBoundingClientRect().top - headerHeightPx; + + changeScrollPosition() }); + /** + * Changes scroll position according to the size of the header and menu + * Also changes according to the user's browser + */ + function changeScrollPosition() { + const SUPPORTS_SCROLL_BEHAVIOR = document.body.style.scrollBehavior !== undefined; + const WINDOW_WIDTH_BREAKPOINT_PX = 923; + let scrollPosition = headerHeightPx; + + if (SUPPORTS_SCROLL_BEHAVIOR) { + if (window.innerWidth < WINDOW_WIDTH_BREAKPOINT_PX) { + scrollPosition += header.clientHeight; + } + } else { + if (window.innerWidth >= WINDOW_WIDTH_BREAKPOINT_PX) { + scrollPosition = siteHeader.clientHeight + } else { + scrollPosition = siteHeader.clientHeight + header.clientHeight; + } + } + + sectionHeadings.forEach((sectionHeading) => { + sectionHeading.setAttribute('style', ` + margin-bottom: -${scrollPosition}px; + padding-top: ${scrollPosition}px; + `) + }); + } + function setStickyNav() { if (window.scrollY > distanceFromTop) { stickyNav.classList.add('UseCaseSubNav-anchorLinks--sticky'); diff --git a/go.dev/static/js/site.js b/go.dev/static/js/site.js index 98a8f6c6..00bd99a9 100644 --- a/go.dev/static/js/site.js +++ b/go.dev/static/js/site.js @@ -41,7 +41,9 @@ if (tabList) { const tabs = tabList.querySelectorAll('[role="tab"]'); - let tabFocus = 0; + let tabFocus = getTabFocus(); + + changeTabs({ target: tabs[tabFocus] }) tabs.forEach(tab => { tab.addEventListener('click', changeTabs); @@ -68,9 +70,35 @@ } tabs[tabFocus].setAttribute('tabindex', 0); tabs[tabFocus].focus(); + setTabFocus(tabs[tabFocus].id); } }); + function getTabFocus() { + const hash = window.location.hash; + + switch (hash) { + case '#use-cases': + return 1; + case '#case-studies': + default: + return 0; + } + } + + function setTabFocus(id) { + switch (id) { + case 'btn-tech': + tabFocus = 1; + window.location.hash = '#use-cases'; + break; + case 'btn-companies': + default: + window.location.hash = '#case-studies'; + tabFocus = 0; + } + } + function changeTabs(e) { const target = e.target; const parent = target.parentNode; @@ -83,6 +111,7 @@ // Set this tab as selected target.setAttribute('aria-selected', true); + setTabFocus(target.id) // Hide all tab panels grandparent -- cgit v1.3 From 5095c17948eb981d73dc742e7e9dc5270da4d6d3 Mon Sep 17 00:00:00 2001 From: Matt Masurka Date: Thu, 27 Aug 2020 10:10:03 -0700 Subject: [x/go.dev] Adds google case-study page redirects https: //go.dev/solutions/firebase -> https://go.dev/solutions/google/firebase https: //go.dev/solutions/chrome -> https://go.dev/solutions/google/chrome https: //go.dev/solutions/coredata -> https://go.dev/solutions/google/coredata Change-Id: I1d4d3ebf77c770ce79ced957af76afb8a19d0792 X-GoDev-Commit: c2e2ada1f8d44f3bc7ad6b0625588f08dbc97fbc --- go.dev/content/solutions/google/chrome.md | 3 ++- go.dev/content/solutions/google/coredata.md | 2 ++ go.dev/content/solutions/google/firebase.md | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/go.dev/content/solutions/google/chrome.md b/go.dev/content/solutions/google/chrome.md index eddd39f7..bf6b258e 100644 --- a/go.dev/content/solutions/google/chrome.md +++ b/go.dev/content/solutions/google/chrome.md @@ -11,7 +11,8 @@ quote: | In this case study, the Chrome Optimization Guide team shared how they experimented with Go, ramped up quickly, and their plans to use Go going forward. - +aliases: + - /solutions/chrome --- When the product Chrome comes to mind, you probably think solely of the diff --git a/go.dev/content/solutions/google/coredata.md b/go.dev/content/solutions/google/coredata.md index 539b0b1c..73c5647c 100644 --- a/go.dev/content/solutions/google/coredata.md +++ b/go.dev/content/solutions/google/coredata.md @@ -14,6 +14,8 @@ quote: | improve the development process. authors: - Prasanna Meda, Software Engineer, Core Data Solutions +aliases: + - /solutions/coredata --- Google's mission is “to organize the world's information and make it universally diff --git a/go.dev/content/solutions/google/firebase.md b/go.dev/content/solutions/google/firebase.md index 0b2fb574..d3a899eb 100644 --- a/go.dev/content/solutions/google/firebase.md +++ b/go.dev/content/solutions/google/firebase.md @@ -11,7 +11,8 @@ quote: | The Firebase Hosting team shared their journey with Go, including their backend migration from Node.js, the ease of onboarding new Go developers, and how Go has helped them scale. - +aliases: + - /solutions/firebase --- The Firebase Hosting team provides static web hosting services for Google Cloud -- cgit v1.3 From e42ff1ed41f8b4a52795237d13211e7db00d040f Mon Sep 17 00:00:00 2001 From: Adel Rodríguez Date: Thu, 27 Aug 2020 12:38:08 -0400 Subject: [x/go.dev] go.dev: bug fixes * Fix loading more button on use cases pages * Fix logos on home screen for mobile devices Change-Id: I5551b7a2f073fa5c4d7ad6f72e0d684f57125e78 X-GoDev-Commit: 3be93cde83ae91deeef7f75aeeaca82bd03e048e --- go.dev/assets/css/styles.css | 7 +++++++ go.dev/layouts/shortcodes/featuredProjects.html | 7 +++++-- go.dev/static/js/misc.js | 8 ++++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index 66219274..67b8dd7a 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -1117,6 +1117,12 @@ a.GettingStartedGo-resourceItemTitle { .WhoUsesCaseStudyList-caseStudyLink img { height: auto; } +@media only screen and (max-width: 38rem) { + .WhoUsesCaseStudyList-caseStudyLink img { + max-height: 2rem; + max-width: 100%; + } +} .WhoUsesCaseStudyList-logo { margin: auto; max-height: 4rem; @@ -1253,6 +1259,7 @@ a.GettingStartedGo-resourceItemTitle { cursor: pointer; font-size: 0.875rem; padding: .5rem 0; + position: relative; } .FeaturedUsers--hiddenDesktop { display: block; diff --git a/go.dev/layouts/shortcodes/featuredProjects.html b/go.dev/layouts/shortcodes/featuredProjects.html index f24f5fbd..9d0be58c 100644 --- a/go.dev/layouts/shortcodes/featuredProjects.html +++ b/go.dev/layouts/shortcodes/featuredProjects.html @@ -11,7 +11,10 @@ {{range $index, $project := $featuredProjects}} - + {{.company}} @@ -34,7 +37,7 @@ diff --git a/go.dev/static/js/misc.js b/go.dev/static/js/misc.js index 7ce23bc5..c4455c89 100644 --- a/go.dev/static/js/misc.js +++ b/go.dev/static/js/misc.js @@ -1,12 +1,12 @@ // 'More projects' button on use case pages (() => { - const button = document.querySelector('.js-more-projects-btn'); + const button = document.querySelector('.js-moreProjectsBtn'); if (!button) return; - const hiddenProjects = document.querySelectorAll('.FeaturedUsers-row.hidden'); + const hiddenProjects = document.querySelectorAll('.js-featuredUsersRow[hidden]'); button.addEventListener('click', () => { - button.classList.add('hidden'); + button.setAttribute('hidden', true); hiddenProjects.forEach(project => { - project.classList.remove('hidden'); + project.removeAttribute('hidden'); }); }); })(); -- cgit v1.3 From dd99724dc652c96bd8c616c6248e414f1334094e Mon Sep 17 00:00:00 2001 From: Andrew Bonventre Date: Thu, 27 Aug 2020 17:06:11 -0400 Subject: [x/go.dev] assets, layouts: add module mirror disclaimer text on homepage Also updates typography to use proper quotes. Change-Id: I96f6a516b6de5a884c62f7ad95b8cd8b0886c239 X-GoDev-Commit: c54dc5cee86993d37e3728c31938aa32fb20492c --- go.dev/assets/css/styles.css | 14 ++++++++++++-- go.dev/layouts/index.html | 20 ++++++++++++++------ go.dev/layouts/shortcodes/backgroundQuote.html | 2 +- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index 67b8dd7a..69adb145 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -935,14 +935,24 @@ a.GettingStartedGo-resourceItemTitle { top: 0.3125rem; } .Hero-footnote { + flex-direction: column; font-size: 0.8125rem; letter-spacing: 0.007rem; margin: 0.5rem 0 1.5rem; } +.Hero-footnote p { + margin: 0; +} +.Hero-footnote p + p { + margin-top: 0.75rem; +} .Hero-footnote a { color: #fff; text-decoration: underline; } +.Hero-footnote code { + font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; +} .SubHero-gridContainer { display: grid; gap: 0 5vw; @@ -1258,7 +1268,7 @@ a.GettingStartedGo-resourceItemTitle { color: #12b5cb; cursor: pointer; font-size: 0.875rem; - padding: .5rem 0; + padding: 0.5rem 0; position: relative; } .FeaturedUsers--hiddenDesktop { @@ -2274,7 +2284,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { padding-left: 0; } .Solutions-cardList[hidden] { - display: none + display: none; } .Solutions-caseStudiesList { margin: 0 0 1rem 0; diff --git a/go.dev/layouts/index.html b/go.dev/layouts/index.html index 73acdd4c..1f497bd8 100644 --- a/go.dev/layouts/index.html +++ b/go.dev/layouts/index.html @@ -44,12 +44,20 @@ -

    Download packages for - Windows 64-bit, - macOS, - Linux, and - more -

    +
    +

    + Download packages for + Windows 64-bit, + macOS, + Linux, and + more +

    +

    + The go command by default downloads and authenticates + modules using the Go module mirror and Go checksum database run by + Google. Learn more. +

    +
    -- cgit v1.3 From 20995dfadf49c5434ffba82253547e99e0c0d746 Mon Sep 17 00:00:00 2001 From: Adel Rodríguez Date: Mon, 28 Sep 2020 12:03:34 -0400 Subject: [x/go.dev] Update Getting Started section * Update Hero section * Update Guided learning journeys * Update Online learning * Update Self-paced Labs * Update Books Change-Id: I01f0e385b2c6b3cec3c8907009393a221f5c8648 X-GoDev-Commit: 77da9087daa633a0db3d4aa77df4858ab06a38d4 --- go.dev/assets/css/styles.css | 497 +++++++++++++++------ go.dev/content/learn/_index.md | 5 +- go.dev/data/learn/books.yaml | 12 +- go.dev/data/learn/cloud.yaml | 12 + go.dev/data/learn/courses.yaml | 16 +- go.dev/data/learn/guidedLearning.yaml | 25 +- go.dev/data/learn/quickstart.yaml | 20 +- go.dev/layouts/learn/section.html | 209 ++++----- go.dev/layouts/partials/learn/book.html | 32 ++ go.dev/layouts/partials/learn/card.html | 33 ++ go.dev/layouts/partials/learn/selfPacedCard.html | 24 + go.dev/static/images/gophers/motorcycle.svg | 1 + go.dev/static/images/learn/clis.png | Bin 0 -> 15139 bytes go.dev/static/images/learn/codecademy.png | Bin 17878 -> 1719 bytes go.dev/static/images/learn/codelabs.png | Bin 13901 -> 2813 bytes go.dev/static/images/learn/concurrency-in-go.jpeg | Bin 27279 -> 0 bytes go.dev/static/images/learn/concurrency-in-go.png | Bin 0 -> 306137 bytes go.dev/static/images/learn/edureka.png | Bin 9997 -> 57648 bytes go.dev/static/images/learn/exercism.png | Bin 38410 -> 3051 bytes go.dev/static/images/learn/gophercises.png | Bin 0 -> 101235 bytes go.dev/static/images/learn/gophercises_1.png | Bin 101235 -> 0 bytes go.dev/static/images/learn/introducing-go-book.png | Bin 125742 -> 395153 bytes go.dev/static/images/learn/qwiklabs.png | Bin 3175 -> 7789 bytes go.dev/static/images/learn/star-rating.png | Bin 0 -> 557 bytes go.dev/static/images/learn/web-dev.png | Bin 0 -> 18904 bytes 25 files changed, 625 insertions(+), 261 deletions(-) create mode 100644 go.dev/layouts/partials/learn/book.html create mode 100644 go.dev/layouts/partials/learn/card.html create mode 100644 go.dev/layouts/partials/learn/selfPacedCard.html create mode 100644 go.dev/static/images/gophers/motorcycle.svg create mode 100644 go.dev/static/images/learn/clis.png delete mode 100644 go.dev/static/images/learn/concurrency-in-go.jpeg create mode 100644 go.dev/static/images/learn/concurrency-in-go.png create mode 100644 go.dev/static/images/learn/gophercises.png delete mode 100644 go.dev/static/images/learn/gophercises_1.png create mode 100644 go.dev/static/images/learn/star-rating.png create mode 100644 go.dev/static/images/learn/web-dev.png diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index 69adb145..23c9f731 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -1749,176 +1749,268 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { width: 28vw; } } -.Learn-title, -.Learn-gettingStarted, -.Learn-books, -.Learn-guided, -.Learn-inPersonTraining, -.Learn-meetups, -.Learn-online { - padding: 0 1.5rem; + +.Learn-hero { + background-color: #f6f8f8; + background-image: radial-gradient(60.0625rem 60.0625rem, #beeaf5 50%, #f6f8f8 50%); + background-position: top -50rem left -9rem; + background-repeat: no-repeat; + background-size: 75rem 75rem; + padding: 0 2.25rem 0; } -.Learn-books, -.Learn-guided, -.Learn-inPersonTraining, -.Learn-quickstarts, -.Learn-meetups, -.Learn-online { - margin: 4rem auto; - max-width: 75.75rem; + +.Learn-hero .Container { + z-index: 1; + position: relative; + max-width: 68.125rem; } -.Learn-title { - margin: auto; - max-width: 75.75rem; + +.Learn-heroInner { + display: flex; + flex-direction: column-reverse; } -.Learn-tile a { - width: 100%; + +.Learn-heroGopher { + display: flex; + justify-content: flex-end; + padding-top: 1.25rem; } -.Learn-title h1 { - font-size: 2.625rem; + +.Learn-heroGopher img { + height: 13.5625rem; + width: auto; +} + +.Learn-heroContent { + padding-top: 1.125rem; +} + +.Learn-heroContent h1 { + font-family: Work Sans; + font-style: normal; + font-weight: normal; + font-size: 1.5rem; line-height: 2rem; } -.Learn-gettingStarted { - background-color: #fefadd; - padding-top: 6rem; + +.Learn-heroContent p { + color: #5f5f5f; + font-size: 0.875rem; + line-height: 1.5rem; + max-width: 27.1875rem; } -.Learn-quickstartThumbnail { - background-color: #fff; - border: 0.0625rem solid #e9e9e9; - border-radius: 0.3125rem; + +.Learn-heroAction { + align-items: center; + background-color: #007d9c; + border-radius: 0.25rem; display: flex; - height: 9.66rem; - width: 14.6875rem; + height: 2.5rem; + justify-content: center; + width: 10.5rem; } -.Learn-quickstartThumbnail img { - margin: auto; - max-height: 9.66rem; - max-width: 14.6875rem; + +.Learn-heroAction a, +.Learn-heroAction a:hover, +.Learn-heroAction a:visited { + color: #ffffff; + font-size: 0.875rem; + font-weight: 500; + line-height: 1rem; + text-decoration: none; } -@media only screen and (min-width: 57.7rem) { - .Learn-quickstartThumbnail { - height: 14.6875rem; - width: 22rem; - } - .Learn-quickstartThumbnail img { - max-height: 14.6875rem; - max-width: 22rem; - } + +.Learn-heroAction span { + font-weight: normal; } + .Learn-quickstarts { + align-items: center; display: flex; - flex-direction: row; + flex-direction: column; flex-wrap: wrap; - justify-content: space-around; list-style: none; - margin: 0 0 1rem -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ - padding: 0 1.5rem; - padding-inline-start: 0; + margin: 0; + padding: 2rem 0; } + .Learn-quickstart { - align-items: center; - display: flex; - flex: initial; - flex-direction: column; - padding: 1rem 0 0 1rem; -} -.Learn-quickstart a, -.Learn-quickstart a:visited, -.Learn-quickstart a:hover { - color: #3e4042; - text-decoration: none; + height: 14rem; + max-width: 21.25rem; } -.Learn-quickstartTitle { - font-size: 1.25rem; - text-align: center; + +.Learn-quickstart:nth-child(2) { + margin: 2.125rem 0; } -@media only screen and (min-width: 81.25rem) { + +@media only screen and (min-width: 48rem) { + .Learn-hero { + background-position: top -35rem left 30rem; + } + + .Learn-heroInner { + flex-direction: row; + justify-content: space-between; + } + + .Learn-heroContent { + padding-top: 3.75rem; + } + + .Learn-heroGopher { + flex: 1; + justify-content: center; + padding-top: 2.625rem; + } + + .Learn-heroGopher img { + height: 21.0625rem; + } + + .Learn-heroAction { + height: 4rem; + width: 16.5625rem; + } + + .Learn-heroAction a, + .Learn-heroAction a:hover, + .Learn-heroAction a:visited { + font-size: 1.5rem; + line-height: 1.75rem; + } + + .Learn-heroAction span { + font-size: 1rem; + } + .Learn-quickstarts { + flex-direction: row; justify-content: space-between; + padding: 1.625rem 0; + } +} + +@media only screen and (min-width: 91rem) { + .Learn-hero { + background-position: top -35rem left 50rem; } } -.Learn-actions { + +.Learn-guided, +.Learn-online, +.Learn-selfPaced, +.Learn-books { + margin-top: 3.75rem; + padding: 0 1.5rem; +} + +.Learn-learningResources { + align-items: center; + display: flex; + flex-direction: column; + margin: 3.75rem 0; +} + +.Learn-learningResources h2, +.Learn-learningResourcesHeader h3 { margin: 0; - padding: 1rem 0 3rem; - text-align: center; } -.Learn-viewMoreButton, -.Learn-viewMoreButton:visited, -.Learn-viewMoreButton:hover, -.Learn-viewMoreButton { - background-color: #f5fcfe; - border: 0.0625rem solid #00add8; - border-radius: 0.25rem; - box-shadow: 0 0.125rem 0.3125rem 0 rgba(0, 0, 0, 0.2); - box-sizing: border-box; - display: inline-block; - line-height: 2.2rem; - padding: 0 2.3rem; - text-align: center; - text-decoration: none; + +.Learn-learningResources h2 { + font-weight: 500; + font-size: 2rem; + letter-spacing: 0.1875rem; + line-height: 2.3125rem; } -.Learn-subHeader { + +.Learn-learningResourcesHeader { display: flex; - justify-content: space-between; - width: 100%; + justify-content: center; } -.Learn-tileList { - display: grid; - gap: 2rem; - grid-template-columns: repeat(2, minmax(0, 1fr)); + +.Learn-learningResourcesHeader h3 { + font-weight: bold; + font-size: 1.5rem; + letter-spacing: normal; + line-height: 2.25rem; +} + +.Learn-cardList { + align-items: center; + display: flex; + flex-direction: column; + flex-wrap: wrap; list-style: none; + margin: 1.875rem 0; padding: 0; } -@media only screen and (min-width: 38rem) { - .Learn-tileList { - grid-template-columns: repeat(4, minmax(0, 1fr)); - } + +.Learn-card { + height: 23.375rem; + margin-bottom: 1.875rem; + max-width: 23.25rem; +} + +.Learn-online .Card-thumbnail { + background-position: 1.5rem center; + background-repeat: no-repeat; + background-size: auto 1.5rem; + height: 7.5625rem; } + +.Learn-selfPaced .Learn-card { + height: 20.3125rem; +} + @media only screen and (min-width: 48rem) { - .Learn-tileList { + .Learn-learningResourcesHeader { + display: flex; + justify-content: flex-start; + } + + .Learn-learningResourcesHeader h2 { + font-size: 2.25rem; + line-height: 2.625rem; + } + + .Learn-cardList { + flex-direction: row; justify-content: space-between; } - .Learn-tileList { - column-gap: 3rem; + + .Learn-card { + height: 25rem; + width: 16.875rem; } } -.Learn-tile { + +.Learn-bookList { + align-items: center; display: flex; + flex-direction: column; flex-wrap: wrap; - justify-content: center; -} -.Learn-tile a { - color: #3c4043; -} -.Learn-tileTitle { - display: block; - font-size: 0.75rem; - font-style: normal; - font-weight: normal; - letter-spacing: 0.01rem; - line-height: 0.875rem; - margin: 1.5rem auto 0; - overflow-wrap: break-word; - text-align: center; + list-style: none; + margin: 1.875rem 0; + padding: 0; } -.Learn-tileThumbnail { - align-items: center; - background-color: #fff; - border-radius: 0.3125rem; - box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); - display: flex; - justify-content: center; - margin: auto; + +.Learn-book { + margin-bottom: 1.875rem; width: 100%; } -.Learn-tileThumbnail img { - max-height: 100%; - max-width: 100%; -} -.Learn-tileThumbnail--book img { - max-height: 100%; - max-width: 100%; + +@media only screen and (min-width: 48rem) { + .Learn-bookList { + align-items: flex-start; + flex-direction: row; + justify-content: space-between; + } + + .Learn-book { + width: 13.125rem; + } } + .Learn-inPersonList { display: flex; flex: 1 0 100%; @@ -1926,9 +2018,10 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { flex-wrap: wrap; justify-content: space-between; list-style: none; - margin: 0.5rem 0 1rem -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ + margin: 1.875rem 0 1.875rem -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ padding-left: 0; } + .Learn-inPerson { border-bottom: 0.0625rem solid #e0e0e0; flex: 1 1 31.25rem; @@ -1936,6 +2029,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { max-width: 31rem; padding-bottom: 1.25rem; } + .Learn-inPerson:nth-child(1), .Learn-inPerson:nth-child(2) { border-top: 0.0625rem solid #e0e0e0; @@ -1946,6 +2040,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .Learn-inPersonBlurb { margin: 0; } + .Learn-events { border-bottom: 0.0625rem solid #e0e0e0; border-top: 0.0625rem solid #e0e0e0; @@ -2057,6 +2152,8 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { padding: 1rem 0; } } + + .Solutions-title, .Solutions-useCases, .Solutions-caseStudies { @@ -3138,3 +3235,147 @@ a.UseCase-anchorLink.selected::before { img.PullQuote-image { width: 2.625rem; } + +.Card { + border: 0.0625rem solid #CFCFCF; + border-radius: 0.25rem; + height: 100%; + background-color: #ffffff; +} + +.Card a, +.Card a:visited, +.Card a:hover { + text-decoration: none; +} + +.Card-inner { + display: flex; + flex-direction: column; + height: 100%; +} + +.Card-thumbnail { + background-size: cover; + background-position: center; + height: 9.5625rem; +} + +.Card-content { + display: flex; + flex: 1; + flex-direction: column; + padding: 1.5rem; +} + +.Card-contentTitle, +.Card-contentBody { + line-height: 1.5rem; +} + +.Card-contentTitle { + color: #000000; + font-family: 'Work Sans', sans-serif; + font-size: 1.125rem; + font-weight: 500; +} + +.Card-contentBody { + color: #5f5f5f; + font-size: 0.875rem; + margin-top: 1rem; + flex: auto; +} + +.Card-contentCta { + align-items: center; + display: flex; +} + +.Card-contentCta span { + margin-right: 0.6875rem; +} + +.Card-selfPacedFooter { + display: flex; +} + +.Card-selfPacedCredits { + color: #5f5f5f; + flex: 1; + font-size: 0.75rem; +} + +.Card-selfPacedRating { + width: 5rem; +} + +.Card-starRating { + background-image: url('/images/learn/star-rating.png'); + background-position: left; + height: 1rem; +} + +.Book a, +.Book a:visited, +.Book a:hover { + text-decoration: none; +} + +.Book-inner { + align-items: flex-start; + display: flex; + justify-content: space-between; +} + +.Book-thumbnail { + width: 6.625rem; +} + +.Book-thumbnail img { + width: 100%; +} + +.Book-content { + margin-left: 1.6875rem; + flex: 1; +} + +.Book-title { + color: #000000; + font-family: Work Sans; + font-size: 1.125rem; + font-weight: 500; + line-height: 1.5rem; + margin: 0 0 0.5rem; +} + +.Book-description { + color: #5f5f5f; + font-size: 0.875rem; + line-height: 1.5rem; +} + +.Book-cta { + align-items: center; + display: flex; + height: 1.5rem; +} + +.Book-cta span { + margin-right: 0.6875rem; +} + +@media only screen and (min-width: 48rem) { + .Book-inner { + flex-direction: column; + } + + .Book-thumbnail { + width: 100%; + } + + .Book-content { + margin: 1rem 0 0; + } +} \ No newline at end of file diff --git a/go.dev/content/learn/_index.md b/go.dev/content/learn/_index.md index 407d08f6..f45421ef 100644 --- a/go.dev/content/learn/_index.md +++ b/go.dev/content/learn/_index.md @@ -1,6 +1,3 @@ --- -title: "Learn" -date: 2019-09-18T15:26:34-04:00 -draft: true +title: "Getting Started" --- - diff --git a/go.dev/data/learn/books.yaml b/go.dev/data/learn/books.yaml index 1b276121..33c18391 100644 --- a/go.dev/data/learn/books.yaml +++ b/go.dev/data/learn/books.yaml @@ -1,16 +1,26 @@ links: - title: The Go Programming Language + description: Alan A. A. Donovan, Brian W. Kernighan + cta: View url: https://www.gopl.io/ thumbnail: /images/learn/go-programming-language-book.png - title: Get Programming with Go + description: Nathan Youngman, Roger Peppé + cta: Manning.com url: https://www.manning.com/books/get-programming-with-go thumbnail: /images/learn/get-programming-with-go.jpeg - title: Go Programming Blueprints + description: This is the official source code repository for the book. + cta: View on Github url: https://github.com/matryer/goblueprints thumbnail: /images/learn/go-programming-blueprints.png - title: Introducing Go + description: Caleb Doxsey + cta: View on O’Reilly.com url: http://shop.oreilly.com/product/0636920046516.do thumbnail: /images/learn/introducing-go-book.png - title: Concurrency in Go + description: Katherine Cox-Buday + cta: View on O’Reilly.com url: https://www.oreilly.com/library/view/concurrency-in-go/9781491941294/ - thumbnail: /images/learn/concurrency-in-go.jpeg + thumbnail: /images/learn/concurrency-in-go.png diff --git a/go.dev/data/learn/cloud.yaml b/go.dev/data/learn/cloud.yaml index 8fe9db25..968f4849 100644 --- a/go.dev/data/learn/cloud.yaml +++ b/go.dev/data/learn/cloud.yaml @@ -2,12 +2,24 @@ links: - title: Deploy Go Apps on Google Cloud Serverless Platforms url: https://google.qwiklabs.com/focuses/10532?parent=catalog thumbnail: /images/learn/qwiklabs.png + length: 1h 10m + credits: 5 + rating: 5 - title: Use Go Code to Work with Google Cloud Data Sources url: https://google.qwiklabs.com/focuses/10531?parent=catalog thumbnail: /images/learn/qwiklabs.png + length: 1h 10m + credits: 5 + rating: 5 - title: Getting Started with Go on App Engine url: https://google.qwiklabs.com/focuses/2754?catalog_rank=%7B%22rank%22%3A1%2C%22num_filters%22%3A0%2C%22has_search%22%3Atrue%7D&parent=catalog&search_id=5407947 thumbnail: /images/learn/qwiklabs.png + length: 20m + credits: 1 + rating: 5 - title: HTTP Google Cloud Functions in Go url: https://google.qwiklabs.com/focuses/5171?catalog_rank=%7B%22rank%22%3A1%2C%22num_filters%22%3A0%2C%22has_search%22%3Atrue%7D&parent=catalog&search_id=5407953 thumbnail: /images/learn/qwiklabs.png + length: 40m + credits: 5 + rating: 5 diff --git a/go.dev/data/learn/courses.yaml b/go.dev/data/learn/courses.yaml index 698987b3..d69c1b23 100644 --- a/go.dev/data/learn/courses.yaml +++ b/go.dev/data/learn/courses.yaml @@ -1,13 +1,25 @@ links: - title: Codecademy + content: This course covers setting up a Go environment, the fundamentals of + Go, and will walk you through building a few sample projects. url: https://www.codecademy.com/learn/learn-go?utm_source=customer_io&utm_campaign=oct_21_golaunch&utm_medium=email&utm_content=header_img thumbnail: /images/learn/codecademy.png + cta: Learn more - title: Exercism.io + content: Tackle community-sourced Go challenges in this interactive course, + working with other participants and mentors along the way. url: https://exercism.io/tracks/go thumbnail: /images/learn/exercism.png + cta: Learn more - title: Google Developers Codelabs + content: Get started with a free codelab that walks you through using Go to + build and publish a Google Cloud Function. url: https://codelabs.developers.google.com/codelabs/cloud-functions-go-http/#0 - thumbnail: /images/learn/codelabs_2.png + thumbnail: /images/learn/codelabs.png + cta: Learn more - title: Gophercises + content: Build your confidence in using Go with this course, where you’ll + build roughly twenty different Go applications. url: https://gophercises.com/ - thumbnail: /images/learn/gophercises_1.png + thumbnail: /images/learn/gophercises.png + cta: Learn more diff --git a/go.dev/data/learn/guidedLearning.yaml b/go.dev/data/learn/guidedLearning.yaml index 35c66391..512c31ba 100644 --- a/go.dev/data/learn/guidedLearning.yaml +++ b/go.dev/data/learn/guidedLearning.yaml @@ -1,17 +1,26 @@ links: - title: Web Dev - description: Hello World tutorial for building web applications in Go. + content: Go Web Examples provides easy to understand code snippets on + how to use Go for web development. url: https://gowebexamples.com - thumbnail: /images/learn/helloworld.png + thumbnail: /images/learn/web-dev.png + cta: Learn more - title: CLIs - description: A guided workshop on building command-line interfaces with Go. + content: This workshop will walk you through building a CLI app with Go, + introducing you to basic Go principles and CLI frameworks along the way. url: https://spf13.com/presentation/building-an-awesome-cli-app-in-go-oscon/ - thumbnail: /images/learn/commandline.svg - - title: New to Coding - description: A video tutorial that aims to cover the various fundamentals of Go. + thumbnail: /images/learn/clis.png + cta: Learn more + - title: New to coding? + content: Get started with this introductory course covering basic + programming principles and Go fundamentals. url: https://www.youtube.com/watch?v=Q0sKAMal4WQ thumbnail: /images/learn/edureka.png - - title: Go by Example - description: Go by Example is a hands-on introduction to Go using annotated example programs. + cta: Learn more + - title: Go by example + content: Go by Example is a hands-on introduction to Go using annotated + example programs. It’s a great starting point to use when tackling any Go + project. url: https://gobyexample.com/ thumbnail: /images/learn/gobyexample.png + cta: Learn more diff --git a/go.dev/data/learn/quickstart.yaml b/go.dev/data/learn/quickstart.yaml index 09b29596..e2ea9509 100644 --- a/go.dev/data/learn/quickstart.yaml +++ b/go.dev/data/learn/quickstart.yaml @@ -1,10 +1,16 @@ links: - - title: Installing Go + - title: Documentation + content: Everything there is to know about Go. Get started on a new project + or brush up for your existing Go code. + cta: View documentation url: https://golang.org/doc/install - thumbnail: /images/learn/install.png - - title: Hello World - url: https://play.golang.org - thumbnail: /images/learn/gohelloworld.png - - title: Tour of Go + - title: Tour Go + content: An interactive introduction to Go in three sections. Each section + concludes with a few exercises so you can practice what you've learned. + cta: Take a tour url: https://tour.golang.org - thumbnail: /images/learn/tour.png + - title: Playground + content: The Playground allows anyone with a web browser to write Go code + that we immediately compile, link, and run on our servers. + cta: Go to playground + url: https://play.golang.org diff --git a/go.dev/layouts/learn/section.html b/go.dev/layouts/learn/section.html index 536988f0..1d598776 100644 --- a/go.dev/layouts/learn/section.html +++ b/go.dev/layouts/learn/section.html @@ -1,151 +1,138 @@ {{define "main"}} -
    +
    -

    Getting Started

    -
    -
    -
    - +

    + Download packages for + Windows 64-bit, + macOS, + Linux, and + more. +

    + +
    + Go Gopher riding a motorcycle +
    + +
      + {{ range first 3 $.Site.Data.learn.quickstart.links }} +
    • + {{ partial "learn/card.html" . }} +
    • {{end}}
    -

    - Learn More > -

    + +
    +

    Learning Resources

    +
    +
    -
    -

    Guided learning journeys

    -

    -

    +
    +

    Guided learning journeys

    -
    +
    -
    -

    Online learning

    +
    +

    Online learning

    -
    -
    + +
    -
    -

    Google Cloud Self-Paced Labs

    +
    +

    Google Cloud Self-Paced Labs

    -
    + +
    -
    -

    In-person training

    -

    -

    +
    +

    In-person training

    +
    @@ -157,11 +144,13 @@
      {{range first 3 $.Site.Data.events.all}}
    • -
      +
      {{if .thumbnailurl}} - {{.name}} group photo + {{.name}} group photo {{else}} - meetup logo + meetup logo {{end}}
      @@ -173,9 +162,7 @@

      {{.name}}

      -

      - {{.description | safeHTML}} -

      +

      {{.description | safeHTML}}

      Learn more >

      diff --git a/go.dev/layouts/partials/learn/book.html b/go.dev/layouts/partials/learn/book.html new file mode 100644 index 00000000..9e3a51af --- /dev/null +++ b/go.dev/layouts/partials/learn/book.html @@ -0,0 +1,32 @@ + diff --git a/go.dev/layouts/partials/learn/card.html b/go.dev/layouts/partials/learn/card.html new file mode 100644 index 00000000..272bca36 --- /dev/null +++ b/go.dev/layouts/partials/learn/card.html @@ -0,0 +1,33 @@ + diff --git a/go.dev/layouts/partials/learn/selfPacedCard.html b/go.dev/layouts/partials/learn/selfPacedCard.html new file mode 100644 index 00000000..c3cc17c0 --- /dev/null +++ b/go.dev/layouts/partials/learn/selfPacedCard.html @@ -0,0 +1,24 @@ + diff --git a/go.dev/static/images/gophers/motorcycle.svg b/go.dev/static/images/gophers/motorcycle.svg new file mode 100644 index 00000000..5f84eb25 --- /dev/null +++ b/go.dev/static/images/gophers/motorcycle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/static/images/learn/clis.png b/go.dev/static/images/learn/clis.png new file mode 100644 index 00000000..8fe27421 Binary files /dev/null and b/go.dev/static/images/learn/clis.png differ diff --git a/go.dev/static/images/learn/codecademy.png b/go.dev/static/images/learn/codecademy.png index 89699716..7c7c69c4 100644 Binary files a/go.dev/static/images/learn/codecademy.png and b/go.dev/static/images/learn/codecademy.png differ diff --git a/go.dev/static/images/learn/codelabs.png b/go.dev/static/images/learn/codelabs.png index 7fa097cd..cdf54597 100644 Binary files a/go.dev/static/images/learn/codelabs.png and b/go.dev/static/images/learn/codelabs.png differ diff --git a/go.dev/static/images/learn/concurrency-in-go.jpeg b/go.dev/static/images/learn/concurrency-in-go.jpeg deleted file mode 100644 index d2c140c6..00000000 Binary files a/go.dev/static/images/learn/concurrency-in-go.jpeg and /dev/null differ diff --git a/go.dev/static/images/learn/concurrency-in-go.png b/go.dev/static/images/learn/concurrency-in-go.png new file mode 100644 index 00000000..7a0498b5 Binary files /dev/null and b/go.dev/static/images/learn/concurrency-in-go.png differ diff --git a/go.dev/static/images/learn/edureka.png b/go.dev/static/images/learn/edureka.png index 4800460d..047f11a5 100644 Binary files a/go.dev/static/images/learn/edureka.png and b/go.dev/static/images/learn/edureka.png differ diff --git a/go.dev/static/images/learn/exercism.png b/go.dev/static/images/learn/exercism.png index e299e83e..2bc4bb79 100644 Binary files a/go.dev/static/images/learn/exercism.png and b/go.dev/static/images/learn/exercism.png differ diff --git a/go.dev/static/images/learn/gophercises.png b/go.dev/static/images/learn/gophercises.png new file mode 100644 index 00000000..e2732eca Binary files /dev/null and b/go.dev/static/images/learn/gophercises.png differ diff --git a/go.dev/static/images/learn/gophercises_1.png b/go.dev/static/images/learn/gophercises_1.png deleted file mode 100644 index e2732eca..00000000 Binary files a/go.dev/static/images/learn/gophercises_1.png and /dev/null differ diff --git a/go.dev/static/images/learn/introducing-go-book.png b/go.dev/static/images/learn/introducing-go-book.png index 4eb3d3d2..39e558bd 100644 Binary files a/go.dev/static/images/learn/introducing-go-book.png and b/go.dev/static/images/learn/introducing-go-book.png differ diff --git a/go.dev/static/images/learn/qwiklabs.png b/go.dev/static/images/learn/qwiklabs.png index 65acd019..68d9f581 100644 Binary files a/go.dev/static/images/learn/qwiklabs.png and b/go.dev/static/images/learn/qwiklabs.png differ diff --git a/go.dev/static/images/learn/star-rating.png b/go.dev/static/images/learn/star-rating.png new file mode 100644 index 00000000..e453a187 Binary files /dev/null and b/go.dev/static/images/learn/star-rating.png differ diff --git a/go.dev/static/images/learn/web-dev.png b/go.dev/static/images/learn/web-dev.png new file mode 100644 index 00000000..8b3cb8d5 Binary files /dev/null and b/go.dev/static/images/learn/web-dev.png differ -- cgit v1.3 From 17a9bb1a16180cb144658a47b361b9e858fb071a Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Wed, 7 Oct 2020 02:40:48 -0400 Subject: [x/go.dev] GD-134, GD-135, GD-140 - Update Meeting Cards, getting started content X-GoDev-Commit: 64ece69ba7aa728c43198bf1a862c75e221aad2f --- go.dev/assets/css/styles.css | 77 +++-- go.dev/cmd/events/main.go | 2 + go.dev/data/events.yaml | 492 ++++++++++++++++---------------- go.dev/data/learn/guidedLearning.yaml | 2 +- go.dev/layouts/learn/section.html | 19 +- go.dev/layouts/partials/learn/card.html | 2 +- 6 files changed, 317 insertions(+), 277 deletions(-) diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index 23c9f731..1b8e7b01 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -1785,6 +1785,10 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { padding-top: 1.125rem; } +.Learn-heroContent a:not(.js-downloadBtn) { + text-decoration: underline; +} + .Learn-heroContent h1 { font-family: Work Sans; font-style: normal; @@ -1899,7 +1903,9 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .Learn-guided, .Learn-online, .Learn-selfPaced, -.Learn-books { +.Learn-books, +.Learn-inPersonTraining, +.Learn-meetups { margin-top: 3.75rem; padding: 0 1.5rem; } @@ -1951,6 +1957,10 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { max-width: 23.25rem; } +.Learn-selfPaced .Learn-card .Card-content { + justify-content: space-between; +} + .Learn-online .Card-thumbnail { background-position: 1.5rem center; background-repeat: no-repeat; @@ -2042,8 +2052,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Learn-events { - border-bottom: 0.0625rem solid #e0e0e0; - border-top: 0.0625rem solid #e0e0e0; flex: 1 0 100%; list-style: none; margin: 0.5rem 0 0; @@ -2053,49 +2061,70 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .Learn-eventItem { align-items: flex-start; display: flex; + flex-direction: column; padding: 1rem 0; } .Learn-eventItem + .Learn-eventItem { border-top: 0.0625rem solid #e0e0e0; } + .Learn-eventThumbnail { align-self: center; display: flex; flex: 0 0 3rem; - height: 3rem; - margin-right: 1rem; + height: auto; + margin-bottom: 1rem; } .Learn-eventThumbnail--noimage { background-color: #ffffff; } .Learn-eventThumbnail img { - height: auto; - object-fit: contain; - width: 4rem; + width: 100%; + height: 40vw; + + object-fit: cover; +} +.Learn-eventAttendees { + display: flex; +} +.Learn-eventAttendeesItem img { + width: 2rem; + height: 2rem; + border-radius: 100%; } .Learn-eventBody { - display: inline-flex; + display: flex; flex: 1; flex-direction: column; min-width: 0; + max-width: 100%; } .Learn-eventDate { display: flex; flex-wrap: wrap; justify-content: space-between; + + margin-bottom: 1rem; } .Learn-eventDate p { color: #6e7072; margin: 0; } .Learn-eventName { - color: #007d9c; + color: #000; + font-family: 'Work Sans', Arial, Helvetica, sans-serif; font-size: 1.25rem; - font-weight: normal; + font-weight: 500; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + + margin-bottom: 1rem; +} +.Learn-eventName a { + text-decoration: none; + color: #000; } .Learn-eventDescription { -webkit-box-orient: vertical; /* See webkit-line-clamp */ @@ -2103,6 +2132,10 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { -webkit-line-clamp: 4; /* Elide flex text. webkit-line-clamp is broadly compatible with browsers. */ overflow: hidden; text-overflow: ellipsis; + line-height: 24px; +} +.Learn-eventText { + margin-bottom: 0.5rem; } .Learn-viewMore { align-items: center; @@ -2119,15 +2152,27 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { margin-left: 0.48rem; } @media only screen and (min-width: 57.7rem) { + .Learn-eventItem { + flex-direction: row; + } + + .Learn-eventBody { + max-width: 46.825rem; + } .Learn-eventThumbnail { - height: auto; - min-width: 5.375rem; + height: 10.875rem; + min-width: 18.375rem; + margin-right: 1rem; + } + .Learn-eventThumbnail img{ + height: 10.875rem; + width: 17rem; + object-fit: contain; } .Learn-eventDate { flex: 0; flex-direction: column; justify-content: center; - margin: 0 1rem; min-width: 9rem; } .Learn-eventText { @@ -2144,10 +2189,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { align-self: center; text-align: right; } - .Learn-eventBody { - display: flex; - flex-direction: row; - } .Learn-eventItem { padding: 1rem 0; } diff --git a/go.dev/cmd/events/main.go b/go.dev/cmd/events/main.go index e2e97116..9cf61c13 100644 --- a/go.dev/cmd/events/main.go +++ b/go.dev/cmd/events/main.go @@ -82,6 +82,7 @@ func getUpcomingEvents(c client) (*UpcomingEvents, error) { LocalizedCountry: group.LocalizedCountryName, LocalizedLocation: group.LocalizedLocation, Name: group.NextEvent.Name, + PhotoURL: chapter.GroupPhoto.PhotoLink, State: chapter.State, ThumbnailURL: chapter.GroupPhoto.ThumbLink, URL: "https://www.meetup.com/" + path.Join(chapter.URLName, "events", group.NextEvent.ID), @@ -156,6 +157,7 @@ type EventData struct { LocalizedCountry string LocalizedLocation string Name string + PhotoURL string State string ThumbnailURL string URL string diff --git a/go.dev/data/events.yaml b/go.dev/data/events.yaml index 67ef32b3..12e0ba8b 100644 --- a/go.dev/data/events.yaml +++ b/go.dev/data/events.yaml @@ -2,79 +2,22 @@ # To update, run: # go run github.com/godevsite/go.dev/cmd/events > data/events.yaml all: -- city: São Paulo - country: Brazil - description: A WWG é uma iniciativa mundial focada em todas as minorias de gênero - que tenham interesse em conhecer ou aprimorar seus conhecimentos em Golang, a - linguagem do Google. - id: "270597346" - local_date: May 20, 2020 - local_time: "2020-05-20T19:30:00-03:00" - localizedcountry: Brazil - localizedlocation: São Paulo, Brazil - name: '[ONLINE] #003 Women Who Go Sampa - Oficina Exercism ft. WWG CWB' - state: "" - thumbnailurl: "" - url: https://www.meetup.com/Women-Who-Go-Sampa/events/270597346 -- city: Curitiba - country: Brazil - description: |- - Esse é o chapter de Curitiba do Women Who Go, um grupo que reúne mulheres e outras minorias de gênero pra estudar a linguagem de programação chamada Go.
      - Queremos construir uma comunidade de Golang mais diversa. Vem, gente!
      - tl;dr: Women Who Go - Curitiba Chapter  

      -

      - ♥ Twitter

      - ♥ Instagram

      - ♥ LinkedIn 

      - ♥ Telegram

      - ♥ hub de links
      -

      -
      - id: "270352999" - local_date: May 20, 2020 - local_time: "2020-05-20T19:30:00-03:00" - localizedcountry: Brazil - localizedlocation: Curitiba, Brazil - name: '[ONLINE] Oficina Exercism ft. WWG Sampa' - state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/c/4/6/7/thumb_484190279.jpeg - url: https://www.meetup.com/Women-Who-Go-CWB/events/270352999 -- city: Orlando - country: USA - description: Orlando's first meetup group dedicated to the Go Programming Language. - All skill levels are welcome - whether you're a beginner or a full-fledged - gopher. - id: thpvrrybchbbc - local_date: May 20, 2020 - local_time: "2020-05-20T19:00:00-04:00" - localizedcountry: USA - localizedlocation: Orlando, FL - name: Orlando Go Virtual Meetup - state: FL - thumbnailurl: https://secure.meetupstatic.com/photos/event/9/7/c/4/thumb_441638852.jpeg - url: https://www.meetup.com/OrlanGo/events/thpvrrybchbbc -- city: Minneapolis +- city: Lehi country: USA description: |- - A meetup group to discuss the Go Programming Language.

      -
      -
      -

      -
      -
      - What is Go?

      -
      -
      - (from golang.org) The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. - id: "270499581" - local_date: May 20, 2020 - local_time: "2020-05-20T18:00:00-05:00" + Join us on Slack!
      + The Utah Go User Group (#UTGO) is a community of people interested in software development and Google's Go programming language (Golang). Everyone is welcome.  We currently meet in Lehi. To discuss and vote on topic ideas, go to https://github.com/forgeutah/utah-go
      +
      + id: fnpgxrybcpbfb + local_date: Nov 3, 2020 + local_time: "2020-11-03T18:00:00-07:00" localizedcountry: USA - localizedlocation: Minneapolis, MN - name: Readability in Go - Reducing Load on the Memory Stack - state: MN - thumbnailurl: https://secure.meetupstatic.com/photos/event/8/a/0/4/thumb_380555332.jpeg - url: https://www.meetup.com/golangmn/events/270499581 + localizedlocation: Lehi, UT + name: Utah Golang User Group (Reserve Mike Campbell) + photourl: https://secure.meetupstatic.com/photos/event/c/d/0/7/600_452692487.jpeg + state: UT + thumbnailurl: https://secure.meetupstatic.com/photos/event/c/d/0/7/thumb_452692487.jpeg + url: https://www.meetup.com/utahgophers/events/fnpgxrybcpbfb - city: Eugene country: USA description: "All Gophers and curious software professionals are welcome to come @@ -88,213 +31,260 @@ all: you're building web apps, designing APIs, thrive on scalability, or you're simply curious about this fun new(ish) language, let's meetup.
      \n• More resources are available at www.euggo.org " - id: skdnrrybchbbc - local_date: May 20, 2020 - local_time: "2020-05-20T17:30:00-07:00" + id: vjdnrrybcnbkb + local_date: Oct 7, 2020 + local_time: "2020-10-07T12:00:00-07:00" localizedcountry: USA localizedlocation: Eugene, OR - name: Contribution > OpenBoard Wrap and Plan + name: Book Club > Get Programming With Go + photourl: https://secure.meetupstatic.com/photos/event/2/8/1/600_453660641.jpeg state: OR thumbnailurl: https://secure.meetupstatic.com/photos/event/2/8/1/thumb_453660641.jpeg - url: https://www.meetup.com/EUG-Go/events/skdnrrybchbbc -- city: Taipei - country: Taiwan + url: https://www.meetup.com/EUG-Go/events/vjdnrrybcnbkb +- city: Berlin + country: Germany description: |- - At Golang Taipei, we promote Golang development and sharing the latest information about Golang.  
      - Join our Facebook group to connect with other 6,138 members. 
      - Chat with us on Telegram channel with other 880 chatty members. 
      - Find all past meetup presentation files on Github
      - Follow us on Tweeeeeeter for latest Golang news. 
      - Subscribe our Youtube channel for past video records and future live streaming. 
      - Looking for new opportunities, check the latest Github job list and information 
      -
      - id: "270708366" - local_date: May 26, 2020 - local_time: "2020-05-26T19:30:00+08:00" - localizedcountry: Taiwan - localizedlocation: Taipei, Taiwan - name: 'Golang Taipei Gathering #49 Webinar' + Join us on Slack: https://wwgberlin.herokuapp.com/ 
      + Follow us on Twitter: @WWGBerlin
      + Go (also known as Golang) is a great programming language to learn and develop in. We built this meetup to offer a better entry point to women who are interested in Go. We also want to provide a space for networking, learning and finding mentors. This group shall bring us together so we can continue to grow in Go.
      + You can become a WWG mentee if:
      + 1. You identify as female, publicly or privately 
      + 2. You have some interest in Go
      + Supporters of Women Who Go are welcome to join, especially as mentors. For the Go Study Groups, the mentee/learners spots will be given to women.
      + Feel free to check out our learning resources: https://github.com/wwgberlin/GoStudyGroup 
      Feel free to contribute to our resources by adding Go Tutorials to it!
      + For companies who want to host and sponsor Women Who Go Berlin: Please send us a msg through meetup or Twitter: @WWGBerlin + id: "273575858" + local_date: Oct 7, 2020 + local_time: "2020-10-07T19:00:00+02:00" + localizedcountry: Germany + localizedlocation: Berlin, Germany + name: 'Women Who Go Book club - chapter 2.1: The Parser part 2' + photourl: https://secure.meetupstatic.com/photos/event/6/6/9/3/600_452906259.jpeg state: "" + thumbnailurl: https://secure.meetupstatic.com/photos/event/6/6/9/3/thumb_452906259.jpeg + url: https://www.meetup.com/Women-Who-Go-Berlin/events/273575858 +- city: Jacksonville + country: USA + description: GoJax represents the North Florida Go community located in Duval, Baker, + Nassau,
      Clay, and St. Johns counties. There are a number of tech Meetup groups + in
      Jacksonville, but none of them address the Go programming language. We + plan on
      filling that gap. + id: "273628929" + local_date: Oct 7, 2020 + local_time: "2020-10-07T19:00:00-04:00" + localizedcountry: USA + localizedlocation: Jacksonville, FL + name: Go and Web Assembly + photourl: "" + state: FL thumbnailurl: "" - url: https://www.meetup.com/golang-taipei-meetup/events/270708366 -- city: Zagreb - country: Croatia + url: https://www.meetup.com/meetup-group-fuSlbVYy/events/273628929 +- city: Orlando + country: USA + description: Orlando's first meetup group dedicated to the Go Programming Language. + All skill levels are welcome - whether you're a beginner or a full-fledged + gopher. + id: "273460434" + local_date: Oct 7, 2020 + local_time: "2020-10-07T19:00:00-04:00" + localizedcountry: USA + localizedlocation: Orlando, FL + name: Orlando Go Monthly Meetup (Online!) - Go & Web Assembly + photourl: https://secure.meetupstatic.com/photos/event/9/7/c/4/600_441638852.jpeg + state: FL + thumbnailurl: https://secure.meetupstatic.com/photos/event/9/7/c/4/thumb_441638852.jpeg + url: https://www.meetup.com/OrlanGo/events/273460434 +- city: Atlanta + country: USA description: |- - Ovo je grupa za sve zainteresirane za Go programski jezik.
      - Prošli talkovi se mogu naći na:
      - • github repou
      - • snimke na YouTube kanalu

      - Prati na nas twitteru i na facebooku.
      - Družimo se i na gophers.slack.com - tamo smo u kanalu #croatia. - id: "270725353" - local_date: May 26, 2020 - local_time: "2020-05-26T18:00:00+02:00" - localizedcountry: Croatia - localizedlocation: Zagreb, Croatia - name: GoTalks 26.05.2020. + Go Users Group Atlanta is a meeting place for people interested in developing and promoting the local Go development community.
      + Many of us hang out in #golang on Tech404 + id: "273303769" + local_date: Oct 8, 2020 + local_time: "2020-10-08T18:30:00-04:00" + localizedcountry: USA + localizedlocation: Atlanta, GA + name: October Go Virtual Meetup ft. Bill Kennedy on Go Generics + photourl: https://secure.meetupstatic.com/photos/event/a/6/8/8/600_355422632.jpeg + state: GA + thumbnailurl: https://secure.meetupstatic.com/photos/event/a/6/8/8/thumb_355422632.jpeg + url: https://www.meetup.com/Go-Users-Group-Atlanta/events/273303769 +- city: Berlin + country: Germany + description: |- + We are a group of Golang users. Our aim is to meet like minded people, share our experience with others and to promote the use of Go.
      + As Gophers and as Berliners, even if just visiting, we follow the Code of Conduct to make this a pleasant and inclusive environment for everyone:

      + https://golang.org/conduct
      http://berlincodeofconduct.org
      + Follow us on twitter: @GDGBerlinGolang
      + You can get our special group swag here: https://shop.spreadshirt.de/gdg-golang-berlin
      + id: "271795652" + local_date: Oct 14, 2020 + local_time: "2020-10-14T19:00:00+02:00" + localizedcountry: Germany + localizedlocation: Berlin, Germany + name: '[online] October Golang meetup' + photourl: https://secure.meetupstatic.com/photos/event/9/8/b/1/600_465459089.jpeg state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/7/2/5/2/thumb_462749266.jpeg - url: https://www.meetup.com/Golang-ZG/events/270725353 -- city: Warsaw - country: Poland + thumbnailurl: https://secure.meetupstatic.com/photos/event/9/8/b/1/thumb_465459089.jpeg + url: https://www.meetup.com/golang-users-berlin/events/271795652 +- city: Seattle + country: USA description: |- - Our goal is to share our software-development experience on any level from junior to senior. It is your stage. You can always start with 10 min talk. Let us know, whether we can support you.
      -

      - Our homepage with a list of previous talks and workshops: https://github.com/golangpoland/meetup_golang_warsaw

      + The Seattle Go User Group is a community for anyone interested in the Go programming language. 



      - You will find us also on (linked on our github):
      - ▪ Twitter: https://twitter.com/golangwaw
      - ▪ Slack: #poland-warsaw gophers.slack.com
      - ▪ FB: https://www.facebook.com/groups/1278049882223829/
      - ▪ LI: https://www.linkedin.com/company/golang-warsaw-meetup
      + We provide opportunities to:
      + • Discuss Go and related topics 
      + • Socialize with people who are interested in Go
      + • Find or fill Go-related jobs 


      - ps. The more source code the better in your talk :) It might be just few source files or --- the best --- a simple runnable project. We seek to encourage the community to go through your talk again, work with the code, and learn more on their own. We do not mind live demos :).
      -

      - pps. Share your slides and code. What is there for you? Fame, github stars, FB/LI likes, and feedback.
      -

      - [PL]
      - Naszym celem jest dzielenie się wiedzą oraz doświadczeniem w zakresie programowania na każdym poziomie, od juniora do seniora. Scena należy do Ciebie! Zawsze możesz zacząć z 10 minutowym talkiem. Daj nam znać jeśli możemy Cię w jakikolwiek sposób pomóc.
      -

      - Chcemy, aby ten meetup należał do społeczności, cenimy sobie niezależność i zależy nam na utrzymaniu społecznego charakteru naszych spotkań.
      -

      - Nasza “strona główna” z listą poprzednich prelekcji i warsztatów jest github:
      - https://github.com/golangpoland/meetup_golang_warsaw
      -

      - Znajdziesz nas także na:
      - ▪ Twitter: https://twitter.com/golangwaw
      - ▪ Slack: #poland-warsaw gophers.slack.com
      - ▪ FB: https://www.facebook.com/groups/1278049882223829/
      - ▪ LI: https://www.linkedin.com/company/golang-warsaw-meetup
      + If you want to chat all things Go, feel free to join us on the Gopher slack. 
      + Invites can be found at https://invite.slack.golangbridge.org
      + There is a #seattle channel which can be joined by anyone, so come say hi!


      - ps. Im więcej kodu tym lepiej :) Może to być kilka plików źródłowych albo prosty projekt. Chcemy zachęcić społeczność do ponownego przejrzenia prelekcji oraz pracy z twoim kodem. Live Dema są mile widziane :)
      -

      - pps. Nie zapomnij podzielić się z nami swoją prezentacją i kodem źródłowym. Zyskasz na tym sławę, gwiazdki na githubie, lajki na FB/LI oraz feedback.
      + Our aim is to be a welcoming environment. As such all attendees, organizers and sponsors are required to follow the code of conduct. + id: rksdvrybcnbsb + local_date: Oct 14, 2020 + local_time: "2020-10-14T13:00:00-07:00" + localizedcountry: USA + localizedlocation: Seattle, WA + name: Eastside Go Coffee + photourl: https://secure.meetupstatic.com/photos/event/a/4/b/e/600_450342174.jpeg + state: WA + thumbnailurl: https://secure.meetupstatic.com/photos/event/a/4/b/e/thumb_450342174.jpeg + url: https://www.meetup.com/golang/events/rksdvrybcnbsb +- city: Belfast + country: United Kingdom + description: |- + Belfast Gophers, aka The Go Belfast User Group (GBUG), are a Belfast-based community for anyone interested in the Go programming language. Belfast Gophers held their first Meet-up 2016, and since then the group has grown to over 300 gophers.

      + Membership of Belfast Gophers is managed via our Meetup page; everyone is welcome! We also have an active Twitter feed and we've recently set-up the #belfast channel on Gophers Slack (sign-up here).



      - ➡️CONTACT
      - ▪  Slack (primary): gophers.slack.com #poland-warsaw: @Kamil Pyrkosz , @Arek Noster , or @Wojciech
      - * Email: Wojciech Barczyński - wb@hypatos.ai - id: "270319842" - local_date: May 26, 2020 - local_time: "2020-05-26T18:05:00+02:00" - localizedcountry: Poland - localizedlocation: Warsaw, Poland - name: 'Golang Warsaw #36 - Golang Poland - Online' + Contact
      + Twitter: @belfast_gopher
      + Email: info@belfastgophers.com
      +

      + Code of Conduct
      + Belfast Gophers operate under the Go Community Code of Conduct.
      +

      + Swag
      We have swag on Redbubble for anyone wanting a Belfast Gopher's t-shirt or other swag, you only pay Redbubble we don't take any fee for these. 
      +

      +

      +

      +
      + id: "273346208" + local_date: Oct 15, 2020 + local_time: "2020-10-15T18:00:00+01:00" + localizedcountry: United Kingdom + localizedlocation: Belfast, United Kingdom + name: 'Oto: Pace’s lightweight JSON/HTTP RPC thing' + photourl: "" state: "" thumbnailurl: "" - url: https://www.meetup.com/Golang-Warsaw/events/270319842 -- city: Newcastle Upon Tyne - country: United Kingdom - description: This is a group for anyone in the North East of England who's interested - in the Go programming language. We usually meet up in Newcastle on the fourth - Tuesday of every month at Campus North, Carliol Square. - id: qtpnmqybchbjc - local_date: May 26, 2020 - local_time: "2020-05-26T18:30:00+01:00" - localizedcountry: United Kingdom - localizedlocation: Newcastle Upon Tyne, United Kingdom - name: Go meetup + url: https://www.meetup.com/Belfast-Gophers/events/273346208 +- city: Guadalajara + country: Mexico + description: Comunidad enfocada en dar a conocer el lenguaje Golang y generar un + espacio donde se pueda compartir conocimientos, proyectos y experiencias entorno + a este gran lenguaje. En las reuniones se presentan un par de pláticas o talleres + relacionados con Golang. Networking al finalizar.

      Síguenos en:

      Facebook
      +
      YouTube
      + id: "273759040" + local_date: Oct 15, 2020 + local_time: "2020-10-15T18:30:00-05:00" + localizedcountry: Mexico + localizedlocation: Guadalajara, Mexico + name: Golang Guadalajara Meetup - Octubre 2020 + photourl: "" state: "" thumbnailurl: "" - url: https://www.meetup.com/Golang-North-East/events/qtpnmqybchbjc -- city: Boston - country: USA + url: https://www.meetup.com/Golang-Guadalajara/events/273759040 +- city: Leipzig + country: Germany description: |- - A forum for people working with Go to discuss ideas, issues and share solutions. We will start to put together meetings as the group grows and topics are suggested.
      - Submit a talk proposal, or come join us in #boston on Slack at https://invite.slack.golangbridge.org
      - Boston Golang officially adopts the Go Code of Conduct. Harassment, bullying, and discrimination are unacceptable here and if you witness or experience those or other harmful behaviors, please let the organizers know or email us at bostongolang@gmail.com
      - id: "270529854" - local_date: May 26, 2020 - local_time: "2020-05-26T18:30:00-04:00" - localizedcountry: USA - localizedlocation: Boston, MA - name: Virtual May meetup - state: MA + We enjoy using Go and we are curious about the language, its features and applications, especially in the context of cloud computing and infrastructure.
      + Our goal is to establish a place, where people from all backgrounds interested in the Go programming language and various cloud technologies can meet, learn, share experiences, present, discuss and network.
      + We aim to be a welcoming community, respecting Gopher values, as outlined here: https://golang.org/conduct.
      +

      + Find out more on: https://golangleipzig.space/ and https://github.com/golang-leipzig

      + Since March 2019, we are part of the Go Developer Network:
      + https://blog.golang.org/go-developer-network
      +
      + id: "268785569" + local_date: Oct 16, 2020 + local_time: "2020-10-16T19:00:00+02:00" + localizedcountry: Germany + localizedlocation: Leipzig, Germany + name: 'Leipzig Golang Meetup #13' + photourl: "" + state: "" thumbnailurl: "" - url: https://www.meetup.com/bostongo/events/270529854 -- city: Tel Aviv-Yafo - country: Israel + url: https://www.meetup.com/Leipzig-Golang/events/268785569 +- city: Gurgaon + country: India description: |- - This is the group for programmers who are interested in the High Performance, Scalable, lightweight, cross platform development tool that also promises ease of programming, agility and the fun you don't usually get using a low-level language. Welcome to the Israeli Go language Group.
      - If you'd like to give a talk, please add yourself to the trello board - id: kjvczlybckbcb - local_date: May 27, 2020 - local_time: "2020-05-27T18:30:00+03:00" - localizedcountry: Israel - localizedlocation: Tel Aviv-Yafo, Israel - name: May Meetup - Online + This group is for people interested in learning both the programming language Go(lang), and how to build interesting things with it. We will aim the first few sessions at beginner-intermediate levels and maybe later introduce some high-level talks.
      + WE ARE ACTIVELY LOOKING FOR MEETUP VENUES.
      + Want to help organise/volunteer? - Come say hi and meet fellow gophers on Slack. + id: szcfmrybcnbwb + local_date: Oct 17, 2020 + local_time: "2020-10-17T11:00:00+05:30" + localizedcountry: India + localizedlocation: Gurgaon, India + name: Golang Gurgaon Meetup + photourl: https://secure.meetupstatic.com/photos/event/c/e/4/5/600_473932805.jpeg state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/a/9/6/9/thumb_477523369.jpeg - url: https://www.meetup.com/Go-Israel/events/kjvczlybckbcb -- city: Raleigh - country: USA - description: |- - You do not need to know Go, be a professional developer or enjoy talking to strangers in order to come hang out with us!
      - This group is for you if you are interested in Go, and are looking for a safe space to learn. Membership is restricted to women and gender minorities.
      - We would love for you to speak at Women Who Go! Contact raleigh@womenwhogo.org about a short talk, demo, or whatever you have in mind! - id: "270413433" - local_date: May 27, 2020 - local_time: "2020-05-27T12:00:00-04:00" - localizedcountry: USA - localizedlocation: Raleigh, NC - name: 'Women Who Go Lightning Talks: Go Developers Share Their Lessons Learned' - state: NC - thumbnailurl: "" - url: https://www.meetup.com/Women-Who-Go-Raleigh/events/270413433 -- city: Florianópolis - country: Brazil + thumbnailurl: https://secure.meetupstatic.com/photos/event/c/e/4/5/thumb_473932805.jpeg + url: https://www.meetup.com/Gurgaon-Go-Meetup/events/szcfmrybcnbwb +- city: Graz + country: Austria description: |- - Telegram oficial da comunidade Go de SC: https://t.me/joinchat/Mz2OaFghHkcTl6u9s1JQ8Q
      Slack oficial (canal #floripa): https://invite.slack.golangbridge.org/
      -
      - id: "268323326" - local_date: May 27, 2020 - local_time: "2020-05-27T19:00:00-03:00" - localizedcountry: Brazil - localizedlocation: Florianópolis, Brazil - name: 2º encontro de 2020 + Die Programmiersprache Go hat einen Grazer "Stammtisch". 
      + Wir treffen uns jeden 2. Montag im Monat bei TAO Digital am Lendplatz.
      + Schau einfach vorbei oder besuche uns online unter GoGraz!
      + id: fxlkwrybcnbzb + local_date: Oct 19, 2020 + local_time: "2020-10-19T19:00:00+02:00" + localizedcountry: Austria + localizedlocation: Graz, Austria + name: Go Language Usergroup Graz + photourl: https://secure.meetupstatic.com/photos/event/3/3/e/0/600_459373280.jpeg state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/7/2/1/f/thumb_447209215.jpeg - url: https://www.meetup.com/Floripa-Gophers/events/268323326 -- city: Saint Louis - country: USA + thumbnailurl: https://secure.meetupstatic.com/photos/event/3/3/e/0/thumb_459373280.jpeg + url: https://www.meetup.com/Graz-Open-Source-Meetup/events/fxlkwrybcnbzb +- city: Bournemouth + country: United Kingdom description: |- - We meet the fourth Wednesday of the month for development-oriented presentations and discussion centered on the Go Programming Language.
      - The basic agenda is:
      - 6:00 - 6:20 Food and networking (Go excels at networking).
      - 6:20 - 6:30 Announcements, intros, and so forth.
      - 6:30 - 6:45 Short presentation of the month
      - 6:45 - 8:00 Main presentation of the month.
      - Join us for the fun of sharing and learning about this programming language which is powering Cloud Native revolution.  All are welcome!  Any skill level!  We are here to help each other grow.
      - We also invite you to follow us on Twitter as @StLGoMeetup . - id: "270424382" - local_date: May 27, 2020 - local_time: "2020-05-27T18:05:00-05:00" - localizedcountry: USA - localizedlocation: Saint Louis, MO - name: '[GMT/-5] Writing General Purpose Kubernetes Controllers in Go' - state: MO + Golang Dorset
      + is a user group for people interested in the
      + Go programming language and assorted related technologies and methodologies (kubernetes / docker / DevOps etc)

      + We aim to meet every month in central Bournemouth.
      ---

      + We want to give everyone a chance to learn, or improve their skills with Go by practicing it, organizing workshops and talks, and mingling along like-minded individuals.
      + Any level of proficiency (or none at all) is welcome. 
      + All code and slides from examples are available in the github repo github.com/golangdorset 

      + Join us on Slack!
      + id: qfdjvrybcnbzb + local_date: Oct 19, 2020 + local_time: "2020-10-19T19:00:00+01:00" + localizedcountry: United Kingdom + localizedlocation: Bournemouth, United Kingdom + name: Golang Dorset Monthly Meetup + photourl: "" + state: "" thumbnailurl: "" - url: https://www.meetup.com/StL-Go/events/270424382 -- city: Chicago + url: https://www.meetup.com/Golang-Dorset/events/qfdjvrybcnbzb +- city: Reston country: USA description: |- - Welcome Gophers! Go Remote Meetup is a remote-first group for Go developers worldwide. We're part of the Go Developer Network, and we're excited to connect with you all, no matter where you're located.
      -

      - About Go:
      - Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
      - https://golang.org/
      -

      - About Go Developer Network:
      - GDN is a collection of Go user groups working together with a shared mission to empower developer communities with the knowledge, experience, and wisdom to build the next generation of software in Go.
      - https://github.com/gobridge/about-us/blob/master/gdn.md 
      -

      - JetBrains User Group Support Program
      - JetBrains allows us to raffle a free 1-year license to attendees. This is an especially great opportunity for new developers to boost their learning and productivity with excellent tooling -- so join up and attend!
      - id: "270632499" - local_date: May 28, 2020 - local_time: "2020-05-28T09:00:00-05:00" + (from golang.org)

      +
      + The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. + id: cmkwtrybcnbcc + local_date: Oct 21, 2020 + local_time: "2020-10-21T19:00:00-04:00" localizedcountry: USA - localizedlocation: Chicago, IL - name: 'GMT/-5: Integrating the Envoy gRPC API into a Dynamic Service Discovery Platform' - state: IL - thumbnailurl: https://secure.meetupstatic.com/photos/event/8/8/7/f/thumb_490354943.jpeg - url: https://www.meetup.com/Go-Remote-Meetup/events/270632499 + localizedlocation: Reston, VA + name: Golang Reston Monthly Meetup + photourl: https://secure.meetupstatic.com/photos/event/7/f/7/600_433982039.jpeg + state: VA + thumbnailurl: https://secure.meetupstatic.com/photos/event/7/f/7/thumb_433982039.jpeg + url: https://www.meetup.com/Golang-Reston/events/cmkwtrybcnbcc diff --git a/go.dev/data/learn/guidedLearning.yaml b/go.dev/data/learn/guidedLearning.yaml index 512c31ba..86b64497 100644 --- a/go.dev/data/learn/guidedLearning.yaml +++ b/go.dev/data/learn/guidedLearning.yaml @@ -18,7 +18,7 @@ links: thumbnail: /images/learn/edureka.png cta: Learn more - title: Go by example - content: Go by Example is a hands-on introduction to Go using annotated + content: Go by Example is a hands-on introduction to Go using annotated example programs. It’s a great starting point to use when tackling any Go project. url: https://gobyexample.com/ diff --git a/go.dev/layouts/learn/section.html b/go.dev/layouts/learn/section.html index 1d598776..8736678b 100644 --- a/go.dev/layouts/learn/section.html +++ b/go.dev/layouts/learn/section.html @@ -145,18 +145,17 @@ {{range first 3 $.Site.Data.events.all}}
    • - {{if .thumbnailurl}} - {{.name}} group photo + {{if .photourl}} + {{.name}} group photo {{else}} meetup logo {{end}}
      -

      {{.local_date}}

      -

      {{.city}}, {{.state}} {{.country}}

      +

      {{.local_date}} · {{.city}}, {{.state}} {{.country}}

      @@ -164,7 +163,15 @@

      {{.description | safeHTML}}

      -

      Learn more >

      +
      + {{ with .attendees }} + {{range first 5 .}} +
      + {{.name}} +
      + {{end}} + {{end}} +
    • {{end}} diff --git a/go.dev/layouts/partials/learn/card.html b/go.dev/layouts/partials/learn/card.html index 272bca36..cb06f417 100644 --- a/go.dev/layouts/partials/learn/card.html +++ b/go.dev/layouts/partials/learn/card.html @@ -9,7 +9,7 @@ {{end}}
      {{.title}}
      -

      {{.content}}

      +

      {{.content | safeHTML}}

      {{.cta}} Date: Thu, 8 Oct 2020 11:23:46 -0400 Subject: [x/go.dev] Implement Tablet Meetup Card design GD-145 Change-Id: Ie02136a667885450fd20461683b09a0335ad30cf X-GoDev-Commit: 69ec9ca8773c5af4f73ea6ece1fbfa51eb6b0fee --- go.dev/assets/css/styles.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index 1b8e7b01..2399704e 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -2151,7 +2151,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { font-size: 1rem; margin-left: 0.48rem; } -@media only screen and (min-width: 57.7rem) { +@media only screen and (min-width: 33.75rem) { .Learn-eventItem { flex-direction: row; } @@ -2167,7 +2167,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .Learn-eventThumbnail img{ height: 10.875rem; width: 17rem; - object-fit: contain; + object-fit: cover; } .Learn-eventDate { flex: 0; -- cgit v1.3 From abb1687beaeac404979b28d61cb373c9c303bfe3 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Thu, 8 Oct 2020 11:42:26 -0400 Subject: [x/go.dev] Fix meetup margin issue GD-142 Change-Id: I507717bbfd9f10a1e0bf790a3991271be0807417 X-GoDev-Commit: 7d5f5a85090b4b5dbd0ee140aae81bc678fee2b5 --- go.dev/assets/css/styles.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index 2399704e..60551414 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -2062,7 +2062,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { align-items: flex-start; display: flex; flex-direction: column; - padding: 1rem 0; + padding: 1.875rem 0 .175rem 0; } .Learn-eventItem + .Learn-eventItem { border-top: 0.0625rem solid #e0e0e0; @@ -2163,6 +2163,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { height: 10.875rem; min-width: 18.375rem; margin-right: 1rem; + margin-bottom: 0; } .Learn-eventThumbnail img{ height: 10.875rem; @@ -2190,7 +2191,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { text-align: right; } .Learn-eventItem { - padding: 1rem 0; + padding: 1.875rem 0; } } -- cgit v1.3 From 3eec3d16548a0317baef1e0f62a297b70f8b84d0 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Sat, 10 Oct 2020 10:37:03 -0400 Subject: [x/go.dev] fix card spacing issues on tablet Change-Id: I95369daac17b29a8beb7cede45ef809bbdc2baaf X-GoDev-Commit: 8ecae1c3ed89698ead064c33432cef4d82437c82 --- go.dev/assets/css/styles.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index 60551414..629de853 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -1990,7 +1990,9 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .Learn-card { height: 25rem; - width: 16.875rem; + + width: 30%; + max-width: 40rem; } } -- cgit v1.3 From 742702885a6648924c5b74f0533aac88b43d0433 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Sat, 10 Oct 2020 10:41:28 -0400 Subject: [x/go.dev] add course ratings Change-Id: I9ff6c29726afc339c1e966754b214e1366f72c15 X-GoDev-Commit: 05f32e9944e7138b6d0dbc4051133b6f826e4e4f --- go.dev/data/learn/cloud.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/go.dev/data/learn/cloud.yaml b/go.dev/data/learn/cloud.yaml index 968f4849..c242cd74 100644 --- a/go.dev/data/learn/cloud.yaml +++ b/go.dev/data/learn/cloud.yaml @@ -4,22 +4,22 @@ links: thumbnail: /images/learn/qwiklabs.png length: 1h 10m credits: 5 - rating: 5 + rating: 4.25 - title: Use Go Code to Work with Google Cloud Data Sources url: https://google.qwiklabs.com/focuses/10531?parent=catalog thumbnail: /images/learn/qwiklabs.png length: 1h 10m credits: 5 - rating: 5 + rating: 4.25 - title: Getting Started with Go on App Engine url: https://google.qwiklabs.com/focuses/2754?catalog_rank=%7B%22rank%22%3A1%2C%22num_filters%22%3A0%2C%22has_search%22%3Atrue%7D&parent=catalog&search_id=5407947 thumbnail: /images/learn/qwiklabs.png length: 20m credits: 1 - rating: 5 + rating: 4.15 - title: HTTP Google Cloud Functions in Go url: https://google.qwiklabs.com/focuses/5171?catalog_rank=%7B%22rank%22%3A1%2C%22num_filters%22%3A0%2C%22has_search%22%3Atrue%7D&parent=catalog&search_id=5407953 thumbnail: /images/learn/qwiklabs.png length: 40m credits: 5 - rating: 5 + rating: 4.5 -- cgit v1.3 From 831f55298e16c0e959308922ab0c83ef911b4520 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Sat, 10 Oct 2020 10:54:48 -0400 Subject: [x/go.dev] change to Tour of Go Change-Id: I5f67d93dc5f901b23cf828653b413436b33d0ef5 X-GoDev-Commit: d56e37964435f8acf3e75fbd73f6738d5a1d4cbb --- go.dev/data/learn/quickstart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.dev/data/learn/quickstart.yaml b/go.dev/data/learn/quickstart.yaml index e2ea9509..0578bb7b 100644 --- a/go.dev/data/learn/quickstart.yaml +++ b/go.dev/data/learn/quickstart.yaml @@ -4,7 +4,7 @@ links: or brush up for your existing Go code. cta: View documentation url: https://golang.org/doc/install - - title: Tour Go + - title: Tour of Go content: An interactive introduction to Go in three sections. Each section concludes with a few exercises so you can practice what you've learned. cta: Take a tour -- cgit v1.3 From 343d72ba82a3c01f0abee981843812bc88a32663 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Mon, 12 Oct 2020 20:04:40 -0400 Subject: [x/go.dev] Set row of learn cards to 4, square roatio meetup images Change-Id: I6d4093cc2fa6be24d3d7e4f0852cd59e00b9cd5b X-GoDev-Commit: af32353334a916c4c3c140dad18aec54ead9929c --- go.dev/assets/css/styles.css | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index 629de853..1162e227 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -1991,8 +1991,9 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .Learn-card { height: 25rem; - width: 30%; + width: 25%; max-width: 40rem; + padding: 0 13.5px; } } @@ -2082,7 +2083,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Learn-eventThumbnail img { width: 100%; - height: 40vw; + height: auto; object-fit: cover; } @@ -2168,9 +2169,9 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { margin-bottom: 0; } .Learn-eventThumbnail img{ - height: 10.875rem; + height: 17rem; width: 17rem; - object-fit: cover; + object-fit: contain; } .Learn-eventDate { flex: 0; -- cgit v1.3 From 4dc70c216c4383d97b43c8e3bd67c1dfd31f2348 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Mon, 12 Oct 2020 20:14:37 -0400 Subject: [x/go.dev] fix overlapping learn card images Change-Id: I97fbfa21b348585937deec08313e7071b94da702 X-GoDev-Commit: ee33a34074bba23456e6505ce9c92434dffe4db3 --- go.dev/assets/css/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index 1162e227..72edddbc 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -2163,7 +2163,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { max-width: 46.825rem; } .Learn-eventThumbnail { - height: 10.875rem; + height: 17rem; min-width: 18.375rem; margin-right: 1rem; margin-bottom: 0; -- cgit v1.3 From 1f7b50bd05e864b6eda071ea9e8d811bc6138909 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Mon, 12 Oct 2020 21:58:06 -0400 Subject: [x/go.dev] smaller meetup event icons Change-Id: Ib627e61c7cd860c4cfa3400179d62a1a2dd5f006 X-GoDev-Commit: 84d0276f5f79770b7de96a303cdfac2cc06fe403 --- go.dev/assets/css/styles.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index 72edddbc..fb972bd1 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -2163,14 +2163,14 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { max-width: 46.825rem; } .Learn-eventThumbnail { - height: 17rem; - min-width: 18.375rem; + height: 8rem; + min-width: 8rem; margin-right: 1rem; margin-bottom: 0; } .Learn-eventThumbnail img{ - height: 17rem; - width: 17rem; + height: 8rem; + width: 8rem; object-fit: contain; } .Learn-eventDate { -- cgit v1.3 From a7ff29faccf6bf0579333ad8ef264af62d7cd8f4 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Tue, 13 Oct 2020 11:36:29 -0400 Subject: [x/go.dev] Convert cardlists to grid layout. [GD-146] Change-Id: Ibf7d956192848fd6d24d930d337958da1bc94d9c X-GoDev-Commit: 8ad2980f5f5f6681d508764c008513a843a775c2 --- go.dev/assets/css/styles.css | 171 ++++++++++++++++++++++---------------- go.dev/layouts/learn/section.html | 104 +++++++++++++---------- 2 files changed, 158 insertions(+), 117 deletions(-) diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index fb972bd1..b71e359f 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -1752,7 +1752,11 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .Learn-hero { background-color: #f6f8f8; - background-image: radial-gradient(60.0625rem 60.0625rem, #beeaf5 50%, #f6f8f8 50%); + background-image: radial-gradient( + 60.0625rem 60.0625rem, + #beeaf5 50%, + #f6f8f8 50% + ); background-position: top -50rem left -9rem; background-repeat: no-repeat; background-size: 75rem 75rem; @@ -1828,26 +1832,77 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { font-weight: normal; } -.Learn-quickstarts { - align-items: center; +/* Learn page grid rules */ + +.LearnGo-gridContainer { display: flex; - flex-direction: column; - flex-wrap: wrap; + justify-content: center; + padding: 0rem 0rem 1rem; +} + +.Learn-cardList { + column-gap: 3.313rem; + display: grid; + grid-template-columns: repeat(1, 1fr); + justify-content: space-between; list-style: none; + padding-left: 0; + row-gap: 2rem; +} + +.Learn-card { + height: 23.375rem; + max-width: 40rem; +} + +@media only screen and (min-width: 48rem) { + .Learn-cardList { + grid-template-columns: repeat(2, 1fr); + } +} +@media only screen and (min-width: 72.75rem) { + .Learn-cardList { + grid-template-columns: repeat(4, 1fr); + } +} + +/* End Learn page grid rules */ + +/* Learn quickstart grid */ + +.Learn-hero .Learn-quickstarts { margin: 0; - padding: 2rem 0; + margin-top: 4rem; } -.Learn-quickstart { - height: 14rem; - max-width: 21.25rem; +.Learn-hero .Learn-quickstart { + height: auto; } -.Learn-quickstart:nth-child(2) { - margin: 2.125rem 0; +.Learn-hero .LearnGo-gridContainer { + padding: 3rem 0rem 3rem; } @media only screen and (min-width: 48rem) { + .Learn-hero .Learn-cardList { + grid-template-columns: repeat(2, 1fr); + } +} + +@media only screen and (min-width: 57.7rem) { + .Learn-hero .Learn-cardList { + grid-template-columns: repeat(3, 1fr); + } +} +@media only screen and (min-width: 72.75rem) { + .Learn-hero .Learn-cardList { + grid-template-columns: repeat(3, 1fr); + } +} + +/* Learn hero section */ + +@media only screen and (min-width: 57.7rem) { .Learn-hero { background-position: top -35rem left 30rem; } @@ -1870,7 +1925,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .Learn-heroGopher img { height: 21.0625rem; } - + .Learn-heroAction { height: 4rem; width: 16.5625rem; @@ -1886,12 +1941,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .Learn-heroAction span { font-size: 1rem; } - - .Learn-quickstarts { - flex-direction: row; - justify-content: space-between; - padding: 1.625rem 0; - } } @media only screen and (min-width: 91rem) { @@ -1941,21 +1990,11 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { line-height: 2.25rem; } -.Learn-cardList { - align-items: center; - display: flex; - flex-direction: column; - flex-wrap: wrap; - list-style: none; - margin: 1.875rem 0; - padding: 0; -} - -.Learn-card { - height: 23.375rem; - margin-bottom: 1.875rem; - max-width: 23.25rem; -} +/* @media only screen and (min-width: 48rem) { + .Learn-guided .Learn-cardList { + grid-template-columns: repeat(2, 1fr); + } +} */ .Learn-selfPaced .Learn-card .Card-content { justify-content: space-between; @@ -1982,45 +2021,36 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { font-size: 2.25rem; line-height: 2.625rem; } - - .Learn-cardList { - flex-direction: row; - justify-content: space-between; - } - - .Learn-card { - height: 25rem; - - width: 25%; - max-width: 40rem; - padding: 0 13.5px; - } } -.Learn-bookList { - align-items: center; - display: flex; - flex-direction: column; - flex-wrap: wrap; - list-style: none; - margin: 1.875rem 0; - padding: 0; +.Learn-cardList.Learn-bookList { + grid-template-columns: repeat(1, 1fr); + width: 100%; } -.Learn-book { - margin-bottom: 1.875rem; - width: 100%; +.Learn-card.Learn-book { + height: auto; } @media only screen and (min-width: 48rem) { - .Learn-bookList { - align-items: flex-start; - flex-direction: row; - justify-content: space-between; + .Learn-cardList.Learn-bookList { + grid-template-columns: repeat(3, 1fr); + } + + .Learn-card.Learn-book { + max-width: 13.125rem; } +} - .Learn-book { - width: 13.125rem; +@media only screen and (min-width: 57.7rem) { + .Learn-cardList.Learn-bookList { + grid-template-columns: repeat(4, 1fr); + } +} + +@media only screen and (min-width: 72.75rem) { + .Learn-cardList.Learn-bookList { + grid-template-columns: repeat(5, 1fr); } } @@ -2057,7 +2087,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .Learn-events { flex: 1 0 100%; list-style: none; - margin: 0.5rem 0 0; + margin: 0.5rem 0 1.875rem; padding: 0; width: 100%; } @@ -2065,7 +2095,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { align-items: flex-start; display: flex; flex-direction: column; - padding: 1.875rem 0 .175rem 0; + padding: 1.875rem 0 0.175rem 0; } .Learn-eventItem + .Learn-eventItem { border-top: 0.0625rem solid #e0e0e0; @@ -2156,9 +2186,9 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } @media only screen and (min-width: 33.75rem) { .Learn-eventItem { - flex-direction: row; + flex-direction: row; } - + .Learn-eventBody { max-width: 46.825rem; } @@ -2168,7 +2198,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { margin-right: 1rem; margin-bottom: 0; } - .Learn-eventThumbnail img{ + .Learn-eventThumbnail img { height: 8rem; width: 8rem; object-fit: contain; @@ -2198,7 +2228,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } } - .Solutions-title, .Solutions-useCases, .Solutions-caseStudies { @@ -3282,7 +3311,7 @@ img.PullQuote-image { } .Card { - border: 0.0625rem solid #CFCFCF; + border: 0.0625rem solid #cfcfcf; border-radius: 0.25rem; height: 100%; background-color: #ffffff; @@ -3423,4 +3452,4 @@ img.PullQuote-image { .Book-content { margin: 1rem 0 0; } -} \ No newline at end of file +} diff --git a/go.dev/layouts/learn/section.html b/go.dev/layouts/learn/section.html index 8736678b..0f8d2bea 100644 --- a/go.dev/layouts/learn/section.html +++ b/go.dev/layouts/learn/section.html @@ -40,13 +40,15 @@ Go Gopher riding a motorcycle
      -
        - {{ range first 3 $.Site.Data.learn.quickstart.links }} -
      • - {{ partial "learn/card.html" . }} -
      • - {{end}} -
      +
      +
        + {{ range first 3 $.Site.Data.learn.quickstart.links }} +
      • + {{ partial "learn/card.html" . }} +
      • + {{end}} +
      +
    @@ -59,13 +61,15 @@

    Guided learning journeys

    -
      - {{ range first 4 $.Site.Data.learn.guidedLearning.links }} -
    • - {{ partial "learn/card.html" . }} -
    • - {{ end }} -
    +
    +
      + {{ range first 4 $.Site.Data.learn.guidedLearning.links }} +
    • + {{ partial "learn/card.html" . }} +
    • + {{ end }} +
    +
    @@ -74,13 +78,15 @@

    Online learning

    -
      - {{ range first 4 $.Site.Data.learn.courses.links }} -
    • - {{ partial "learn/card.html" . }} -
    • - {{ end }} -
    +
    +
      + {{ range first 4 $.Site.Data.learn.courses.links }} +
    • + {{ partial "learn/card.html" . }} +
    • + {{ end }} +
    +
    @@ -89,14 +95,16 @@

    Google Cloud Self-Paced Labs

    -
      - {{ range first 4 $.Site.Data.learn.cloud.links }} -
    • - {{ partial "learn/selfPacedCard.html" . }} -
    • - - {{ end }} -
    +
    +
      + {{ range first 4 $.Site.Data.learn.cloud.links }} +
    • + {{ partial "learn/selfPacedCard.html" . }} +
    • + + {{ end }} +
    +
    @@ -105,13 +113,15 @@

    Featured books

    -
      - {{ range first 5 $.Site.Data.learn.books.links }} -
    • - {{ partial "learn/book.html" . }} -
    • - {{ end }} -
    +
    +
      + {{ range first 5 $.Site.Data.learn.books.links }} +
    • + {{ partial "learn/book.html" . }} +
    • + {{ end }} +
    +
    @@ -120,16 +130,18 @@

    In-person training

    -
      - {{range first 4 $.Site.Data.learn.inPerson.links}} -
    • -

      - {{.title}} -

      -

      {{.blurb}}

      -
    • - {{end}} -
    +
    +
      + {{range first 4 $.Site.Data.learn.inPerson.links}} +
    • +

      + {{.title}} +

      +

      {{.blurb}}

      +
    • + {{end}} +
    +
    -- cgit v1.3 From 234810ab4ce45b957556eaab6a92d6883f74c768 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Fri, 16 Oct 2020 13:11:54 -0400 Subject: [x/go.dev] update go by example thumbnail Change-Id: Ib6c0b2bb16b9362ad6a190ead1182a33b91c9f37 X-GoDev-Commit: b7544dd89a7d2b64e0350d518820b803ba387d2a --- go.dev/static/images/learn/gobyexample.png | Bin 4220 -> 8375 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/go.dev/static/images/learn/gobyexample.png b/go.dev/static/images/learn/gobyexample.png index 9256899c..d4f2538f 100644 Binary files a/go.dev/static/images/learn/gobyexample.png and b/go.dev/static/images/learn/gobyexample.png differ -- cgit v1.3 From e7d50f39289c8f0b19eab414b9d3498e7dfc4115 Mon Sep 17 00:00:00 2001 From: Matt Masurka Date: Wed, 14 Oct 2020 09:42:31 -0700 Subject: [x/go.dev] Updates to the learn.go.dev page - Updated Hero component - New page layout and styles - Updated Meetup Event section staging link: https://staging-learn.go.dev/ Jira link: https://leftfieldlabs.atlassian.net/secure/RapidBoard.jspa?rapidView=250 Change-Id: I9e47859570d82af02e8817dfc59dc992442f0ade X-GoDev-Commit: 120f2bad6fa6c856098c1ac5e832ba219fedd2b3 --- go.dev/assets/css/styles.css | 636 +++++++++++++++------ go.dev/cmd/events/main.go | 2 + go.dev/content/learn/_index.md | 5 +- go.dev/data/events.yaml | 492 ++++++++-------- go.dev/data/learn/books.yaml | 12 +- go.dev/data/learn/cloud.yaml | 12 + go.dev/data/learn/courses.yaml | 16 +- go.dev/data/learn/guidedLearning.yaml | 25 +- go.dev/data/learn/quickstart.yaml | 18 +- go.dev/layouts/learn/section.html | 264 ++++----- go.dev/layouts/partials/learn/book.html | 32 ++ go.dev/layouts/partials/learn/card.html | 33 ++ go.dev/layouts/partials/learn/selfPacedCard.html | 24 + go.dev/static/images/gophers/motorcycle.svg | 1 + go.dev/static/images/learn/clis.png | Bin 0 -> 5889 bytes go.dev/static/images/learn/codecademy.png | Bin 17878 -> 740 bytes go.dev/static/images/learn/codelabs.png | Bin 13901 -> 970 bytes go.dev/static/images/learn/concurrency-in-go.jpeg | Bin 27279 -> 0 bytes go.dev/static/images/learn/concurrency-in-go.png | Bin 0 -> 27279 bytes go.dev/static/images/learn/coursera.png | Bin 4545 -> 4517 bytes go.dev/static/images/learn/earth.png | Bin 39255 -> 18083 bytes go.dev/static/images/learn/edureka.png | Bin 9997 -> 26261 bytes go.dev/static/images/learn/exercism.png | Bin 38410 -> 1832 bytes .../images/learn/get-programming-with-go.jpeg | Bin 79064 -> 43353 bytes .../images/learn/go-programming-blueprints.png | Bin 81410 -> 32969 bytes .../images/learn/go-programming-language-book.png | Bin 151649 -> 59228 bytes go.dev/static/images/learn/go_cdk_logo.png | Bin 28962 -> 11959 bytes go.dev/static/images/learn/gobyexample.png | Bin 4220 -> 8375 bytes go.dev/static/images/learn/gohelloworld.png | Bin 63354 -> 37836 bytes go.dev/static/images/learn/gophercises.png | Bin 0 -> 48432 bytes go.dev/static/images/learn/gophercises_1.png | Bin 101235 -> 0 bytes go.dev/static/images/learn/helloworld.png | Bin 79053 -> 35540 bytes go.dev/static/images/learn/introducing-go-book.png | Bin 125742 -> 56439 bytes go.dev/static/images/learn/qwiklabs.png | Bin 3175 -> 2761 bytes go.dev/static/images/learn/star-rating.png | Bin 0 -> 280 bytes go.dev/static/images/learn/web-dev.png | Bin 0 -> 5142 bytes 36 files changed, 1011 insertions(+), 561 deletions(-) create mode 100644 go.dev/layouts/partials/learn/book.html create mode 100644 go.dev/layouts/partials/learn/card.html create mode 100644 go.dev/layouts/partials/learn/selfPacedCard.html create mode 100644 go.dev/static/images/gophers/motorcycle.svg create mode 100644 go.dev/static/images/learn/clis.png delete mode 100644 go.dev/static/images/learn/concurrency-in-go.jpeg create mode 100644 go.dev/static/images/learn/concurrency-in-go.png create mode 100644 go.dev/static/images/learn/gophercises.png delete mode 100644 go.dev/static/images/learn/gophercises_1.png create mode 100644 go.dev/static/images/learn/star-rating.png create mode 100644 go.dev/static/images/learn/web-dev.png diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index 69adb145..f1675ba8 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -1749,176 +1749,311 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { width: 28vw; } } -.Learn-title, -.Learn-gettingStarted, -.Learn-books, -.Learn-guided, -.Learn-inPersonTraining, -.Learn-meetups, -.Learn-online { - padding: 0 1.5rem; + +.Learn-hero { + background-color: #f6f8f8; + background-image: radial-gradient( + 60.0625rem 60.0625rem, + #beeaf5 50%, + #f6f8f8 50% + ); + background-position: top -50rem left -9rem; + background-repeat: no-repeat; + background-size: 75rem 75rem; + padding: 0 2.25rem 0; } -.Learn-books, -.Learn-guided, -.Learn-inPersonTraining, -.Learn-quickstarts, -.Learn-meetups, -.Learn-online { - margin: 4rem auto; - max-width: 75.75rem; + +.Learn-hero .Container { + z-index: 1; + position: relative; + max-width: 68.125rem; } -.Learn-title { - margin: auto; - max-width: 75.75rem; + +.Learn-heroInner { + display: flex; + flex-direction: column-reverse; } -.Learn-tile a { - width: 100%; + +.Learn-heroGopher { + display: flex; + justify-content: flex-end; + padding-top: 1.25rem; } -.Learn-title h1 { - font-size: 2.625rem; + +.Learn-heroGopher img { + height: 13.5625rem; + width: auto; +} + +.Learn-heroContent { + padding-top: 1.125rem; +} + +.Learn-heroContent a:not(.js-downloadBtn) { + text-decoration: underline; +} + +.Learn-heroContent h1 { + font-family: Work Sans; + font-style: normal; + font-weight: normal; + font-size: 1.5rem; line-height: 2rem; } -.Learn-gettingStarted { - background-color: #fefadd; - padding-top: 6rem; + +.Learn-heroContent p { + color: #5f5f5f; + font-size: 0.875rem; + line-height: 1.5rem; + max-width: 27.1875rem; } -.Learn-quickstartThumbnail { - background-color: #fff; - border: 0.0625rem solid #e9e9e9; - border-radius: 0.3125rem; + +.Learn-heroAction { + align-items: center; + background-color: #007d9c; + border-radius: 0.25rem; display: flex; - height: 9.66rem; - width: 14.6875rem; + height: 2.5rem; + justify-content: center; + width: 10.5rem; } -.Learn-quickstartThumbnail img { - margin: auto; - max-height: 9.66rem; - max-width: 14.6875rem; + +.Learn-heroAction a, +.Learn-heroAction a:hover, +.Learn-heroAction a:visited { + color: #fff; + font-size: 0.875rem; + font-weight: 500; + line-height: 1rem; + text-decoration: none; } -@media only screen and (min-width: 57.7rem) { - .Learn-quickstartThumbnail { - height: 14.6875rem; - width: 22rem; - } - .Learn-quickstartThumbnail img { - max-height: 14.6875rem; - max-width: 22rem; - } + +.Learn-heroAction span { + font-weight: normal; } -.Learn-quickstarts { + +/* Learn page grid rules */ + +.LearnGo-gridContainer { display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: space-around; - list-style: none; - margin: 0 0 1rem -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ - padding: 0 1.5rem; - padding-inline-start: 0; + justify-content: center; + padding: 0rem 0rem 1rem; } -.Learn-quickstart { - align-items: center; - display: flex; - flex: initial; - flex-direction: column; - padding: 1rem 0 0 1rem; + +.Learn-cardList { + column-gap: 3.313rem; + display: grid; + grid-template-columns: repeat(1, 1fr); + justify-content: space-between; + list-style: none; + padding-left: 0; + row-gap: 2rem; } -.Learn-quickstart a, -.Learn-quickstart a:visited, -.Learn-quickstart a:hover { - color: #3e4042; - text-decoration: none; + +.Learn-card { + height: 23.375rem; + max-width: 40rem; } -.Learn-quickstartTitle { - font-size: 1.25rem; - text-align: center; + +@media only screen and (min-width: 48rem) { + .Learn-cardList { + grid-template-columns: repeat(2, 1fr); + } } -@media only screen and (min-width: 81.25rem) { - .Learn-quickstarts { - justify-content: space-between; +@media only screen and (min-width: 72.75rem) { + .Learn-cardList { + grid-template-columns: repeat(4, 1fr); } } -.Learn-actions { + +/* End Learn page grid rules */ + +/* Learn quickstart grid */ + +.Learn-hero .Learn-quickstarts { margin: 0; - padding: 1rem 0 3rem; - text-align: center; + margin-top: 4rem; } -.Learn-viewMoreButton, -.Learn-viewMoreButton:visited, -.Learn-viewMoreButton:hover, -.Learn-viewMoreButton { - background-color: #f5fcfe; - border: 0.0625rem solid #00add8; - border-radius: 0.25rem; - box-shadow: 0 0.125rem 0.3125rem 0 rgba(0, 0, 0, 0.2); - box-sizing: border-box; - display: inline-block; - line-height: 2.2rem; - padding: 0 2.3rem; - text-align: center; - text-decoration: none; + +.Learn-hero .Learn-quickstart { + height: auto; } -.Learn-subHeader { - display: flex; - justify-content: space-between; - width: 100%; + +.Learn-hero .LearnGo-gridContainer { + padding: 3rem 0rem 3rem; } -.Learn-tileList { - display: grid; - gap: 2rem; - grid-template-columns: repeat(2, minmax(0, 1fr)); - list-style: none; - padding: 0; + +@media only screen and (min-width: 48rem) { + .Learn-hero .Learn-cardList { + grid-template-columns: repeat(2, 1fr); + } } -@media only screen and (min-width: 38rem) { - .Learn-tileList { - grid-template-columns: repeat(4, minmax(0, 1fr)); + +@media only screen and (min-width: 57.7rem) { + .Learn-hero .Learn-cardList { + grid-template-columns: repeat(3, 1fr); } } -@media only screen and (min-width: 48rem) { - .Learn-tileList { +@media only screen and (min-width: 72.75rem) { + .Learn-hero .Learn-cardList { + grid-template-columns: repeat(3, 1fr); + } +} + +/* Learn hero section */ + +@media only screen and (min-width: 57.7rem) { + .Learn-hero { + background-position: top -35rem left 30rem; + } + + .Learn-heroInner { + flex-direction: row; justify-content: space-between; } - .Learn-tileList { - column-gap: 3rem; + + .Learn-heroContent { + padding-top: 3.75rem; + } + + .Learn-heroGopher { + flex: 1; + justify-content: center; + padding-top: 2.625rem; + } + + .Learn-heroGopher img { + height: 21.0625rem; + } + + .Learn-heroAction { + height: 4rem; + width: 16.5625rem; + } + + .Learn-heroAction a, + .Learn-heroAction a:hover, + .Learn-heroAction a:visited { + font-size: 1.5rem; + line-height: 1.75rem; + } + + .Learn-heroAction span { + font-size: 1rem; + } +} + +@media only screen and (min-width: 91rem) { + .Learn-hero { + background-position: top -35rem left 50rem; } } -.Learn-tile { + +.Learn-guided, +.Learn-online, +.Learn-selfPaced, +.Learn-books, +.Learn-inPersonTraining, +.Learn-meetups { + margin-top: 3.75rem; + padding: 0 1.5rem; +} + +.Learn-learningResources { + align-items: center; display: flex; - flex-wrap: wrap; - justify-content: center; + flex-direction: column; + margin: 3.75rem 0; } -.Learn-tile a { - color: #3c4043; + +.Learn-learningResources h2, +.Learn-learningResourcesHeader h3 { + margin: 0; } -.Learn-tileTitle { - display: block; - font-size: 0.75rem; - font-style: normal; - font-weight: normal; - letter-spacing: 0.01rem; - line-height: 0.875rem; - margin: 1.5rem auto 0; - overflow-wrap: break-word; - text-align: center; + +.Learn-learningResources h2 { + font-weight: 500; + font-size: 2rem; + letter-spacing: 0.1875rem; + line-height: 2.3125rem; } -.Learn-tileThumbnail { - align-items: center; - background-color: #fff; - border-radius: 0.3125rem; - box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); + +.Learn-learningResourcesHeader { display: flex; justify-content: center; - margin: auto; +} + +.Learn-learningResourcesHeader h3 { + font-weight: bold; + font-size: 1.5rem; + letter-spacing: normal; + line-height: 2.25rem; +} + +/* @media only screen and (min-width: 48rem) { + .Learn-guided .Learn-cardList { + grid-template-columns: repeat(2, 1fr); + } +} */ + +.Learn-selfPaced .Learn-card .Card-content { + justify-content: space-between; +} + +.Learn-online .Card-thumbnail { + background-position: 1.5rem center; + background-repeat: no-repeat; + background-size: auto 1.5rem; + height: 7.5625rem; +} + +.Learn-selfPaced .Learn-card { + height: 20.3125rem; +} + +@media only screen and (min-width: 48rem) { + .Learn-learningResourcesHeader { + display: flex; + justify-content: flex-start; + } + + .Learn-learningResourcesHeader h2 { + font-size: 2.25rem; + line-height: 2.625rem; + } +} + +.Learn-cardList.Learn-bookList { + grid-template-columns: repeat(1, 1fr); width: 100%; } -.Learn-tileThumbnail img { - max-height: 100%; - max-width: 100%; + +.Learn-card.Learn-book { + height: auto; } -.Learn-tileThumbnail--book img { - max-height: 100%; - max-width: 100%; + +@media only screen and (min-width: 48rem) { + .Learn-cardList.Learn-bookList { + grid-template-columns: repeat(3, 1fr); + } + + .Learn-card.Learn-book { + max-width: 13.125rem; + } +} + +@media only screen and (min-width: 57.7rem) { + .Learn-cardList.Learn-bookList { + grid-template-columns: repeat(4, 1fr); + } } + +@media only screen and (min-width: 72.75rem) { + .Learn-cardList.Learn-bookList { + grid-template-columns: repeat(5, 1fr); + } +} + .Learn-inPersonList { display: flex; flex: 1 0 100%; @@ -1926,9 +2061,10 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { flex-wrap: wrap; justify-content: space-between; list-style: none; - margin: 0.5rem 0 1rem -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ + margin: 1.875rem 0 1.875rem -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ padding-left: 0; } + .Learn-inPerson { border-bottom: 0.0625rem solid #e0e0e0; flex: 1 1 31.25rem; @@ -1936,6 +2072,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { max-width: 31rem; padding-bottom: 1.25rem; } + .Learn-inPerson:nth-child(1), .Learn-inPerson:nth-child(2) { border-top: 0.0625rem solid #e0e0e0; @@ -1946,61 +2083,81 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .Learn-inPersonBlurb { margin: 0; } + .Learn-events { - border-bottom: 0.0625rem solid #e0e0e0; - border-top: 0.0625rem solid #e0e0e0; flex: 1 0 100%; list-style: none; - margin: 0.5rem 0 0; + margin: 0.5rem 0 1.875rem; padding: 0; width: 100%; } .Learn-eventItem { align-items: flex-start; display: flex; - padding: 1rem 0; + flex-direction: column; + padding: 1.875rem 0 0.175rem 0; } .Learn-eventItem + .Learn-eventItem { border-top: 0.0625rem solid #e0e0e0; } + .Learn-eventThumbnail { align-self: center; display: flex; flex: 0 0 3rem; - height: 3rem; - margin-right: 1rem; + height: auto; + margin-bottom: 1rem; } .Learn-eventThumbnail--noimage { - background-color: #ffffff; + background-color: #fff; } .Learn-eventThumbnail img { + width: 100%; height: auto; - object-fit: contain; - width: 4rem; + + object-fit: cover; +} +.Learn-eventAttendees { + display: flex; +} +.Learn-eventAttendeesItem img { + width: 2rem; + height: 2rem; + border-radius: 100%; } .Learn-eventBody { - display: inline-flex; + display: flex; flex: 1; flex-direction: column; min-width: 0; + max-width: 100%; } .Learn-eventDate { display: flex; flex-wrap: wrap; justify-content: space-between; + + margin-bottom: 1rem; } .Learn-eventDate p { color: #6e7072; margin: 0; } .Learn-eventName { - color: #007d9c; + color: #000; + font-family: 'Work Sans', Arial, Helvetica, sans-serif; font-size: 1.25rem; - font-weight: normal; + font-weight: 500; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + + margin-bottom: 1rem; +} +.Learn-eventName a { + text-decoration: none; + color: #000; } .Learn-eventDescription { -webkit-box-orient: vertical; /* See webkit-line-clamp */ @@ -2008,6 +2165,10 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { -webkit-line-clamp: 4; /* Elide flex text. webkit-line-clamp is broadly compatible with browsers. */ overflow: hidden; text-overflow: ellipsis; + line-height: 24px; +} +.Learn-eventText { + margin-bottom: 0.5rem; } .Learn-viewMore { align-items: center; @@ -2023,16 +2184,29 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { font-size: 1rem; margin-left: 0.48rem; } -@media only screen and (min-width: 57.7rem) { +@media only screen and (min-width: 33.75rem) { + .Learn-eventItem { + flex-direction: row; + } + + .Learn-eventBody { + max-width: 46.825rem; + } .Learn-eventThumbnail { - height: auto; - min-width: 5.375rem; + height: 8rem; + min-width: 8rem; + margin-right: 1rem; + margin-bottom: 0; + } + .Learn-eventThumbnail img { + height: 8rem; + width: 8rem; + object-fit: contain; } .Learn-eventDate { flex: 0; flex-direction: column; justify-content: center; - margin: 0 1rem; min-width: 9rem; } .Learn-eventText { @@ -2049,14 +2223,11 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { align-self: center; text-align: right; } - .Learn-eventBody { - display: flex; - flex-direction: row; - } .Learn-eventItem { - padding: 1rem 0; + padding: 1.875rem 0; } } + .Solutions-title, .Solutions-useCases, .Solutions-caseStudies { @@ -2205,7 +2376,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { background-color: #f6f8f8; } .Solutions-headline h2 { - color: #000000; + color: #000; font-family: 'Work Sans', sans-serif; font-size: 1.5rem; font-style: normal; @@ -2246,7 +2417,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .SolutionsTabs-tab { background-color: #fff; border-style: none; - color: #000000; + color: #000; cursor: pointer; font-family: 'Work Sans', Arial, Helvetica, sans-serif; font-size: 1rem; @@ -2290,7 +2461,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { margin: 0 0 1rem 0; } .Solutions-card { - background: #ffffff; + background: #fff; border: 0.0625rem solid #cfcfcf; border-radius: 0.625rem; box-sizing: border-box; @@ -2358,7 +2529,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { line-height: 1.5rem; } .Solutions-useCaseTitle { - color: #000000; + color: #000; font-family: 'Work Sans', sans-serif; font-size: 1.125rem; font-weight: 500; @@ -2391,7 +2562,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { margin: 2rem 0 2.875rem; } .Solutions-footer p { - color: #000000; + color: #000; font-family: 'Roboto', Arial, Helvetica, sans-serif; font-size: 1.125rem; font-weight: normal; @@ -2433,7 +2604,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { justify-content: space-between; } .TestimonialsGo-quoteSection p { - color: #000000; + color: #000; font-size: 0.875rem; letter-spacing: 0.0082rem; line-height: 1.5rem; @@ -2500,7 +2671,7 @@ p.BackgroundQuote-body { } .BackgroundQuote { background-color: #007f9f; - color: #ffffff; + color: #fff; margin: 1.5rem auto; padding: 2rem 1.5rem; } @@ -3138,3 +3309,148 @@ a.UseCase-anchorLink.selected::before { img.PullQuote-image { width: 2.625rem; } + +.Card { + border: 0.0625rem solid #cfcfcf; + border-radius: 0.25rem; + height: 100%; + background-color: #fff; +} + +.Card a, +.Card a:visited, +.Card a:hover { + text-decoration: none; +} + +.Card-inner { + display: flex; + flex-direction: column; + height: 100%; +} + +.Card-thumbnail { + background-size: cover; + background-position: center; + height: 9.5625rem; +} + +.Card-content { + display: flex; + flex: 1; + flex-direction: column; + padding: 1.5rem; +} + +.Card-contentTitle, +.Card-contentBody { + line-height: 1.5rem; +} + +.Card-contentTitle { + color: #000; + font-family: 'Work Sans', sans-serif; + font-size: 1.125rem; + font-weight: 500; +} + +.Card-contentBody { + color: #5f5f5f; + font-size: 0.875rem; + margin-top: 1rem; + flex: auto; +} + +.Card-contentCta { + align-items: center; + display: flex; +} + +.Card-contentCta span { + margin-right: 0.6875rem; +} + +.Card-selfPacedFooter { + display: flex; +} + +.Card-selfPacedCredits { + color: #5f5f5f; + flex: 1; + font-size: 0.75rem; +} + +.Card-selfPacedRating { + width: 5rem; +} + +.Card-starRating { + background-image: url('/images/learn/star-rating.png'); + background-position: left; + background-repeat: no-repeat; + height: 1rem; +} + +.Book a, +.Book a:visited, +.Book a:hover { + text-decoration: none; +} + +.Book-inner { + align-items: flex-start; + display: flex; + justify-content: space-between; +} + +.Book-thumbnail { + width: 6.625rem; +} + +.Book-thumbnail img { + width: 100%; +} + +.Book-content { + margin-left: 1.6875rem; + flex: 1; +} + +.Book-title { + color: #000; + font-family: Work Sans; + font-size: 1.125rem; + font-weight: 500; + line-height: 1.5rem; + margin: 0 0 0.5rem; +} + +.Book-description { + color: #5f5f5f; + font-size: 0.875rem; + line-height: 1.5rem; +} + +.Book-cta { + align-items: center; + display: flex; + height: 1.5rem; +} + +.Book-cta span { + margin-right: 0.6875rem; +} + +@media only screen and (min-width: 48rem) { + .Book-inner { + flex-direction: column; + } + + .Book-thumbnail { + width: 100%; + } + + .Book-content { + margin: 1rem 0 0; + } +} diff --git a/go.dev/cmd/events/main.go b/go.dev/cmd/events/main.go index e2e97116..1ccc9e44 100644 --- a/go.dev/cmd/events/main.go +++ b/go.dev/cmd/events/main.go @@ -82,6 +82,7 @@ func getUpcomingEvents(c client) (*UpcomingEvents, error) { LocalizedCountry: group.LocalizedCountryName, LocalizedLocation: group.LocalizedLocation, Name: group.NextEvent.Name, + PhotoURL: chapter.GroupPhoto.PhotoLink, State: chapter.State, ThumbnailURL: chapter.GroupPhoto.ThumbLink, URL: "https://www.meetup.com/" + path.Join(chapter.URLName, "events", group.NextEvent.ID), @@ -156,6 +157,7 @@ type EventData struct { LocalizedCountry string LocalizedLocation string Name string + PhotoURL string State string ThumbnailURL string URL string diff --git a/go.dev/content/learn/_index.md b/go.dev/content/learn/_index.md index 407d08f6..f45421ef 100644 --- a/go.dev/content/learn/_index.md +++ b/go.dev/content/learn/_index.md @@ -1,6 +1,3 @@ --- -title: "Learn" -date: 2019-09-18T15:26:34-04:00 -draft: true +title: "Getting Started" --- - diff --git a/go.dev/data/events.yaml b/go.dev/data/events.yaml index 67ef32b3..12e0ba8b 100644 --- a/go.dev/data/events.yaml +++ b/go.dev/data/events.yaml @@ -2,79 +2,22 @@ # To update, run: # go run github.com/godevsite/go.dev/cmd/events > data/events.yaml all: -- city: São Paulo - country: Brazil - description: A WWG é uma iniciativa mundial focada em todas as minorias de gênero - que tenham interesse em conhecer ou aprimorar seus conhecimentos em Golang, a - linguagem do Google. - id: "270597346" - local_date: May 20, 2020 - local_time: "2020-05-20T19:30:00-03:00" - localizedcountry: Brazil - localizedlocation: São Paulo, Brazil - name: '[ONLINE] #003 Women Who Go Sampa - Oficina Exercism ft. WWG CWB' - state: "" - thumbnailurl: "" - url: https://www.meetup.com/Women-Who-Go-Sampa/events/270597346 -- city: Curitiba - country: Brazil - description: |- - Esse é o chapter de Curitiba do Women Who Go, um grupo que reúne mulheres e outras minorias de gênero pra estudar a linguagem de programação chamada Go.
    - Queremos construir uma comunidade de Golang mais diversa. Vem, gente!
    - tl;dr: Women Who Go - Curitiba Chapter  

    -

    - ♥ Twitter

    - ♥ Instagram

    - ♥ LinkedIn 

    - ♥ Telegram

    - ♥ hub de links
    -

    -
    - id: "270352999" - local_date: May 20, 2020 - local_time: "2020-05-20T19:30:00-03:00" - localizedcountry: Brazil - localizedlocation: Curitiba, Brazil - name: '[ONLINE] Oficina Exercism ft. WWG Sampa' - state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/c/4/6/7/thumb_484190279.jpeg - url: https://www.meetup.com/Women-Who-Go-CWB/events/270352999 -- city: Orlando - country: USA - description: Orlando's first meetup group dedicated to the Go Programming Language. - All skill levels are welcome - whether you're a beginner or a full-fledged - gopher. - id: thpvrrybchbbc - local_date: May 20, 2020 - local_time: "2020-05-20T19:00:00-04:00" - localizedcountry: USA - localizedlocation: Orlando, FL - name: Orlando Go Virtual Meetup - state: FL - thumbnailurl: https://secure.meetupstatic.com/photos/event/9/7/c/4/thumb_441638852.jpeg - url: https://www.meetup.com/OrlanGo/events/thpvrrybchbbc -- city: Minneapolis +- city: Lehi country: USA description: |- - A meetup group to discuss the Go Programming Language.

    -
    -
    -

    -
    -
    - What is Go?

    -
    -
    - (from golang.org) The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. - id: "270499581" - local_date: May 20, 2020 - local_time: "2020-05-20T18:00:00-05:00" + Join us on Slack!
    + The Utah Go User Group (#UTGO) is a community of people interested in software development and Google's Go programming language (Golang). Everyone is welcome.  We currently meet in Lehi. To discuss and vote on topic ideas, go to https://github.com/forgeutah/utah-go
    +
    + id: fnpgxrybcpbfb + local_date: Nov 3, 2020 + local_time: "2020-11-03T18:00:00-07:00" localizedcountry: USA - localizedlocation: Minneapolis, MN - name: Readability in Go - Reducing Load on the Memory Stack - state: MN - thumbnailurl: https://secure.meetupstatic.com/photos/event/8/a/0/4/thumb_380555332.jpeg - url: https://www.meetup.com/golangmn/events/270499581 + localizedlocation: Lehi, UT + name: Utah Golang User Group (Reserve Mike Campbell) + photourl: https://secure.meetupstatic.com/photos/event/c/d/0/7/600_452692487.jpeg + state: UT + thumbnailurl: https://secure.meetupstatic.com/photos/event/c/d/0/7/thumb_452692487.jpeg + url: https://www.meetup.com/utahgophers/events/fnpgxrybcpbfb - city: Eugene country: USA description: "All Gophers and curious software professionals are welcome to come @@ -88,213 +31,260 @@ all: you're building web apps, designing APIs, thrive on scalability, or you're simply curious about this fun new(ish) language, let's meetup.
    \n• More resources are available at www.euggo.org " - id: skdnrrybchbbc - local_date: May 20, 2020 - local_time: "2020-05-20T17:30:00-07:00" + id: vjdnrrybcnbkb + local_date: Oct 7, 2020 + local_time: "2020-10-07T12:00:00-07:00" localizedcountry: USA localizedlocation: Eugene, OR - name: Contribution > OpenBoard Wrap and Plan + name: Book Club > Get Programming With Go + photourl: https://secure.meetupstatic.com/photos/event/2/8/1/600_453660641.jpeg state: OR thumbnailurl: https://secure.meetupstatic.com/photos/event/2/8/1/thumb_453660641.jpeg - url: https://www.meetup.com/EUG-Go/events/skdnrrybchbbc -- city: Taipei - country: Taiwan + url: https://www.meetup.com/EUG-Go/events/vjdnrrybcnbkb +- city: Berlin + country: Germany description: |- - At Golang Taipei, we promote Golang development and sharing the latest information about Golang.  
    - Join our Facebook group to connect with other 6,138 members. 
    - Chat with us on Telegram channel with other 880 chatty members. 
    - Find all past meetup presentation files on Github
    - Follow us on Tweeeeeeter for latest Golang news. 
    - Subscribe our Youtube channel for past video records and future live streaming. 
    - Looking for new opportunities, check the latest Github job list and information 
    -
    - id: "270708366" - local_date: May 26, 2020 - local_time: "2020-05-26T19:30:00+08:00" - localizedcountry: Taiwan - localizedlocation: Taipei, Taiwan - name: 'Golang Taipei Gathering #49 Webinar' + Join us on Slack: https://wwgberlin.herokuapp.com/ 
    + Follow us on Twitter: @WWGBerlin
    + Go (also known as Golang) is a great programming language to learn and develop in. We built this meetup to offer a better entry point to women who are interested in Go. We also want to provide a space for networking, learning and finding mentors. This group shall bring us together so we can continue to grow in Go.
    + You can become a WWG mentee if:
    + 1. You identify as female, publicly or privately 
    + 2. You have some interest in Go
    + Supporters of Women Who Go are welcome to join, especially as mentors. For the Go Study Groups, the mentee/learners spots will be given to women.
    + Feel free to check out our learning resources: https://github.com/wwgberlin/GoStudyGroup 
    Feel free to contribute to our resources by adding Go Tutorials to it!
    + For companies who want to host and sponsor Women Who Go Berlin: Please send us a msg through meetup or Twitter: @WWGBerlin + id: "273575858" + local_date: Oct 7, 2020 + local_time: "2020-10-07T19:00:00+02:00" + localizedcountry: Germany + localizedlocation: Berlin, Germany + name: 'Women Who Go Book club - chapter 2.1: The Parser part 2' + photourl: https://secure.meetupstatic.com/photos/event/6/6/9/3/600_452906259.jpeg state: "" + thumbnailurl: https://secure.meetupstatic.com/photos/event/6/6/9/3/thumb_452906259.jpeg + url: https://www.meetup.com/Women-Who-Go-Berlin/events/273575858 +- city: Jacksonville + country: USA + description: GoJax represents the North Florida Go community located in Duval, Baker, + Nassau,
    Clay, and St. Johns counties. There are a number of tech Meetup groups + in
    Jacksonville, but none of them address the Go programming language. We + plan on
    filling that gap. + id: "273628929" + local_date: Oct 7, 2020 + local_time: "2020-10-07T19:00:00-04:00" + localizedcountry: USA + localizedlocation: Jacksonville, FL + name: Go and Web Assembly + photourl: "" + state: FL thumbnailurl: "" - url: https://www.meetup.com/golang-taipei-meetup/events/270708366 -- city: Zagreb - country: Croatia + url: https://www.meetup.com/meetup-group-fuSlbVYy/events/273628929 +- city: Orlando + country: USA + description: Orlando's first meetup group dedicated to the Go Programming Language. + All skill levels are welcome - whether you're a beginner or a full-fledged + gopher. + id: "273460434" + local_date: Oct 7, 2020 + local_time: "2020-10-07T19:00:00-04:00" + localizedcountry: USA + localizedlocation: Orlando, FL + name: Orlando Go Monthly Meetup (Online!) - Go & Web Assembly + photourl: https://secure.meetupstatic.com/photos/event/9/7/c/4/600_441638852.jpeg + state: FL + thumbnailurl: https://secure.meetupstatic.com/photos/event/9/7/c/4/thumb_441638852.jpeg + url: https://www.meetup.com/OrlanGo/events/273460434 +- city: Atlanta + country: USA description: |- - Ovo je grupa za sve zainteresirane za Go programski jezik.
    - Prošli talkovi se mogu naći na:
    - • github repou
    - • snimke na YouTube kanalu

    - Prati na nas twitteru i na facebooku.
    - Družimo se i na gophers.slack.com - tamo smo u kanalu #croatia. - id: "270725353" - local_date: May 26, 2020 - local_time: "2020-05-26T18:00:00+02:00" - localizedcountry: Croatia - localizedlocation: Zagreb, Croatia - name: GoTalks 26.05.2020. + Go Users Group Atlanta is a meeting place for people interested in developing and promoting the local Go development community.
    + Many of us hang out in #golang on Tech404 + id: "273303769" + local_date: Oct 8, 2020 + local_time: "2020-10-08T18:30:00-04:00" + localizedcountry: USA + localizedlocation: Atlanta, GA + name: October Go Virtual Meetup ft. Bill Kennedy on Go Generics + photourl: https://secure.meetupstatic.com/photos/event/a/6/8/8/600_355422632.jpeg + state: GA + thumbnailurl: https://secure.meetupstatic.com/photos/event/a/6/8/8/thumb_355422632.jpeg + url: https://www.meetup.com/Go-Users-Group-Atlanta/events/273303769 +- city: Berlin + country: Germany + description: |- + We are a group of Golang users. Our aim is to meet like minded people, share our experience with others and to promote the use of Go.
    + As Gophers and as Berliners, even if just visiting, we follow the Code of Conduct to make this a pleasant and inclusive environment for everyone:

    + https://golang.org/conduct
    http://berlincodeofconduct.org
    + Follow us on twitter: @GDGBerlinGolang
    + You can get our special group swag here: https://shop.spreadshirt.de/gdg-golang-berlin
    + id: "271795652" + local_date: Oct 14, 2020 + local_time: "2020-10-14T19:00:00+02:00" + localizedcountry: Germany + localizedlocation: Berlin, Germany + name: '[online] October Golang meetup' + photourl: https://secure.meetupstatic.com/photos/event/9/8/b/1/600_465459089.jpeg state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/7/2/5/2/thumb_462749266.jpeg - url: https://www.meetup.com/Golang-ZG/events/270725353 -- city: Warsaw - country: Poland + thumbnailurl: https://secure.meetupstatic.com/photos/event/9/8/b/1/thumb_465459089.jpeg + url: https://www.meetup.com/golang-users-berlin/events/271795652 +- city: Seattle + country: USA description: |- - Our goal is to share our software-development experience on any level from junior to senior. It is your stage. You can always start with 10 min talk. Let us know, whether we can support you.
    -

    - Our homepage with a list of previous talks and workshops: https://github.com/golangpoland/meetup_golang_warsaw

    + The Seattle Go User Group is a community for anyone interested in the Go programming language. 



    - You will find us also on (linked on our github):
    - ▪ Twitter: https://twitter.com/golangwaw
    - ▪ Slack: #poland-warsaw gophers.slack.com
    - ▪ FB: https://www.facebook.com/groups/1278049882223829/
    - ▪ LI: https://www.linkedin.com/company/golang-warsaw-meetup
    + We provide opportunities to:
    + • Discuss Go and related topics 
    + • Socialize with people who are interested in Go
    + • Find or fill Go-related jobs 


    - ps. The more source code the better in your talk :) It might be just few source files or --- the best --- a simple runnable project. We seek to encourage the community to go through your talk again, work with the code, and learn more on their own. We do not mind live demos :).
    -

    - pps. Share your slides and code. What is there for you? Fame, github stars, FB/LI likes, and feedback.
    -

    - [PL]
    - Naszym celem jest dzielenie się wiedzą oraz doświadczeniem w zakresie programowania na każdym poziomie, od juniora do seniora. Scena należy do Ciebie! Zawsze możesz zacząć z 10 minutowym talkiem. Daj nam znać jeśli możemy Cię w jakikolwiek sposób pomóc.
    -

    - Chcemy, aby ten meetup należał do społeczności, cenimy sobie niezależność i zależy nam na utrzymaniu społecznego charakteru naszych spotkań.
    -

    - Nasza “strona główna” z listą poprzednich prelekcji i warsztatów jest github:
    - https://github.com/golangpoland/meetup_golang_warsaw
    -

    - Znajdziesz nas także na:
    - ▪ Twitter: https://twitter.com/golangwaw
    - ▪ Slack: #poland-warsaw gophers.slack.com
    - ▪ FB: https://www.facebook.com/groups/1278049882223829/
    - ▪ LI: https://www.linkedin.com/company/golang-warsaw-meetup
    + If you want to chat all things Go, feel free to join us on the Gopher slack. 
    + Invites can be found at https://invite.slack.golangbridge.org
    + There is a #seattle channel which can be joined by anyone, so come say hi!


    - ps. Im więcej kodu tym lepiej :) Może to być kilka plików źródłowych albo prosty projekt. Chcemy zachęcić społeczność do ponownego przejrzenia prelekcji oraz pracy z twoim kodem. Live Dema są mile widziane :)
    -

    - pps. Nie zapomnij podzielić się z nami swoją prezentacją i kodem źródłowym. Zyskasz na tym sławę, gwiazdki na githubie, lajki na FB/LI oraz feedback.
    + Our aim is to be a welcoming environment. As such all attendees, organizers and sponsors are required to follow the code of conduct. + id: rksdvrybcnbsb + local_date: Oct 14, 2020 + local_time: "2020-10-14T13:00:00-07:00" + localizedcountry: USA + localizedlocation: Seattle, WA + name: Eastside Go Coffee + photourl: https://secure.meetupstatic.com/photos/event/a/4/b/e/600_450342174.jpeg + state: WA + thumbnailurl: https://secure.meetupstatic.com/photos/event/a/4/b/e/thumb_450342174.jpeg + url: https://www.meetup.com/golang/events/rksdvrybcnbsb +- city: Belfast + country: United Kingdom + description: |- + Belfast Gophers, aka The Go Belfast User Group (GBUG), are a Belfast-based community for anyone interested in the Go programming language. Belfast Gophers held their first Meet-up 2016, and since then the group has grown to over 300 gophers.

    + Membership of Belfast Gophers is managed via our Meetup page; everyone is welcome! We also have an active Twitter feed and we've recently set-up the #belfast channel on Gophers Slack (sign-up here).



    - ➡️CONTACT
    - ▪  Slack (primary): gophers.slack.com #poland-warsaw: @Kamil Pyrkosz , @Arek Noster , or @Wojciech
    - * Email: Wojciech Barczyński - wb@hypatos.ai - id: "270319842" - local_date: May 26, 2020 - local_time: "2020-05-26T18:05:00+02:00" - localizedcountry: Poland - localizedlocation: Warsaw, Poland - name: 'Golang Warsaw #36 - Golang Poland - Online' + Contact
    + Twitter: @belfast_gopher
    + Email: info@belfastgophers.com
    +

    + Code of Conduct
    + Belfast Gophers operate under the Go Community Code of Conduct.
    +

    + Swag
    We have swag on Redbubble for anyone wanting a Belfast Gopher's t-shirt or other swag, you only pay Redbubble we don't take any fee for these. 
    +

    +

    +

    +
    + id: "273346208" + local_date: Oct 15, 2020 + local_time: "2020-10-15T18:00:00+01:00" + localizedcountry: United Kingdom + localizedlocation: Belfast, United Kingdom + name: 'Oto: Pace’s lightweight JSON/HTTP RPC thing' + photourl: "" state: "" thumbnailurl: "" - url: https://www.meetup.com/Golang-Warsaw/events/270319842 -- city: Newcastle Upon Tyne - country: United Kingdom - description: This is a group for anyone in the North East of England who's interested - in the Go programming language. We usually meet up in Newcastle on the fourth - Tuesday of every month at Campus North, Carliol Square. - id: qtpnmqybchbjc - local_date: May 26, 2020 - local_time: "2020-05-26T18:30:00+01:00" - localizedcountry: United Kingdom - localizedlocation: Newcastle Upon Tyne, United Kingdom - name: Go meetup + url: https://www.meetup.com/Belfast-Gophers/events/273346208 +- city: Guadalajara + country: Mexico + description: Comunidad enfocada en dar a conocer el lenguaje Golang y generar un + espacio donde se pueda compartir conocimientos, proyectos y experiencias entorno + a este gran lenguaje. En las reuniones se presentan un par de pláticas o talleres + relacionados con Golang. Networking al finalizar.

    Síguenos en:

    Facebook
    +
    YouTube
    + id: "273759040" + local_date: Oct 15, 2020 + local_time: "2020-10-15T18:30:00-05:00" + localizedcountry: Mexico + localizedlocation: Guadalajara, Mexico + name: Golang Guadalajara Meetup - Octubre 2020 + photourl: "" state: "" thumbnailurl: "" - url: https://www.meetup.com/Golang-North-East/events/qtpnmqybchbjc -- city: Boston - country: USA + url: https://www.meetup.com/Golang-Guadalajara/events/273759040 +- city: Leipzig + country: Germany description: |- - A forum for people working with Go to discuss ideas, issues and share solutions. We will start to put together meetings as the group grows and topics are suggested.
    - Submit a talk proposal, or come join us in #boston on Slack at https://invite.slack.golangbridge.org
    - Boston Golang officially adopts the Go Code of Conduct. Harassment, bullying, and discrimination are unacceptable here and if you witness or experience those or other harmful behaviors, please let the organizers know or email us at bostongolang@gmail.com
    - id: "270529854" - local_date: May 26, 2020 - local_time: "2020-05-26T18:30:00-04:00" - localizedcountry: USA - localizedlocation: Boston, MA - name: Virtual May meetup - state: MA + We enjoy using Go and we are curious about the language, its features and applications, especially in the context of cloud computing and infrastructure.
    + Our goal is to establish a place, where people from all backgrounds interested in the Go programming language and various cloud technologies can meet, learn, share experiences, present, discuss and network.
    + We aim to be a welcoming community, respecting Gopher values, as outlined here: https://golang.org/conduct.
    +

    + Find out more on: https://golangleipzig.space/ and https://github.com/golang-leipzig

    + Since March 2019, we are part of the Go Developer Network:
    + https://blog.golang.org/go-developer-network
    +
    + id: "268785569" + local_date: Oct 16, 2020 + local_time: "2020-10-16T19:00:00+02:00" + localizedcountry: Germany + localizedlocation: Leipzig, Germany + name: 'Leipzig Golang Meetup #13' + photourl: "" + state: "" thumbnailurl: "" - url: https://www.meetup.com/bostongo/events/270529854 -- city: Tel Aviv-Yafo - country: Israel + url: https://www.meetup.com/Leipzig-Golang/events/268785569 +- city: Gurgaon + country: India description: |- - This is the group for programmers who are interested in the High Performance, Scalable, lightweight, cross platform development tool that also promises ease of programming, agility and the fun you don't usually get using a low-level language. Welcome to the Israeli Go language Group.
    - If you'd like to give a talk, please add yourself to the trello board - id: kjvczlybckbcb - local_date: May 27, 2020 - local_time: "2020-05-27T18:30:00+03:00" - localizedcountry: Israel - localizedlocation: Tel Aviv-Yafo, Israel - name: May Meetup - Online + This group is for people interested in learning both the programming language Go(lang), and how to build interesting things with it. We will aim the first few sessions at beginner-intermediate levels and maybe later introduce some high-level talks.
    + WE ARE ACTIVELY LOOKING FOR MEETUP VENUES.
    + Want to help organise/volunteer? - Come say hi and meet fellow gophers on Slack. + id: szcfmrybcnbwb + local_date: Oct 17, 2020 + local_time: "2020-10-17T11:00:00+05:30" + localizedcountry: India + localizedlocation: Gurgaon, India + name: Golang Gurgaon Meetup + photourl: https://secure.meetupstatic.com/photos/event/c/e/4/5/600_473932805.jpeg state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/a/9/6/9/thumb_477523369.jpeg - url: https://www.meetup.com/Go-Israel/events/kjvczlybckbcb -- city: Raleigh - country: USA - description: |- - You do not need to know Go, be a professional developer or enjoy talking to strangers in order to come hang out with us!
    - This group is for you if you are interested in Go, and are looking for a safe space to learn. Membership is restricted to women and gender minorities.
    - We would love for you to speak at Women Who Go! Contact raleigh@womenwhogo.org about a short talk, demo, or whatever you have in mind! - id: "270413433" - local_date: May 27, 2020 - local_time: "2020-05-27T12:00:00-04:00" - localizedcountry: USA - localizedlocation: Raleigh, NC - name: 'Women Who Go Lightning Talks: Go Developers Share Their Lessons Learned' - state: NC - thumbnailurl: "" - url: https://www.meetup.com/Women-Who-Go-Raleigh/events/270413433 -- city: Florianópolis - country: Brazil + thumbnailurl: https://secure.meetupstatic.com/photos/event/c/e/4/5/thumb_473932805.jpeg + url: https://www.meetup.com/Gurgaon-Go-Meetup/events/szcfmrybcnbwb +- city: Graz + country: Austria description: |- - Telegram oficial da comunidade Go de SC: https://t.me/joinchat/Mz2OaFghHkcTl6u9s1JQ8Q
    Slack oficial (canal #floripa): https://invite.slack.golangbridge.org/
    -
    - id: "268323326" - local_date: May 27, 2020 - local_time: "2020-05-27T19:00:00-03:00" - localizedcountry: Brazil - localizedlocation: Florianópolis, Brazil - name: 2º encontro de 2020 + Die Programmiersprache Go hat einen Grazer "Stammtisch". 
    + Wir treffen uns jeden 2. Montag im Monat bei TAO Digital am Lendplatz.
    + Schau einfach vorbei oder besuche uns online unter GoGraz!
    + id: fxlkwrybcnbzb + local_date: Oct 19, 2020 + local_time: "2020-10-19T19:00:00+02:00" + localizedcountry: Austria + localizedlocation: Graz, Austria + name: Go Language Usergroup Graz + photourl: https://secure.meetupstatic.com/photos/event/3/3/e/0/600_459373280.jpeg state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/7/2/1/f/thumb_447209215.jpeg - url: https://www.meetup.com/Floripa-Gophers/events/268323326 -- city: Saint Louis - country: USA + thumbnailurl: https://secure.meetupstatic.com/photos/event/3/3/e/0/thumb_459373280.jpeg + url: https://www.meetup.com/Graz-Open-Source-Meetup/events/fxlkwrybcnbzb +- city: Bournemouth + country: United Kingdom description: |- - We meet the fourth Wednesday of the month for development-oriented presentations and discussion centered on the Go Programming Language.
    - The basic agenda is:
    - 6:00 - 6:20 Food and networking (Go excels at networking).
    - 6:20 - 6:30 Announcements, intros, and so forth.
    - 6:30 - 6:45 Short presentation of the month
    - 6:45 - 8:00 Main presentation of the month.
    - Join us for the fun of sharing and learning about this programming language which is powering Cloud Native revolution.  All are welcome!  Any skill level!  We are here to help each other grow.
    - We also invite you to follow us on Twitter as @StLGoMeetup . - id: "270424382" - local_date: May 27, 2020 - local_time: "2020-05-27T18:05:00-05:00" - localizedcountry: USA - localizedlocation: Saint Louis, MO - name: '[GMT/-5] Writing General Purpose Kubernetes Controllers in Go' - state: MO + Golang Dorset
    + is a user group for people interested in the
    + Go programming language and assorted related technologies and methodologies (kubernetes / docker / DevOps etc)

    + We aim to meet every month in central Bournemouth.
    ---

    + We want to give everyone a chance to learn, or improve their skills with Go by practicing it, organizing workshops and talks, and mingling along like-minded individuals.
    + Any level of proficiency (or none at all) is welcome. 
    + All code and slides from examples are available in the github repo github.com/golangdorset 

    + Join us on Slack!
    + id: qfdjvrybcnbzb + local_date: Oct 19, 2020 + local_time: "2020-10-19T19:00:00+01:00" + localizedcountry: United Kingdom + localizedlocation: Bournemouth, United Kingdom + name: Golang Dorset Monthly Meetup + photourl: "" + state: "" thumbnailurl: "" - url: https://www.meetup.com/StL-Go/events/270424382 -- city: Chicago + url: https://www.meetup.com/Golang-Dorset/events/qfdjvrybcnbzb +- city: Reston country: USA description: |- - Welcome Gophers! Go Remote Meetup is a remote-first group for Go developers worldwide. We're part of the Go Developer Network, and we're excited to connect with you all, no matter where you're located.
    -

    - About Go:
    - Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
    - https://golang.org/
    -

    - About Go Developer Network:
    - GDN is a collection of Go user groups working together with a shared mission to empower developer communities with the knowledge, experience, and wisdom to build the next generation of software in Go.
    - https://github.com/gobridge/about-us/blob/master/gdn.md 
    -

    - JetBrains User Group Support Program
    - JetBrains allows us to raffle a free 1-year license to attendees. This is an especially great opportunity for new developers to boost their learning and productivity with excellent tooling -- so join up and attend!
    - id: "270632499" - local_date: May 28, 2020 - local_time: "2020-05-28T09:00:00-05:00" + (from golang.org)

    +
    + The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. + id: cmkwtrybcnbcc + local_date: Oct 21, 2020 + local_time: "2020-10-21T19:00:00-04:00" localizedcountry: USA - localizedlocation: Chicago, IL - name: 'GMT/-5: Integrating the Envoy gRPC API into a Dynamic Service Discovery Platform' - state: IL - thumbnailurl: https://secure.meetupstatic.com/photos/event/8/8/7/f/thumb_490354943.jpeg - url: https://www.meetup.com/Go-Remote-Meetup/events/270632499 + localizedlocation: Reston, VA + name: Golang Reston Monthly Meetup + photourl: https://secure.meetupstatic.com/photos/event/7/f/7/600_433982039.jpeg + state: VA + thumbnailurl: https://secure.meetupstatic.com/photos/event/7/f/7/thumb_433982039.jpeg + url: https://www.meetup.com/Golang-Reston/events/cmkwtrybcnbcc diff --git a/go.dev/data/learn/books.yaml b/go.dev/data/learn/books.yaml index 1b276121..33c18391 100644 --- a/go.dev/data/learn/books.yaml +++ b/go.dev/data/learn/books.yaml @@ -1,16 +1,26 @@ links: - title: The Go Programming Language + description: Alan A. A. Donovan, Brian W. Kernighan + cta: View url: https://www.gopl.io/ thumbnail: /images/learn/go-programming-language-book.png - title: Get Programming with Go + description: Nathan Youngman, Roger Peppé + cta: Manning.com url: https://www.manning.com/books/get-programming-with-go thumbnail: /images/learn/get-programming-with-go.jpeg - title: Go Programming Blueprints + description: This is the official source code repository for the book. + cta: View on Github url: https://github.com/matryer/goblueprints thumbnail: /images/learn/go-programming-blueprints.png - title: Introducing Go + description: Caleb Doxsey + cta: View on O’Reilly.com url: http://shop.oreilly.com/product/0636920046516.do thumbnail: /images/learn/introducing-go-book.png - title: Concurrency in Go + description: Katherine Cox-Buday + cta: View on O’Reilly.com url: https://www.oreilly.com/library/view/concurrency-in-go/9781491941294/ - thumbnail: /images/learn/concurrency-in-go.jpeg + thumbnail: /images/learn/concurrency-in-go.png diff --git a/go.dev/data/learn/cloud.yaml b/go.dev/data/learn/cloud.yaml index 8fe9db25..c242cd74 100644 --- a/go.dev/data/learn/cloud.yaml +++ b/go.dev/data/learn/cloud.yaml @@ -2,12 +2,24 @@ links: - title: Deploy Go Apps on Google Cloud Serverless Platforms url: https://google.qwiklabs.com/focuses/10532?parent=catalog thumbnail: /images/learn/qwiklabs.png + length: 1h 10m + credits: 5 + rating: 4.25 - title: Use Go Code to Work with Google Cloud Data Sources url: https://google.qwiklabs.com/focuses/10531?parent=catalog thumbnail: /images/learn/qwiklabs.png + length: 1h 10m + credits: 5 + rating: 4.25 - title: Getting Started with Go on App Engine url: https://google.qwiklabs.com/focuses/2754?catalog_rank=%7B%22rank%22%3A1%2C%22num_filters%22%3A0%2C%22has_search%22%3Atrue%7D&parent=catalog&search_id=5407947 thumbnail: /images/learn/qwiklabs.png + length: 20m + credits: 1 + rating: 4.15 - title: HTTP Google Cloud Functions in Go url: https://google.qwiklabs.com/focuses/5171?catalog_rank=%7B%22rank%22%3A1%2C%22num_filters%22%3A0%2C%22has_search%22%3Atrue%7D&parent=catalog&search_id=5407953 thumbnail: /images/learn/qwiklabs.png + length: 40m + credits: 5 + rating: 4.5 diff --git a/go.dev/data/learn/courses.yaml b/go.dev/data/learn/courses.yaml index 698987b3..d69c1b23 100644 --- a/go.dev/data/learn/courses.yaml +++ b/go.dev/data/learn/courses.yaml @@ -1,13 +1,25 @@ links: - title: Codecademy + content: This course covers setting up a Go environment, the fundamentals of + Go, and will walk you through building a few sample projects. url: https://www.codecademy.com/learn/learn-go?utm_source=customer_io&utm_campaign=oct_21_golaunch&utm_medium=email&utm_content=header_img thumbnail: /images/learn/codecademy.png + cta: Learn more - title: Exercism.io + content: Tackle community-sourced Go challenges in this interactive course, + working with other participants and mentors along the way. url: https://exercism.io/tracks/go thumbnail: /images/learn/exercism.png + cta: Learn more - title: Google Developers Codelabs + content: Get started with a free codelab that walks you through using Go to + build and publish a Google Cloud Function. url: https://codelabs.developers.google.com/codelabs/cloud-functions-go-http/#0 - thumbnail: /images/learn/codelabs_2.png + thumbnail: /images/learn/codelabs.png + cta: Learn more - title: Gophercises + content: Build your confidence in using Go with this course, where you’ll + build roughly twenty different Go applications. url: https://gophercises.com/ - thumbnail: /images/learn/gophercises_1.png + thumbnail: /images/learn/gophercises.png + cta: Learn more diff --git a/go.dev/data/learn/guidedLearning.yaml b/go.dev/data/learn/guidedLearning.yaml index 35c66391..86b64497 100644 --- a/go.dev/data/learn/guidedLearning.yaml +++ b/go.dev/data/learn/guidedLearning.yaml @@ -1,17 +1,26 @@ links: - title: Web Dev - description: Hello World tutorial for building web applications in Go. + content: Go Web Examples provides easy to understand code snippets on + how to use Go for web development. url: https://gowebexamples.com - thumbnail: /images/learn/helloworld.png + thumbnail: /images/learn/web-dev.png + cta: Learn more - title: CLIs - description: A guided workshop on building command-line interfaces with Go. + content: This workshop will walk you through building a CLI app with Go, + introducing you to basic Go principles and CLI frameworks along the way. url: https://spf13.com/presentation/building-an-awesome-cli-app-in-go-oscon/ - thumbnail: /images/learn/commandline.svg - - title: New to Coding - description: A video tutorial that aims to cover the various fundamentals of Go. + thumbnail: /images/learn/clis.png + cta: Learn more + - title: New to coding? + content: Get started with this introductory course covering basic + programming principles and Go fundamentals. url: https://www.youtube.com/watch?v=Q0sKAMal4WQ thumbnail: /images/learn/edureka.png - - title: Go by Example - description: Go by Example is a hands-on introduction to Go using annotated example programs. + cta: Learn more + - title: Go by example + content: Go by Example is a hands-on introduction to Go using annotated + example programs. It’s a great starting point to use when tackling any Go + project. url: https://gobyexample.com/ thumbnail: /images/learn/gobyexample.png + cta: Learn more diff --git a/go.dev/data/learn/quickstart.yaml b/go.dev/data/learn/quickstart.yaml index 09b29596..0578bb7b 100644 --- a/go.dev/data/learn/quickstart.yaml +++ b/go.dev/data/learn/quickstart.yaml @@ -1,10 +1,16 @@ links: - - title: Installing Go + - title: Documentation + content: Everything there is to know about Go. Get started on a new project + or brush up for your existing Go code. + cta: View documentation url: https://golang.org/doc/install - thumbnail: /images/learn/install.png - - title: Hello World - url: https://play.golang.org - thumbnail: /images/learn/gohelloworld.png - title: Tour of Go + content: An interactive introduction to Go in three sections. Each section + concludes with a few exercises so you can practice what you've learned. + cta: Take a tour url: https://tour.golang.org - thumbnail: /images/learn/tour.png + - title: Playground + content: The Playground allows anyone with a web browser to write Go code + that we immediately compile, link, and run on our servers. + cta: Go to playground + url: https://play.golang.org diff --git a/go.dev/layouts/learn/section.html b/go.dev/layouts/learn/section.html index 536988f0..aaad0c6c 100644 --- a/go.dev/layouts/learn/section.html +++ b/go.dev/layouts/learn/section.html @@ -1,151 +1,150 @@ {{define "main"}} -
    +
    -

    Getting Started

    -
    -
    -
    - +

    + Download packages for + Windows 64-bit, + macOS, + Linux, and + more. +

    + +
    + Go Gopher riding a motorcycle +
    + +
    +
      + {{ range first 3 $.Site.Data.learn.quickstart.links }} +
    • + {{ partial "learn/card.html" . }} +
    • + {{end}} +
    +
    + +
    +

    Learning Resources

    +
    +
    -
    -

    Guided learning journeys

    -

    -

    +
    +

    Guided learning journeys

    +
    +
    +
      + {{ range first 4 $.Site.Data.learn.guidedLearning.links }} +
    • + {{ partial "learn/card.html" . }} +
    • + {{ end }} +
    -
    +
    -
    -

    Online learning

    +
    +

    Online learning

    +
    +
    +
      + {{ range first 4 $.Site.Data.learn.courses.links }} +
    • + {{ partial "learn/card.html" . }} +
    • + {{ end }} +
    -
    -
    + +
    -
    -

    Google Cloud Self-Paced Labs

    +
    +

    Google Cloud Self-Paced Labs

    +
    +
    +
      + {{ range first 4 $.Site.Data.learn.cloud.links }} +
    • + {{ partial "learn/selfPacedCard.html" . }} +
    • + + {{ end }} +
    -
    + +
    -
    -

    In-person training

    -

    -

    +
    +

    In-person training

    +
    +
    +
      + {{range first 4 $.Site.Data.learn.inPerson.links}} +
    • +

      + {{.title}} +

      +

      {{.blurb}}

      +
    • + {{end}} +
    -
      - {{range first 4 $.Site.Data.learn.inPerson.links}} -
    • -

      - - {{.title}} - -

      -

      - {{.blurb}} -

      -
    • - {{end}} -
    +
    @@ -157,27 +156,34 @@
      {{range first 3 $.Site.Data.events.all}}
    • -
      - {{if .thumbnailurl}} - {{.name}} group photo +
      + {{if .photourl}} + {{.name}} group photo {{else}} - meetup logo + meetup logo {{end}}
      -

      {{.local_date}}

      -

      {{.city}}, {{.state}} {{.country}}

      +

      {{.local_date}} · {{.city}}, {{.state}} {{.country}}

      {{.name}}

      -

      - {{.description | safeHTML}} -

      +

      {{.description | safeHTML}}

      +
      +
      + {{ with .attendees }} + {{range first 5 .}} +
      + {{.name}} +
      + {{end}} + {{end}}
      -

      Learn more >

    • {{end}} diff --git a/go.dev/layouts/partials/learn/book.html b/go.dev/layouts/partials/learn/book.html new file mode 100644 index 00000000..d1ccd787 --- /dev/null +++ b/go.dev/layouts/partials/learn/book.html @@ -0,0 +1,32 @@ + diff --git a/go.dev/layouts/partials/learn/card.html b/go.dev/layouts/partials/learn/card.html new file mode 100644 index 00000000..f1545aa0 --- /dev/null +++ b/go.dev/layouts/partials/learn/card.html @@ -0,0 +1,33 @@ + diff --git a/go.dev/layouts/partials/learn/selfPacedCard.html b/go.dev/layouts/partials/learn/selfPacedCard.html new file mode 100644 index 00000000..ea6769f6 --- /dev/null +++ b/go.dev/layouts/partials/learn/selfPacedCard.html @@ -0,0 +1,24 @@ + diff --git a/go.dev/static/images/gophers/motorcycle.svg b/go.dev/static/images/gophers/motorcycle.svg new file mode 100644 index 00000000..e05346e4 --- /dev/null +++ b/go.dev/static/images/gophers/motorcycle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/static/images/learn/clis.png b/go.dev/static/images/learn/clis.png new file mode 100644 index 00000000..267ff73f Binary files /dev/null and b/go.dev/static/images/learn/clis.png differ diff --git a/go.dev/static/images/learn/codecademy.png b/go.dev/static/images/learn/codecademy.png index 89699716..8de4dbfd 100644 Binary files a/go.dev/static/images/learn/codecademy.png and b/go.dev/static/images/learn/codecademy.png differ diff --git a/go.dev/static/images/learn/codelabs.png b/go.dev/static/images/learn/codelabs.png index 7fa097cd..c8dabae2 100644 Binary files a/go.dev/static/images/learn/codelabs.png and b/go.dev/static/images/learn/codelabs.png differ diff --git a/go.dev/static/images/learn/concurrency-in-go.jpeg b/go.dev/static/images/learn/concurrency-in-go.jpeg deleted file mode 100644 index d2c140c6..00000000 Binary files a/go.dev/static/images/learn/concurrency-in-go.jpeg and /dev/null differ diff --git a/go.dev/static/images/learn/concurrency-in-go.png b/go.dev/static/images/learn/concurrency-in-go.png new file mode 100644 index 00000000..d2c140c6 Binary files /dev/null and b/go.dev/static/images/learn/concurrency-in-go.png differ diff --git a/go.dev/static/images/learn/coursera.png b/go.dev/static/images/learn/coursera.png index 42e094be..c22729d6 100644 Binary files a/go.dev/static/images/learn/coursera.png and b/go.dev/static/images/learn/coursera.png differ diff --git a/go.dev/static/images/learn/earth.png b/go.dev/static/images/learn/earth.png index cfcdfc3b..c39758e8 100644 Binary files a/go.dev/static/images/learn/earth.png and b/go.dev/static/images/learn/earth.png differ diff --git a/go.dev/static/images/learn/edureka.png b/go.dev/static/images/learn/edureka.png index 4800460d..a047f5ed 100644 Binary files a/go.dev/static/images/learn/edureka.png and b/go.dev/static/images/learn/edureka.png differ diff --git a/go.dev/static/images/learn/exercism.png b/go.dev/static/images/learn/exercism.png index e299e83e..a2fd1c33 100644 Binary files a/go.dev/static/images/learn/exercism.png and b/go.dev/static/images/learn/exercism.png differ diff --git a/go.dev/static/images/learn/get-programming-with-go.jpeg b/go.dev/static/images/learn/get-programming-with-go.jpeg index 605e4dba..c73d3e2e 100644 Binary files a/go.dev/static/images/learn/get-programming-with-go.jpeg and b/go.dev/static/images/learn/get-programming-with-go.jpeg differ diff --git a/go.dev/static/images/learn/go-programming-blueprints.png b/go.dev/static/images/learn/go-programming-blueprints.png index e46dbb38..7ad68383 100644 Binary files a/go.dev/static/images/learn/go-programming-blueprints.png and b/go.dev/static/images/learn/go-programming-blueprints.png differ diff --git a/go.dev/static/images/learn/go-programming-language-book.png b/go.dev/static/images/learn/go-programming-language-book.png index 0c69a0cf..1f5bd3a5 100644 Binary files a/go.dev/static/images/learn/go-programming-language-book.png and b/go.dev/static/images/learn/go-programming-language-book.png differ diff --git a/go.dev/static/images/learn/go_cdk_logo.png b/go.dev/static/images/learn/go_cdk_logo.png index 25380f71..96155ec7 100644 Binary files a/go.dev/static/images/learn/go_cdk_logo.png and b/go.dev/static/images/learn/go_cdk_logo.png differ diff --git a/go.dev/static/images/learn/gobyexample.png b/go.dev/static/images/learn/gobyexample.png index 9256899c..d4f2538f 100644 Binary files a/go.dev/static/images/learn/gobyexample.png and b/go.dev/static/images/learn/gobyexample.png differ diff --git a/go.dev/static/images/learn/gohelloworld.png b/go.dev/static/images/learn/gohelloworld.png index 108806e6..df131fef 100644 Binary files a/go.dev/static/images/learn/gohelloworld.png and b/go.dev/static/images/learn/gohelloworld.png differ diff --git a/go.dev/static/images/learn/gophercises.png b/go.dev/static/images/learn/gophercises.png new file mode 100644 index 00000000..5adb4760 Binary files /dev/null and b/go.dev/static/images/learn/gophercises.png differ diff --git a/go.dev/static/images/learn/gophercises_1.png b/go.dev/static/images/learn/gophercises_1.png deleted file mode 100644 index e2732eca..00000000 Binary files a/go.dev/static/images/learn/gophercises_1.png and /dev/null differ diff --git a/go.dev/static/images/learn/helloworld.png b/go.dev/static/images/learn/helloworld.png index 4f36e920..05fd362d 100644 Binary files a/go.dev/static/images/learn/helloworld.png and b/go.dev/static/images/learn/helloworld.png differ diff --git a/go.dev/static/images/learn/introducing-go-book.png b/go.dev/static/images/learn/introducing-go-book.png index 4eb3d3d2..a24626db 100644 Binary files a/go.dev/static/images/learn/introducing-go-book.png and b/go.dev/static/images/learn/introducing-go-book.png differ diff --git a/go.dev/static/images/learn/qwiklabs.png b/go.dev/static/images/learn/qwiklabs.png index 65acd019..dce02305 100644 Binary files a/go.dev/static/images/learn/qwiklabs.png and b/go.dev/static/images/learn/qwiklabs.png differ diff --git a/go.dev/static/images/learn/star-rating.png b/go.dev/static/images/learn/star-rating.png new file mode 100644 index 00000000..4cd252b6 Binary files /dev/null and b/go.dev/static/images/learn/star-rating.png differ diff --git a/go.dev/static/images/learn/web-dev.png b/go.dev/static/images/learn/web-dev.png new file mode 100644 index 00000000..989357aa Binary files /dev/null and b/go.dev/static/images/learn/web-dev.png differ -- cgit v1.3 From 70c6f846c3f0e31e0250610b89cb3762570785cb Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Fri, 23 Oct 2020 20:09:31 -0400 Subject: [x/go.dev] WIP Security Page Change-Id: Iea07bf9a3cc95794c928ae8c3024c97db666ad82 X-GoDev-Commit: 88f9adafe9f775220dce06e7ef5e4111937026ff --- go.dev/assets/css/styles.css | 109 ++++++---- go.dev/content/security/_index.md | 3 + go.dev/data/security/foundations.yaml | 39 ++++ go.dev/data/security/getstarted.yaml | 21 ++ go.dev/data/security/recentUpdates.yaml | 43 ++++ go.dev/layouts/partials/security/card.html | 36 ++++ go.dev/layouts/security/section.html | 223 +++++++++++++++++++++ go.dev/static/images/icons/bug.svg | 4 + go.dev/static/images/icons/crypto.svg | 4 + go.dev/static/images/icons/discover.svg | 8 + go.dev/static/images/icons/module.svg | 3 + go.dev/static/images/icons/secure.svg | 7 + go.dev/static/images/icons/slack.svg | 10 + .../static/images/icons/supply_chain_security.svg | 8 + go.dev/static/images/icons/swift_issues.svg | 16 ++ go.dev/static/images/icons/talk.svg | 3 + 16 files changed, 501 insertions(+), 36 deletions(-) create mode 100644 go.dev/content/security/_index.md create mode 100644 go.dev/data/security/foundations.yaml create mode 100644 go.dev/data/security/getstarted.yaml create mode 100644 go.dev/data/security/recentUpdates.yaml create mode 100644 go.dev/layouts/partials/security/card.html create mode 100644 go.dev/layouts/security/section.html create mode 100644 go.dev/static/images/icons/bug.svg create mode 100644 go.dev/static/images/icons/crypto.svg create mode 100644 go.dev/static/images/icons/discover.svg create mode 100644 go.dev/static/images/icons/module.svg create mode 100644 go.dev/static/images/icons/secure.svg create mode 100644 go.dev/static/images/icons/slack.svg create mode 100644 go.dev/static/images/icons/supply_chain_security.svg create mode 100644 go.dev/static/images/icons/swift_issues.svg create mode 100644 go.dev/static/images/icons/talk.svg diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index b71e359f..c87012df 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -547,7 +547,8 @@ a.BreadcrumbNav-link { .WhoUsesCaseStudyList-gridContainer, .WhyGo-gridContainer, .UseCases-gridContainer, -.LearnGo-gridContainer { +.LearnGo-gridContainer, +.Security-gridContainer { display: flex; flex-direction: column; flex-wrap: wrap; @@ -559,7 +560,8 @@ a.BreadcrumbNav-link { .WhoUsesHero-gridContainer, .WhyGo-gridContainer, .UseCases-gridContainer, -.LearnGo-gridContainer { +.LearnGo-gridContainer, +.Security-gridContainer { padding: 3rem 1.5rem 1rem; } .WhoUsesHero-gridContainer { @@ -571,7 +573,8 @@ a.BreadcrumbNav-link { .WhoUsesCaseStudyList-gridContainer, .WhyGo-gridContainer, .UseCases-gridContainer, - .LearnGo-gridContainer { + .LearnGo-gridContainer, + .Security-gridContainer { flex-direction: row; justify-content: space-between; } @@ -1750,7 +1753,8 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } } -.Learn-hero { +.Learn-hero, +.Security-hero { background-color: #f6f8f8; background-image: radial-gradient( 60.0625rem 60.0625rem, @@ -1763,29 +1767,34 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { padding: 0 2.25rem 0; } -.Learn-hero .Container { +.Learn-hero .Container, +.Security-hero .Container { z-index: 1; position: relative; max-width: 68.125rem; } -.Learn-heroInner { +.Learn-heroInner, +.Security-heroInner { display: flex; flex-direction: column-reverse; } -.Learn-heroGopher { +.Learn-heroGopher, +.Security-heroGopher { display: flex; justify-content: flex-end; padding-top: 1.25rem; } -.Learn-heroGopher img { +.Learn-heroGopher img, +.Security-heroGopher img { height: 13.5625rem; width: auto; } -.Learn-heroContent { +.Learn-heroContent, +.Security-heroContent { padding-top: 1.125rem; } @@ -1793,7 +1802,8 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { text-decoration: underline; } -.Learn-heroContent h1 { +.Learn-heroContent h1, +.Security-heroContent h1 { font-family: Work Sans; font-style: normal; font-weight: normal; @@ -1801,14 +1811,16 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { line-height: 2rem; } -.Learn-heroContent p { +.Learn-heroContent p, +.Security-heroContent p { color: #5f5f5f; font-size: 0.875rem; line-height: 1.5rem; max-width: 27.1875rem; } -.Learn-heroAction { +.Learn-heroAction, +.Security-heroAction { align-items: center; background-color: #007d9c; border-radius: 0.25rem; @@ -1820,7 +1832,10 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .Learn-heroAction a, .Learn-heroAction a:hover, -.Learn-heroAction a:visited { +.Learn-heroAction a:visited, +.Security-heroAction a, +.Security-heroAction a:hover, +.Security-heroAction a:visited { color: #ffffff; font-size: 0.875rem; font-weight: 500; @@ -1828,19 +1843,22 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { text-decoration: none; } -.Learn-heroAction span { +.Learn-heroAction span, +.Security-heroAction span { font-weight: normal; } -/* Learn page grid rules */ +/* Learn/Security page grid rules */ -.LearnGo-gridContainer { +.LearnGo-gridContainer, +.Security-gridContainer { display: flex; justify-content: center; padding: 0rem 0rem 1rem; } -.Learn-cardList { +.Learn-cardList, +.Security-cardList { column-gap: 3.313rem; display: grid; grid-template-columns: repeat(1, 1fr); @@ -1850,23 +1868,26 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { row-gap: 2rem; } -.Learn-card { +.Learn-card, +.Security-card { height: 23.375rem; max-width: 40rem; } @media only screen and (min-width: 48rem) { - .Learn-cardList { + .Learn-cardList, + .Security-cardList { grid-template-columns: repeat(2, 1fr); } } @media only screen and (min-width: 72.75rem) { - .Learn-cardList { + .Learn-cardList, + .Security-cardList { grid-template-columns: repeat(4, 1fr); } } -/* End Learn page grid rules */ +/* End Learn/Security page grid rules */ /* Learn quickstart grid */ @@ -1903,48 +1924,59 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { /* Learn hero section */ @media only screen and (min-width: 57.7rem) { - .Learn-hero { + .Learn-hero, + .Security-hero { background-position: top -35rem left 30rem; } - .Learn-heroInner { + .Learn-heroInner, + .Security-heroInner { flex-direction: row; justify-content: space-between; } - .Learn-heroContent { + .Learn-heroContent, + .Security-heroContent { padding-top: 3.75rem; } - .Learn-heroGopher { + .Learn-heroGopher, + .Security-heroGopher { flex: 1; justify-content: center; padding-top: 2.625rem; } - .Learn-heroGopher img { + .Learn-heroGopher img, + .Security-heroGopher img { height: 21.0625rem; } - .Learn-heroAction { + .Learn-heroAction, + .Security-heroAction { height: 4rem; width: 16.5625rem; } .Learn-heroAction a, .Learn-heroAction a:hover, - .Learn-heroAction a:visited { + .Learn-heroAction a:visited, + .Security-heroAction a, + .Security-heroAction a:hover, + .Security-heroAction a:visited { font-size: 1.5rem; line-height: 1.75rem; } - .Learn-heroAction span { + .Learn-heroAction span, + .Security-heroAction span { font-size: 1rem; } } @media only screen and (min-width: 91rem) { - .Learn-hero { + .Learn-hero, + .Security-hero { background-position: top -35rem left 50rem; } } @@ -1967,7 +1999,8 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Learn-learningResources h2, -.Learn-learningResourcesHeader h3 { +.Learn-learningResourcesHeader h3, +.Security-sectionHeader h3 { margin: 0; } @@ -1978,12 +2011,14 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { line-height: 2.3125rem; } -.Learn-learningResourcesHeader { +.Learn-learningResourcesHeader, +.Security-sectionHeader { display: flex; justify-content: center; } -.Learn-learningResourcesHeader h3 { +.Learn-learningResourcesHeader h3, +.Security-sectionHeader h3 { font-weight: bold; font-size: 1.5rem; letter-spacing: normal; @@ -1991,7 +2026,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } /* @media only screen and (min-width: 48rem) { - .Learn-guided .Learn-cardList { + .Learn-guided .Learn-cardList, .Security-cardList { grid-template-columns: repeat(2, 1fr); } } */ @@ -2012,12 +2047,14 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } @media only screen and (min-width: 48rem) { - .Learn-learningResourcesHeader { + .Learn-learningResourcesHeader, + .Security-sectionHeader { display: flex; justify-content: flex-start; } - .Learn-learningResourcesHeader h2 { + .Learn-learningResourcesHeader h2, + .Security-sectionHeader h2 { font-size: 2.25rem; line-height: 2.625rem; } diff --git a/go.dev/content/security/_index.md b/go.dev/content/security/_index.md new file mode 100644 index 00000000..c220ede9 --- /dev/null +++ b/go.dev/content/security/_index.md @@ -0,0 +1,3 @@ +--- +title: "Security" +--- diff --git a/go.dev/data/security/foundations.yaml b/go.dev/data/security/foundations.yaml new file mode 100644 index 00000000..911925ab --- /dev/null +++ b/go.dev/data/security/foundations.yaml @@ -0,0 +1,39 @@ +links: + - title: Secure by design + content: | +
        +
      • Memory safety and garbage collection prevent most common vulnerabilities
      • +
      • Safe by default APIs in the standard library
      • +
      • Use safe libraries from Google like github.com/google/safehtml
      • +
      + url: https://github.com/google/safehtml + icon: /images/icons/secure.svg + cta: Learn more + - title: Enterprise crypto + content: | +
        +
      • Included in the std library
      • +
      • Maintained by the Go team
      • +
      + url: https://www.google.com + icon: /images/icons/crypto.svg + cta: Learn more + - title: Supply chain security + content: | +
        +
      • Ecosystem of 3rd party modules with a culture of limited dependencies
      • +
      • Tamper detection via the Go checksum database
      • +
      • Availability via the Go module proxy
      • +
      + url: https://www.google.com + icon: /images/icons/supply_chain_security.svg + cta: Learn more + - title: Swiftly handle security issues + content: | +
        +
      • Report bugs directly to the Go team
      • +
      • Leverage community resources like Snyk and Nancy
      • +
      + url: https://www.google.com + icon: /images/icons/swift_issues.svg + cta: Learn more diff --git a/go.dev/data/security/getstarted.yaml b/go.dev/data/security/getstarted.yaml new file mode 100644 index 00000000..5047ce7f --- /dev/null +++ b/go.dev/data/security/getstarted.yaml @@ -0,0 +1,21 @@ +links: + - title: Learn about the Module Mirror, Index, and Checksum Database + url: https://www.google.com + icon: /images/icons/module.svg + cta: Learn more + - title: Talk by Katie Hockman on Modules, Module Mirrors, and the Checksum Database + url: https://www.google.com + icon: /images/icons/talk.svg + cta: Watch now + - title: Discover the Go Crypto Package + url: https://www.google.com + icon: /images/icons/discover.svg + cta: Learn more + - title: Report a security bug in the Go project + url: https://www.google.com + icon: /images/icons/bug.svg + cta: Report bug + - title: Join the \#security and \#crypto channels on the Gophers slack + url: https://www.google.com + icon: /images/icons/slack.svg + cta: Join now diff --git a/go.dev/data/security/recentUpdates.yaml b/go.dev/data/security/recentUpdates.yaml new file mode 100644 index 00000000..e9aecc0c --- /dev/null +++ b/go.dev/data/security/recentUpdates.yaml @@ -0,0 +1,43 @@ +links: + - title: Title of post + content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. + url: https://www.google.com + cta: Read blog post + - title: Title of post + content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. + url: https://www.google.com + cta: Read blog post + - title: Title of post + content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. + url: https://www.google.com + cta: Read blog post + - title: Title of post + content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. + url: https://www.google.com + cta: Read blog post + + - title: Title of post + content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. + url: https://www.google.com + cta: Read blog post + - title: Title of post + content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. + url: https://www.google.com + cta: Read blog post + - title: Title of post + content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. + url: https://www.google.com + cta: Read blog post + - title: Title of post + content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. + url: https://www.google.com + cta: Read blog post + - title: Title of post + content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. + url: https://www.google.com + cta: Read blog post + + - title: Title of post + content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. + url: https://www.google.com + cta: Read blog post diff --git a/go.dev/layouts/partials/security/card.html b/go.dev/layouts/partials/security/card.html new file mode 100644 index 00000000..dbc64c19 --- /dev/null +++ b/go.dev/layouts/partials/security/card.html @@ -0,0 +1,36 @@ + diff --git a/go.dev/layouts/security/section.html b/go.dev/layouts/security/section.html new file mode 100644 index 00000000..46201d19 --- /dev/null +++ b/go.dev/layouts/security/section.html @@ -0,0 +1,223 @@ +{{define "main"}} +
      +
      +
      +
      + {{ partial "breadcrumbs.html" . }} +

      Build secure applications with Go

      +

      + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +

      +
      +
      + Go Gopher riding a motorcycle +
      +
      +
      +
      + +
      +
      +
      +
        + {{ range $.Site.Data.security.foundations.links }} +
      • + {{ partial "security/card.html" . }} +
      • + {{ end }} +
      +
      +
      +
      +
      +

      Coming Soon

      +
      +
      +
        +
      • Native support for fuzz testing, maybe OSS-Fuzz integration
      • +
      • Vulnerabilities database curated by the Go team, with low-noise auditing tools
      • +
      +
      +
      + Go Gopher riding a motorcycle +
      +
      +
      +
      + +
      +
      +
      +

      Recent Updates

      +
      +
      +
        + {{ range $.Site.Data.security.getstarted.links }} +
      • + {{ partial "security/card.html" . }} +
      • + {{ end }} +
      +
      +
      +
      + + +
      +
      +
      +

      Get Started

      +
      +
      +
        + {{ range $.Site.Data.security.recentUpdates.links }} +
      • + {{ partial "security/card.html" . }} +
      • + {{ end }} +
      +
      +
      +
      + + +{{end}} \ No newline at end of file diff --git a/go.dev/static/images/icons/bug.svg b/go.dev/static/images/icons/bug.svg new file mode 100644 index 00000000..40a6aa6f --- /dev/null +++ b/go.dev/static/images/icons/bug.svg @@ -0,0 +1,4 @@ + + + + diff --git a/go.dev/static/images/icons/crypto.svg b/go.dev/static/images/icons/crypto.svg new file mode 100644 index 00000000..45db17db --- /dev/null +++ b/go.dev/static/images/icons/crypto.svg @@ -0,0 +1,4 @@ + + + + diff --git a/go.dev/static/images/icons/discover.svg b/go.dev/static/images/icons/discover.svg new file mode 100644 index 00000000..969fb72f --- /dev/null +++ b/go.dev/static/images/icons/discover.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/go.dev/static/images/icons/module.svg b/go.dev/static/images/icons/module.svg new file mode 100644 index 00000000..197263bd --- /dev/null +++ b/go.dev/static/images/icons/module.svg @@ -0,0 +1,3 @@ + + + diff --git a/go.dev/static/images/icons/secure.svg b/go.dev/static/images/icons/secure.svg new file mode 100644 index 00000000..be741e37 --- /dev/null +++ b/go.dev/static/images/icons/secure.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/go.dev/static/images/icons/slack.svg b/go.dev/static/images/icons/slack.svg new file mode 100644 index 00000000..3fbe849a --- /dev/null +++ b/go.dev/static/images/icons/slack.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/go.dev/static/images/icons/supply_chain_security.svg b/go.dev/static/images/icons/supply_chain_security.svg new file mode 100644 index 00000000..cb3378e6 --- /dev/null +++ b/go.dev/static/images/icons/supply_chain_security.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/go.dev/static/images/icons/swift_issues.svg b/go.dev/static/images/icons/swift_issues.svg new file mode 100644 index 00000000..b6c019b5 --- /dev/null +++ b/go.dev/static/images/icons/swift_issues.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/go.dev/static/images/icons/talk.svg b/go.dev/static/images/icons/talk.svg new file mode 100644 index 00000000..4da864f5 --- /dev/null +++ b/go.dev/static/images/icons/talk.svg @@ -0,0 +1,3 @@ + + + -- cgit v1.3 From 69a5c725f5bbc72081cca5c90bbc81f22c969c93 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Tue, 27 Oct 2020 00:03:26 -0400 Subject: [x/go.dev] fixes for 159 add, 160 add cli library, 161 about page nav active Change-Id: I85d021f19a9f213192519427ade5ec459780fc1a X-GoDev-Commit: e23bb4b9d0acb0183c4d2cc2e6892f7203bfa83e --- go.dev/config.toml | 4 +++- go.dev/content/solutions/armut/index.md | 9 +++++++++ go.dev/content/solutions/clis/index.md | 3 +++ go.dev/layouts/_default/baseof.html | 2 +- go.dev/static/images/logos/armut.png | Bin 0 -> 15990 bytes 5 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 go.dev/content/solutions/armut/index.md create mode 100644 go.dev/static/images/logos/armut.png diff --git a/go.dev/config.toml b/go.dev/config.toml index 318bfa96..9ed511e8 100644 --- a/go.dev/config.toml +++ b/go.dev/config.toml @@ -38,7 +38,9 @@ title = "go.dev" weight = -90 [[menu.main]] + identifier = "about" name = "About" + title = "About" url = "https://go.dev/about" weight = -80 @@ -101,7 +103,7 @@ title = "go.dev" identifier = "about" name = "About" title = "About" - url = "https://go.dev//about" + url = "https://go.dev/about" weight = -80 [[menu.footer]] diff --git a/go.dev/content/solutions/armut/index.md b/go.dev/content/solutions/armut/index.md new file mode 100644 index 00000000..66c1556b --- /dev/null +++ b/go.dev/content/solutions/armut/index.md @@ -0,0 +1,9 @@ +--- +linkTitle: "How Armut Labs use Go " +description: "Learn about how Armut Labs reduced resource consumption and API response time after moving from C# and .net core to Go." +company: Armut +logoSrc: armut.png +series: Case Studies +link: https://labs.armut.com/how-we-decreased-one-of-our-apis-response-time-by-87-and-used-less-resources-ce847e83308 +inLandingPageGrid: true +--- diff --git a/go.dev/content/solutions/clis/index.md b/go.dev/content/solutions/clis/index.md index b059a156..041540cb 100644 --- a/go.dev/content/solutions/clis/index.md +++ b/go.dev/content/solutions/clis/index.md @@ -113,6 +113,9 @@ goLibraries: - text: golang/glog url: https://pkg.go.dev/github.com/golang/glog?tab=overview desc: Leveled execution logs for Go + - text: go-prompt + url: https://pkg.go.dev/github.com/c-bata/go-prompt?tab=overview + desc: A library for building powerful interactive prompts, making it easier to build cross-platform command line tools using Go. --- ## Overview {#overview .sectionHeading} diff --git a/go.dev/layouts/_default/baseof.html b/go.dev/layouts/_default/baseof.html index e1fe9dd8..8197206c 100644 --- a/go.dev/layouts/_default/baseof.html +++ b/go.dev/layouts/_default/baseof.html @@ -71,7 +71,7 @@ {{- if not $currentPage.Site.IsServer}} {{- $url = $url | absURL}} {{- end}} -
    • +
    • {{.Name}}
    • {{- end}} diff --git a/go.dev/static/images/logos/armut.png b/go.dev/static/images/logos/armut.png new file mode 100644 index 00000000..83cc4570 Binary files /dev/null and b/go.dev/static/images/logos/armut.png differ -- cgit v1.3 From dfd1f392c2c4ec05fb038c232b05963b79bcb922 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Tue, 27 Oct 2020 14:18:19 -0400 Subject: [x/go.dev] GD-162 - Change card functionality Change-Id: I9e1aa74dc3150fc9e936eb7b853e4de99dbd7c05 X-GoDev-Commit: 1fa8c131d206a560d961b9ab7757e336bd200f40 --- go.dev/layouts/partials/learn/card.html | 34 +++++++++++++++--------------- go.dev/layouts/partials/security/card.html | 4 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/go.dev/layouts/partials/learn/card.html b/go.dev/layouts/partials/learn/card.html index cb06f417..b9243a63 100644 --- a/go.dev/layouts/partials/learn/card.html +++ b/go.dev/layouts/partials/learn/card.html @@ -1,5 +1,4 @@ -
    diff --git a/go.dev/layouts/partials/security/card.html b/go.dev/layouts/partials/security/card.html index dbc64c19..d881ab29 100644 --- a/go.dev/layouts/partials/security/card.html +++ b/go.dev/layouts/partials/security/card.html @@ -1,5 +1,4 @@ -
    -- cgit v1.3 From 447125e40bbe56ffa491bd3952dfb74043b156cb Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Thu, 29 Oct 2020 13:17:15 -0400 Subject: [x/go.dev] update content security policy Change-Id: Icb8ad351853a862d26ed01ffe14082fe888b066d X-GoDev-Commit: ad7ebbd958d31cfc1ef315657a6380d5927ca7f8 --- go.dev/layouts/_default/baseof.html | 1 + 1 file changed, 1 insertion(+) diff --git a/go.dev/layouts/_default/baseof.html b/go.dev/layouts/_default/baseof.html index 8197206c..2a4db68a 100644 --- a/go.dev/layouts/_default/baseof.html +++ b/go.dev/layouts/_default/baseof.html @@ -14,6 +14,7 @@ + {{$styles := resources.Get "css/styles.css" -}} {{if .Site.IsServer -}} -- cgit v1.3 From d5b983385408580da66a7790bed37af14470f62a Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Thu, 29 Oct 2020 13:41:31 -0400 Subject: [x/go.dev] fix font and iamge CSP rules Change-Id: I897a63dedc610f0455b3def8ae9be30e0a0500d4 X-GoDev-Commit: 257e7ef3c99b2521fa8f8b41002a70d945bfcf58 --- go.dev/layouts/_default/baseof.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.dev/layouts/_default/baseof.html b/go.dev/layouts/_default/baseof.html index 2a4db68a..b9b2fb7c 100644 --- a/go.dev/layouts/_default/baseof.html +++ b/go.dev/layouts/_default/baseof.html @@ -14,7 +14,7 @@ - + {{$styles := resources.Get "css/styles.css" -}} {{if .Site.IsServer -}} -- cgit v1.3 From b343530b2db4575bfd8056e6ac7385597c83cb2d Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Thu, 29 Oct 2020 14:04:47 -0400 Subject: [x/go.dev] update csp url for doubleclick Change-Id: Ia83f5b424c1bba0b0e4720ace308b9e07ebb3341 X-GoDev-Commit: 24d4f2cde2dc8969204864e2fb95425d33855c7d --- go.dev/layouts/_default/baseof.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.dev/layouts/_default/baseof.html b/go.dev/layouts/_default/baseof.html index b9b2fb7c..dc11936e 100644 --- a/go.dev/layouts/_default/baseof.html +++ b/go.dev/layouts/_default/baseof.html @@ -14,7 +14,7 @@ - + {{$styles := resources.Get "css/styles.css" -}} {{if .Site.IsServer -}} -- cgit v1.3 From 2affd755a5664a370579e8ee4db05d38f1f7d8c5 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Fri, 30 Oct 2020 12:57:33 -0400 Subject: [x/go.dev] fix solutions book list sections Change-Id: Ibb781ca44a85a98ff64588c4c9a964a1a9c08c23 X-GoDev-Commit: 98709e7d07d55b988bb24fdedeb34becb39e5af4 --- go.dev/assets/css/styles.css | 62 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index c87012df..12fcdcad 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -2265,6 +2265,68 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } } +.Learn-tile a { + width: 100%; +} + +.Learn-tileList { + display: grid; + gap: 2rem; + grid-template-columns: repeat(2, minmax(0, 1fr)); + list-style: none; + padding: 0; +} +@media only screen and (min-width: 38rem) { + .Learn-tileList { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } +} +@media only screen and (min-width: 48rem) { + .Learn-tileList { + justify-content: space-between; + } + .Learn-tileList { + column-gap: 3rem; + } +} +.Learn-tile { + display: flex; + flex-wrap: wrap; + justify-content: center; +} +.Learn-tile a { + color: #3c4043; +} +.Learn-tileTitle { + display: block; + font-size: 0.75rem; + font-style: normal; + font-weight: normal; + letter-spacing: 0.01rem; + line-height: 0.875rem; + margin: 1.5rem auto 0; + overflow-wrap: break-word; + text-align: center; +} +.Learn-tileThumbnail { + align-items: center; + background-color: #fff; + border-radius: 0.3125rem; + box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); + display: flex; + justify-content: center; + margin: auto; + width: 100%; +} +.Learn-tileThumbnail img { + max-height: 100%; + max-width: 100%; +} +.Learn-tileThumbnail--book img { + max-height: 100%; + max-width: 100%; +} + .Solutions-title, .Solutions-useCases, .Solutions-caseStudies { -- cgit v1.3 From c5faa3b271fed4bb8278619908e75d3d275d9a5d Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Mon, 2 Nov 2020 10:58:29 -0500 Subject: [x/go.dev] fix missing noopeners Change-Id: Ife66a60f1da1c7fda47823a6e387c850c2eda126 X-GoDev-Commit: f47b79614f14f2cb2dacb2c64ee0386c9e985d20 --- go.dev/layouts/learn/section.html | 2 +- go.dev/layouts/partials/security/card.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go.dev/layouts/learn/section.html b/go.dev/layouts/learn/section.html index 0f8d2bea..39bbb494 100644 --- a/go.dev/layouts/learn/section.html +++ b/go.dev/layouts/learn/section.html @@ -8,7 +8,7 @@

    Install the latest version of Go. For instructions to download and install the Go compilers, tools, and libraries, - + view the install documentation.

    diff --git a/go.dev/layouts/partials/security/card.html b/go.dev/layouts/partials/security/card.html index d881ab29..bff5cf6d 100644 --- a/go.dev/layouts/partials/security/card.html +++ b/go.dev/layouts/partials/security/card.html @@ -13,7 +13,7 @@
    {{.content | safeHTML}}
    {{end}}
    - + {{.cta}} Date: Mon, 2 Nov 2020 14:31:33 -0500 Subject: [x/go.dev] Add google.com to CSP Change-Id: I34740a8f3543df5a33ed32e07a93d59be4768f3c X-GoDev-Commit: 4a9ad6bc4c357fcb9cbd92ce9d9c581323b965dd --- go.dev/layouts/_default/baseof.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.dev/layouts/_default/baseof.html b/go.dev/layouts/_default/baseof.html index dc11936e..1c126a5d 100644 --- a/go.dev/layouts/_default/baseof.html +++ b/go.dev/layouts/_default/baseof.html @@ -14,7 +14,7 @@ - + {{$styles := resources.Get "css/styles.css" -}} {{if .Site.IsServer -}} -- cgit v1.3 From 6f066452b5aec38edb8e65e0f6090cab4a87cf65 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Mon, 2 Nov 2020 14:44:24 -0500 Subject: [x/go.dev] debug removing the CSP Change-Id: Ie81e9c127497285a01c20de0bb838dd5bf0010ff X-GoDev-Commit: 0a3ad4205bcd24e278083e32a8aa99d95fa217fb --- go.dev/layouts/_default/baseof.html | 1 - 1 file changed, 1 deletion(-) diff --git a/go.dev/layouts/_default/baseof.html b/go.dev/layouts/_default/baseof.html index 1c126a5d..8197206c 100644 --- a/go.dev/layouts/_default/baseof.html +++ b/go.dev/layouts/_default/baseof.html @@ -14,7 +14,6 @@ - {{$styles := resources.Get "css/styles.css" -}} {{if .Site.IsServer -}} -- cgit v1.3 From 4935117bba3cd00dbad02a7512d7fde94ffc4d1e Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Mon, 2 Nov 2020 16:02:04 -0500 Subject: [x/go.dev] re-insert CSP Change-Id: I9d1d38a3a2b1a97b3334dd9e21bc199487ec091a X-GoDev-Commit: 132f04460a37d213d496aeaae40ecb30db3c4e65 --- go.dev/layouts/_default/baseof.html | 1 + 1 file changed, 1 insertion(+) diff --git a/go.dev/layouts/_default/baseof.html b/go.dev/layouts/_default/baseof.html index 8197206c..1c126a5d 100644 --- a/go.dev/layouts/_default/baseof.html +++ b/go.dev/layouts/_default/baseof.html @@ -14,6 +14,7 @@ + {{$styles := resources.Get "css/styles.css" -}} {{if .Site.IsServer -}} -- cgit v1.3 From 38c44d5f0f5e98a1b638f3aa03410b87bb679b6c Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Tue, 3 Nov 2020 16:50:03 -0500 Subject: [x/go.dev] set HaTS to self hosted script, set chances to 1 Change-Id: Ie3fcab2e84cbbf3fd613a527561cd1ead8d08a56 X-GoDev-Commit: d4937d385e6e81a48a7df4e58891af1e7c058972 --- go.dev/layouts/_default/baseof.html | 2 +- go.dev/static/js/hats.js | 55 +++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 go.dev/static/js/hats.js diff --git a/go.dev/layouts/_default/baseof.html b/go.dev/layouts/_default/baseof.html index 1c126a5d..92fc3f3b 100644 --- a/go.dev/layouts/_default/baseof.html +++ b/go.dev/layouts/_default/baseof.html @@ -14,7 +14,6 @@ - {{$styles := resources.Get "css/styles.css" -}} {{if .Site.IsServer -}} @@ -30,6 +29,7 @@ })(window,document,'script','dataLayer','GTM-W8MVQXG'); + {{.Title}}{{if not .IsHome}} - {{.Site.Title}}{{end}} {{if (isset .Params "link") -}} diff --git a/go.dev/static/js/hats.js b/go.dev/static/js/hats.js new file mode 100644 index 00000000..f0dbd0a4 --- /dev/null +++ b/go.dev/static/js/hats.js @@ -0,0 +1,55 @@ +(function () { + var cookieName = 'HaTS_BKT'; + var inBucket; + + var cookies = decodeURIComponent(document.cookie).split(';'); + + for (let i = 0; i < cookies.length; i++) { + var c = cookies[i]; + + while (c.charAt(0) == ' ') c = c.substring(1); + + if (c.indexOf(cookieName + '=') == 0) + inBucket = c.substring((cookieName + '=').length, c.length); + } + + if (typeof inBucket === 'undefined') { + inBucket = String(Math.random() < 1); // 0.03 + document.cookie = + cookieName + '=' + inBucket + '; path=/; max-age=2592000;'; + } + + if (inBucket === 'true') { + var shouldPrompt = Math.random() < 1; // 0.1 + if (shouldPrompt) { + document.cookie = cookieName + '=false ; path=/; max-age=2592000;'; + + var tag = document.createElement('script'); + tag.src = + 'https://www.gstatic.com/feedback/js/help/prod/service/lazy.min.js'; + tag.type = 'text/javascript'; + document.head.appendChild(tag); + + tag.onload = function () { + var helpApi = window.help.service.Lazy.create(0, { + apiKey: 'AIzaSyDfBPfajByU2G6RAjUf5sjkMSSLNTj7MMc', + locale: 'en-US', + }); + + helpApi.requestSurvey({ + triggerId: 'RLVVv5Lf10njVvnD1rP0QUpmtosS', + callback: function (requestSurveyCallbackParam) { + if (!requestSurveyCallbackParam.surveyData) { + return; + } + helpApi.presentSurvey({ + surveyData: requestSurveyCallbackParam.surveyData, + colorScheme: 1, // light + customZIndex: 10000, + }); + }, + }); + }; + } + } +})(); -- cgit v1.3 From eb7780bcb740a706f2e73a9d0ba43e7078ff8042 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Tue, 3 Nov 2020 17:56:59 -0500 Subject: [x/go.dev] update with new CSP Change-Id: I666842f8c3ca72b011d65d3cafb6b22bc7a9895c X-GoDev-Commit: 16b4c52a873967cdcf8a6a3707ca8f517945daeb --- go.dev/layouts/_default/baseof.html | 1 + 1 file changed, 1 insertion(+) diff --git a/go.dev/layouts/_default/baseof.html b/go.dev/layouts/_default/baseof.html index 92fc3f3b..9a61fc59 100644 --- a/go.dev/layouts/_default/baseof.html +++ b/go.dev/layouts/_default/baseof.html @@ -14,6 +14,7 @@ + {{$styles := resources.Get "css/styles.css" -}} {{if .Site.IsServer -}} -- cgit v1.3 From 85e9f35e85989f6a02eb5b0ccfc42d6bdfbc7ee6 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Tue, 3 Nov 2020 18:23:48 -0500 Subject: [x/go.dev] move GTM to script file, remove redundant GTM snippet Change-Id: I4fcaa0392c69a43531977765186a9b022e04a374 X-GoDev-Commit: 26fa6fc04f8ae928bea002dd21845151c60f194d --- go.dev/layouts/_default/baseof.html | 14 ++------------ go.dev/static/js/gtm.js | 10 ++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 go.dev/static/js/gtm.js diff --git a/go.dev/layouts/_default/baseof.html b/go.dev/layouts/_default/baseof.html index 9a61fc59..a50f5f57 100644 --- a/go.dev/layouts/_default/baseof.html +++ b/go.dev/layouts/_default/baseof.html @@ -3,11 +3,7 @@ - + @@ -22,13 +18,7 @@ {{$stylesFP := $styles | fingerprint -}} {{end -}} - - - + {{.Title}}{{if not .IsHome}} - {{.Site.Title}}{{end}} diff --git a/go.dev/static/js/gtm.js b/go.dev/static/js/gtm.js new file mode 100644 index 00000000..9581df3d --- /dev/null +++ b/go.dev/static/js/gtm.js @@ -0,0 +1,10 @@ +(function (w, d, s, l, i) { + w[l] = w[l] || []; + w[l].push({'gtm.start': new Date().getTime(), 'event': 'gtm.js'}); + var f = d.getElementsByTagName(s)[0], + j = d.createElement(s), + dl = l != 'dataLayer' ? '&l=' + l : ''; + j.async = true; + j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; + f.parentNode.insertBefore(j, f); +})(window, document, 'script', 'dataLayer', 'GTM-W8MVQXG'); -- cgit v1.3 From 21c657799d69ec8280d2ea5ca313ffc362031605 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Wed, 4 Nov 2020 10:48:39 -0500 Subject: [x/go.dev] add double click to whitelist Change-Id: Idd5b52dec2ad78ecbf0040ce7008da63158efbb4 X-GoDev-Commit: 6a82bb20ac0d17a0278e08c49d56aa8e5f9810a8 --- go.dev/cmd/gencsp/main.go | 1 + go.dev/layouts/_default/baseof.html | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/go.dev/cmd/gencsp/main.go b/go.dev/cmd/gencsp/main.go index 14070c97..20e813fc 100644 --- a/go.dev/cmd/gencsp/main.go +++ b/go.dev/cmd/gencsp/main.go @@ -33,6 +33,7 @@ var csp = map[string][]string{ "connect-src": { "https://golang.org", "www.google-analytics.com", + "https://stats.g.doubleclick.net/", }, "default-src": { self, diff --git a/go.dev/layouts/_default/baseof.html b/go.dev/layouts/_default/baseof.html index a50f5f57..04a29ab7 100644 --- a/go.dev/layouts/_default/baseof.html +++ b/go.dev/layouts/_default/baseof.html @@ -10,7 +10,6 @@ - {{$styles := resources.Get "css/styles.css" -}} {{if .Site.IsServer -}} -- cgit v1.3 From 4b330ee418f5ef9a7831147d951626b65765138f Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Wed, 4 Nov 2020 11:19:14 -0500 Subject: [x/go.dev] add apis to whitelist Change-Id: I0e9f1ccdb5bf65b49855f3c158fed1c85e5ae9ed X-GoDev-Commit: 3901b106812cf2cd9577629429582fe779af40bd --- go.dev/cmd/gencsp/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/go.dev/cmd/gencsp/main.go b/go.dev/cmd/gencsp/main.go index 20e813fc..6fe3e963 100644 --- a/go.dev/cmd/gencsp/main.go +++ b/go.dev/cmd/gencsp/main.go @@ -75,6 +75,7 @@ var csp = map[string][]string{ "'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M='", // Google Tag Manager Preview mode "'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo='", // Google Tag Manager Preview mode "www.google.com", + "apis.google.com", "www.gstatic.com", "support.google.com", "www.googletagmanager.com", -- cgit v1.3 From b38c8b8f36c8f1970edbb80cfcaa873ef236b875 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Wed, 4 Nov 2020 11:26:55 -0500 Subject: [x/go.dev] update CSP with generated Change-Id: Ide640349d91fbf09c123a9f51c10a02557ff263e X-GoDev-Commit: 50fe7ebfc1385a6b16ffe8b6040dc0879494640e --- go.dev/app.staging.yaml | 8 ++++---- go.dev/app.yaml | 8 ++++---- go.dev/cmd/gencsp/main.go | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.dev/app.staging.yaml b/go.dev/app.staging.yaml index b0ba090a..9de2c7bd 100644 --- a/go.dev/app.staging.yaml +++ b/go.dev/app.staging.yaml @@ -8,7 +8,7 @@ handlers: upload: public/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /(explore|learn) secure: always @@ -26,7 +26,7 @@ handlers: upload: public/(.*) http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html, special casing the trailing slash. - url: /(.*)/ @@ -34,7 +34,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html - url: /(.*) @@ -42,7 +42,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /.* secure: always diff --git a/go.dev/app.yaml b/go.dev/app.yaml index 159cd094..fc6b1b51 100644 --- a/go.dev/app.yaml +++ b/go.dev/app.yaml @@ -8,7 +8,7 @@ handlers: upload: public/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /(explore|learn) secure: always @@ -26,7 +26,7 @@ handlers: upload: public/(.*) http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html, special casing the trailing slash. - url: /(.*)/ @@ -34,7 +34,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html - url: /(.*) @@ -42,7 +42,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /.* secure: always diff --git a/go.dev/cmd/gencsp/main.go b/go.dev/cmd/gencsp/main.go index 6fe3e963..cd167f2d 100644 --- a/go.dev/cmd/gencsp/main.go +++ b/go.dev/cmd/gencsp/main.go @@ -33,7 +33,7 @@ var csp = map[string][]string{ "connect-src": { "https://golang.org", "www.google-analytics.com", - "https://stats.g.doubleclick.net/", + "stats.g.doubleclick.net", }, "default-src": { self, -- cgit v1.3 From 78aed8e664b92aa5bb7e8d9a4ec2aa851c2f60fc Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Wed, 4 Nov 2020 11:33:57 -0500 Subject: [x/go.dev] add google ads subdomain Change-Id: I8344ac9e1b37952080df829f14c46359a29848ae X-GoDev-Commit: 6a0f69d790798d297f96d49dea89f7cdb756b7f8 --- go.dev/app.staging.yaml | 8 ++++---- go.dev/app.yaml | 8 ++++---- go.dev/cmd/gencsp/main.go | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/go.dev/app.staging.yaml b/go.dev/app.staging.yaml index 9de2c7bd..6627fb57 100644 --- a/go.dev/app.staging.yaml +++ b/go.dev/app.staging.yaml @@ -8,7 +8,7 @@ handlers: upload: public/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /(explore|learn) secure: always @@ -26,7 +26,7 @@ handlers: upload: public/(.*) http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html, special casing the trailing slash. - url: /(.*)/ @@ -34,7 +34,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html - url: /(.*) @@ -42,7 +42,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /.* secure: always diff --git a/go.dev/app.yaml b/go.dev/app.yaml index fc6b1b51..3e4fcb04 100644 --- a/go.dev/app.yaml +++ b/go.dev/app.yaml @@ -8,7 +8,7 @@ handlers: upload: public/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /(explore|learn) secure: always @@ -26,7 +26,7 @@ handlers: upload: public/(.*) http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html, special casing the trailing slash. - url: /(.*)/ @@ -34,7 +34,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html - url: /(.*) @@ -42,7 +42,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /.* secure: always diff --git a/go.dev/cmd/gencsp/main.go b/go.dev/cmd/gencsp/main.go index cd167f2d..dc84cb0c 100644 --- a/go.dev/cmd/gencsp/main.go +++ b/go.dev/cmd/gencsp/main.go @@ -57,6 +57,7 @@ var csp = map[string][]string{ "www.google.com", "feedback.googleusercontent.com", "www.googletagmanager.com", + "scone-pa.clients6.google.com" }, "img-src": { self, -- cgit v1.3 From f218d90eddd9cb45047a0a4544fde5ebe49197c8 Mon Sep 17 00:00:00 2001 From: Matt Masurka Date: Fri, 6 Nov 2020 11:08:32 -0800 Subject: [x/go.dev] Reverting accidental merge to master Change-Id: I6b43562be63908c784f282e19e696be52cfe732b X-GoDev-Commit: c213be325868117cd5ea2d362a2e1d74de8b086a --- go.dev/app.staging.yaml | 8 +- go.dev/app.yaml | 8 +- go.dev/assets/css/styles.css | 196 +++++------------- go.dev/cmd/events/main.go | 4 +- go.dev/cmd/gencsp/main.go | 3 - go.dev/config.toml | 4 +- go.dev/content/security/_index.md | 3 - go.dev/content/solutions/armut/index.md | 9 - go.dev/content/solutions/clis/index.md | 3 - go.dev/data/security/foundations.yaml | 39 ---- go.dev/data/security/getstarted.yaml | 21 -- go.dev/data/security/recentUpdates.yaml | 43 ---- go.dev/layouts/_default/baseof.html | 17 +- go.dev/layouts/learn/section.html | 24 +-- go.dev/layouts/partials/security/card.html | 36 ---- go.dev/layouts/security/section.html | 223 --------------------- go.dev/static/images/gophers/motorcycle.svg | 2 +- go.dev/static/images/icons/bug.svg | 4 - go.dev/static/images/icons/crypto.svg | 4 - go.dev/static/images/icons/discover.svg | 8 - go.dev/static/images/icons/module.svg | 3 - go.dev/static/images/icons/secure.svg | 7 - go.dev/static/images/icons/slack.svg | 10 - .../static/images/icons/supply_chain_security.svg | 8 - go.dev/static/images/icons/swift_issues.svg | 16 -- go.dev/static/images/icons/talk.svg | 3 - go.dev/static/images/learn/clis.png | Bin 15139 -> 5889 bytes go.dev/static/images/learn/codecademy.png | Bin 1719 -> 740 bytes go.dev/static/images/learn/codelabs.png | Bin 2813 -> 970 bytes go.dev/static/images/learn/edureka.png | Bin 57648 -> 26261 bytes go.dev/static/images/learn/exercism.png | Bin 3051 -> 1832 bytes go.dev/static/images/learn/gophercises.png | Bin 101235 -> 48432 bytes go.dev/static/images/learn/introducing-go-book.png | Bin 395153 -> 56439 bytes go.dev/static/images/learn/qwiklabs.png | Bin 7789 -> 2761 bytes go.dev/static/images/learn/star-rating.png | Bin 557 -> 280 bytes go.dev/static/images/learn/web-dev.png | Bin 18904 -> 5142 bytes go.dev/static/images/logos/armut.png | Bin 15990 -> 0 bytes go.dev/static/js/gtm.js | 10 - go.dev/static/js/hats.js | 55 ----- 39 files changed, 86 insertions(+), 685 deletions(-) delete mode 100644 go.dev/content/security/_index.md delete mode 100644 go.dev/content/solutions/armut/index.md delete mode 100644 go.dev/data/security/foundations.yaml delete mode 100644 go.dev/data/security/getstarted.yaml delete mode 100644 go.dev/data/security/recentUpdates.yaml delete mode 100644 go.dev/layouts/partials/security/card.html delete mode 100644 go.dev/layouts/security/section.html delete mode 100644 go.dev/static/images/icons/bug.svg delete mode 100644 go.dev/static/images/icons/crypto.svg delete mode 100644 go.dev/static/images/icons/discover.svg delete mode 100644 go.dev/static/images/icons/module.svg delete mode 100644 go.dev/static/images/icons/secure.svg delete mode 100644 go.dev/static/images/icons/slack.svg delete mode 100644 go.dev/static/images/icons/supply_chain_security.svg delete mode 100644 go.dev/static/images/icons/swift_issues.svg delete mode 100644 go.dev/static/images/icons/talk.svg delete mode 100644 go.dev/static/images/logos/armut.png delete mode 100644 go.dev/static/js/gtm.js delete mode 100644 go.dev/static/js/hats.js diff --git a/go.dev/app.staging.yaml b/go.dev/app.staging.yaml index 6627fb57..b0ba090a 100644 --- a/go.dev/app.staging.yaml +++ b/go.dev/app.staging.yaml @@ -8,7 +8,7 @@ handlers: upload: public/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /(explore|learn) secure: always @@ -26,7 +26,7 @@ handlers: upload: public/(.*) http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html, special casing the trailing slash. - url: /(.*)/ @@ -34,7 +34,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html - url: /(.*) @@ -42,7 +42,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /.* secure: always diff --git a/go.dev/app.yaml b/go.dev/app.yaml index 3e4fcb04..159cd094 100644 --- a/go.dev/app.yaml +++ b/go.dev/app.yaml @@ -8,7 +8,7 @@ handlers: upload: public/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /(explore|learn) secure: always @@ -26,7 +26,7 @@ handlers: upload: public/(.*) http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html, special casing the trailing slash. - url: /(.*)/ @@ -34,7 +34,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html - url: /(.*) @@ -42,7 +42,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /.* secure: always diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index 12fcdcad..f1675ba8 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -547,8 +547,7 @@ a.BreadcrumbNav-link { .WhoUsesCaseStudyList-gridContainer, .WhyGo-gridContainer, .UseCases-gridContainer, -.LearnGo-gridContainer, -.Security-gridContainer { +.LearnGo-gridContainer { display: flex; flex-direction: column; flex-wrap: wrap; @@ -560,8 +559,7 @@ a.BreadcrumbNav-link { .WhoUsesHero-gridContainer, .WhyGo-gridContainer, .UseCases-gridContainer, -.LearnGo-gridContainer, -.Security-gridContainer { +.LearnGo-gridContainer { padding: 3rem 1.5rem 1rem; } .WhoUsesHero-gridContainer { @@ -573,8 +571,7 @@ a.BreadcrumbNav-link { .WhoUsesCaseStudyList-gridContainer, .WhyGo-gridContainer, .UseCases-gridContainer, - .LearnGo-gridContainer, - .Security-gridContainer { + .LearnGo-gridContainer { flex-direction: row; justify-content: space-between; } @@ -1753,8 +1750,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } } -.Learn-hero, -.Security-hero { +.Learn-hero { background-color: #f6f8f8; background-image: radial-gradient( 60.0625rem 60.0625rem, @@ -1767,34 +1763,29 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { padding: 0 2.25rem 0; } -.Learn-hero .Container, -.Security-hero .Container { +.Learn-hero .Container { z-index: 1; position: relative; max-width: 68.125rem; } -.Learn-heroInner, -.Security-heroInner { +.Learn-heroInner { display: flex; flex-direction: column-reverse; } -.Learn-heroGopher, -.Security-heroGopher { +.Learn-heroGopher { display: flex; justify-content: flex-end; padding-top: 1.25rem; } -.Learn-heroGopher img, -.Security-heroGopher img { +.Learn-heroGopher img { height: 13.5625rem; width: auto; } -.Learn-heroContent, -.Security-heroContent { +.Learn-heroContent { padding-top: 1.125rem; } @@ -1802,8 +1793,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { text-decoration: underline; } -.Learn-heroContent h1, -.Security-heroContent h1 { +.Learn-heroContent h1 { font-family: Work Sans; font-style: normal; font-weight: normal; @@ -1811,16 +1801,14 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { line-height: 2rem; } -.Learn-heroContent p, -.Security-heroContent p { +.Learn-heroContent p { color: #5f5f5f; font-size: 0.875rem; line-height: 1.5rem; max-width: 27.1875rem; } -.Learn-heroAction, -.Security-heroAction { +.Learn-heroAction { align-items: center; background-color: #007d9c; border-radius: 0.25rem; @@ -1832,33 +1820,27 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .Learn-heroAction a, .Learn-heroAction a:hover, -.Learn-heroAction a:visited, -.Security-heroAction a, -.Security-heroAction a:hover, -.Security-heroAction a:visited { - color: #ffffff; +.Learn-heroAction a:visited { + color: #fff; font-size: 0.875rem; font-weight: 500; line-height: 1rem; text-decoration: none; } -.Learn-heroAction span, -.Security-heroAction span { +.Learn-heroAction span { font-weight: normal; } -/* Learn/Security page grid rules */ +/* Learn page grid rules */ -.LearnGo-gridContainer, -.Security-gridContainer { +.LearnGo-gridContainer { display: flex; justify-content: center; padding: 0rem 0rem 1rem; } -.Learn-cardList, -.Security-cardList { +.Learn-cardList { column-gap: 3.313rem; display: grid; grid-template-columns: repeat(1, 1fr); @@ -1868,26 +1850,23 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { row-gap: 2rem; } -.Learn-card, -.Security-card { +.Learn-card { height: 23.375rem; max-width: 40rem; } @media only screen and (min-width: 48rem) { - .Learn-cardList, - .Security-cardList { + .Learn-cardList { grid-template-columns: repeat(2, 1fr); } } @media only screen and (min-width: 72.75rem) { - .Learn-cardList, - .Security-cardList { + .Learn-cardList { grid-template-columns: repeat(4, 1fr); } } -/* End Learn/Security page grid rules */ +/* End Learn page grid rules */ /* Learn quickstart grid */ @@ -1924,59 +1903,48 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { /* Learn hero section */ @media only screen and (min-width: 57.7rem) { - .Learn-hero, - .Security-hero { + .Learn-hero { background-position: top -35rem left 30rem; } - .Learn-heroInner, - .Security-heroInner { + .Learn-heroInner { flex-direction: row; justify-content: space-between; } - .Learn-heroContent, - .Security-heroContent { + .Learn-heroContent { padding-top: 3.75rem; } - .Learn-heroGopher, - .Security-heroGopher { + .Learn-heroGopher { flex: 1; justify-content: center; padding-top: 2.625rem; } - .Learn-heroGopher img, - .Security-heroGopher img { + .Learn-heroGopher img { height: 21.0625rem; } - .Learn-heroAction, - .Security-heroAction { + .Learn-heroAction { height: 4rem; width: 16.5625rem; } .Learn-heroAction a, .Learn-heroAction a:hover, - .Learn-heroAction a:visited, - .Security-heroAction a, - .Security-heroAction a:hover, - .Security-heroAction a:visited { + .Learn-heroAction a:visited { font-size: 1.5rem; line-height: 1.75rem; } - .Learn-heroAction span, - .Security-heroAction span { + .Learn-heroAction span { font-size: 1rem; } } @media only screen and (min-width: 91rem) { - .Learn-hero, - .Security-hero { + .Learn-hero { background-position: top -35rem left 50rem; } } @@ -1999,8 +1967,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Learn-learningResources h2, -.Learn-learningResourcesHeader h3, -.Security-sectionHeader h3 { +.Learn-learningResourcesHeader h3 { margin: 0; } @@ -2011,14 +1978,12 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { line-height: 2.3125rem; } -.Learn-learningResourcesHeader, -.Security-sectionHeader { +.Learn-learningResourcesHeader { display: flex; justify-content: center; } -.Learn-learningResourcesHeader h3, -.Security-sectionHeader h3 { +.Learn-learningResourcesHeader h3 { font-weight: bold; font-size: 1.5rem; letter-spacing: normal; @@ -2026,7 +1991,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } /* @media only screen and (min-width: 48rem) { - .Learn-guided .Learn-cardList, .Security-cardList { + .Learn-guided .Learn-cardList { grid-template-columns: repeat(2, 1fr); } } */ @@ -2047,14 +2012,12 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } @media only screen and (min-width: 48rem) { - .Learn-learningResourcesHeader, - .Security-sectionHeader { + .Learn-learningResourcesHeader { display: flex; justify-content: flex-start; } - .Learn-learningResourcesHeader h2, - .Security-sectionHeader h2 { + .Learn-learningResourcesHeader h2 { font-size: 2.25rem; line-height: 2.625rem; } @@ -2146,7 +2109,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { margin-bottom: 1rem; } .Learn-eventThumbnail--noimage { - background-color: #ffffff; + background-color: #fff; } .Learn-eventThumbnail img { width: 100%; @@ -2265,68 +2228,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } } -.Learn-tile a { - width: 100%; -} - -.Learn-tileList { - display: grid; - gap: 2rem; - grid-template-columns: repeat(2, minmax(0, 1fr)); - list-style: none; - padding: 0; -} -@media only screen and (min-width: 38rem) { - .Learn-tileList { - grid-template-columns: repeat(4, minmax(0, 1fr)); - } -} -@media only screen and (min-width: 48rem) { - .Learn-tileList { - justify-content: space-between; - } - .Learn-tileList { - column-gap: 3rem; - } -} -.Learn-tile { - display: flex; - flex-wrap: wrap; - justify-content: center; -} -.Learn-tile a { - color: #3c4043; -} -.Learn-tileTitle { - display: block; - font-size: 0.75rem; - font-style: normal; - font-weight: normal; - letter-spacing: 0.01rem; - line-height: 0.875rem; - margin: 1.5rem auto 0; - overflow-wrap: break-word; - text-align: center; -} -.Learn-tileThumbnail { - align-items: center; - background-color: #fff; - border-radius: 0.3125rem; - box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); - display: flex; - justify-content: center; - margin: auto; - width: 100%; -} -.Learn-tileThumbnail img { - max-height: 100%; - max-width: 100%; -} -.Learn-tileThumbnail--book img { - max-height: 100%; - max-width: 100%; -} - .Solutions-title, .Solutions-useCases, .Solutions-caseStudies { @@ -2475,7 +2376,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { background-color: #f6f8f8; } .Solutions-headline h2 { - color: #000000; + color: #000; font-family: 'Work Sans', sans-serif; font-size: 1.5rem; font-style: normal; @@ -2516,7 +2417,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .SolutionsTabs-tab { background-color: #fff; border-style: none; - color: #000000; + color: #000; cursor: pointer; font-family: 'Work Sans', Arial, Helvetica, sans-serif; font-size: 1rem; @@ -2560,7 +2461,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { margin: 0 0 1rem 0; } .Solutions-card { - background: #ffffff; + background: #fff; border: 0.0625rem solid #cfcfcf; border-radius: 0.625rem; box-sizing: border-box; @@ -2628,7 +2529,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { line-height: 1.5rem; } .Solutions-useCaseTitle { - color: #000000; + color: #000; font-family: 'Work Sans', sans-serif; font-size: 1.125rem; font-weight: 500; @@ -2661,7 +2562,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { margin: 2rem 0 2.875rem; } .Solutions-footer p { - color: #000000; + color: #000; font-family: 'Roboto', Arial, Helvetica, sans-serif; font-size: 1.125rem; font-weight: normal; @@ -2703,7 +2604,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { justify-content: space-between; } .TestimonialsGo-quoteSection p { - color: #000000; + color: #000; font-size: 0.875rem; letter-spacing: 0.0082rem; line-height: 1.5rem; @@ -2770,7 +2671,7 @@ p.BackgroundQuote-body { } .BackgroundQuote { background-color: #007f9f; - color: #ffffff; + color: #fff; margin: 1.5rem auto; padding: 2rem 1.5rem; } @@ -3413,7 +3314,7 @@ img.PullQuote-image { border: 0.0625rem solid #cfcfcf; border-radius: 0.25rem; height: 100%; - background-color: #ffffff; + background-color: #fff; } .Card a, @@ -3447,7 +3348,7 @@ img.PullQuote-image { } .Card-contentTitle { - color: #000000; + color: #000; font-family: 'Work Sans', sans-serif; font-size: 1.125rem; font-weight: 500; @@ -3486,6 +3387,7 @@ img.PullQuote-image { .Card-starRating { background-image: url('/images/learn/star-rating.png'); background-position: left; + background-repeat: no-repeat; height: 1rem; } @@ -3515,7 +3417,7 @@ img.PullQuote-image { } .Book-title { - color: #000000; + color: #000; font-family: Work Sans; font-size: 1.125rem; font-weight: 500; diff --git a/go.dev/cmd/events/main.go b/go.dev/cmd/events/main.go index 9cf61c13..1ccc9e44 100644 --- a/go.dev/cmd/events/main.go +++ b/go.dev/cmd/events/main.go @@ -82,7 +82,7 @@ func getUpcomingEvents(c client) (*UpcomingEvents, error) { LocalizedCountry: group.LocalizedCountryName, LocalizedLocation: group.LocalizedLocation, Name: group.NextEvent.Name, - PhotoURL: chapter.GroupPhoto.PhotoLink, + PhotoURL: chapter.GroupPhoto.PhotoLink, State: chapter.State, ThumbnailURL: chapter.GroupPhoto.ThumbLink, URL: "https://www.meetup.com/" + path.Join(chapter.URLName, "events", group.NextEvent.ID), @@ -157,7 +157,7 @@ type EventData struct { LocalizedCountry string LocalizedLocation string Name string - PhotoURL string + PhotoURL string State string ThumbnailURL string URL string diff --git a/go.dev/cmd/gencsp/main.go b/go.dev/cmd/gencsp/main.go index dc84cb0c..14070c97 100644 --- a/go.dev/cmd/gencsp/main.go +++ b/go.dev/cmd/gencsp/main.go @@ -33,7 +33,6 @@ var csp = map[string][]string{ "connect-src": { "https://golang.org", "www.google-analytics.com", - "stats.g.doubleclick.net", }, "default-src": { self, @@ -57,7 +56,6 @@ var csp = map[string][]string{ "www.google.com", "feedback.googleusercontent.com", "www.googletagmanager.com", - "scone-pa.clients6.google.com" }, "img-src": { self, @@ -76,7 +74,6 @@ var csp = map[string][]string{ "'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M='", // Google Tag Manager Preview mode "'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo='", // Google Tag Manager Preview mode "www.google.com", - "apis.google.com", "www.gstatic.com", "support.google.com", "www.googletagmanager.com", diff --git a/go.dev/config.toml b/go.dev/config.toml index 9ed511e8..318bfa96 100644 --- a/go.dev/config.toml +++ b/go.dev/config.toml @@ -38,9 +38,7 @@ title = "go.dev" weight = -90 [[menu.main]] - identifier = "about" name = "About" - title = "About" url = "https://go.dev/about" weight = -80 @@ -103,7 +101,7 @@ title = "go.dev" identifier = "about" name = "About" title = "About" - url = "https://go.dev/about" + url = "https://go.dev//about" weight = -80 [[menu.footer]] diff --git a/go.dev/content/security/_index.md b/go.dev/content/security/_index.md deleted file mode 100644 index c220ede9..00000000 --- a/go.dev/content/security/_index.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: "Security" ---- diff --git a/go.dev/content/solutions/armut/index.md b/go.dev/content/solutions/armut/index.md deleted file mode 100644 index 66c1556b..00000000 --- a/go.dev/content/solutions/armut/index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -linkTitle: "How Armut Labs use Go " -description: "Learn about how Armut Labs reduced resource consumption and API response time after moving from C# and .net core to Go." -company: Armut -logoSrc: armut.png -series: Case Studies -link: https://labs.armut.com/how-we-decreased-one-of-our-apis-response-time-by-87-and-used-less-resources-ce847e83308 -inLandingPageGrid: true ---- diff --git a/go.dev/content/solutions/clis/index.md b/go.dev/content/solutions/clis/index.md index 041540cb..b059a156 100644 --- a/go.dev/content/solutions/clis/index.md +++ b/go.dev/content/solutions/clis/index.md @@ -113,9 +113,6 @@ goLibraries: - text: golang/glog url: https://pkg.go.dev/github.com/golang/glog?tab=overview desc: Leveled execution logs for Go - - text: go-prompt - url: https://pkg.go.dev/github.com/c-bata/go-prompt?tab=overview - desc: A library for building powerful interactive prompts, making it easier to build cross-platform command line tools using Go. --- ## Overview {#overview .sectionHeading} diff --git a/go.dev/data/security/foundations.yaml b/go.dev/data/security/foundations.yaml deleted file mode 100644 index 911925ab..00000000 --- a/go.dev/data/security/foundations.yaml +++ /dev/null @@ -1,39 +0,0 @@ -links: - - title: Secure by design - content: | -
      -
    • Memory safety and garbage collection prevent most common vulnerabilities
    • -
    • Safe by default APIs in the standard library
    • -
    • Use safe libraries from Google like github.com/google/safehtml
    • -
    - url: https://github.com/google/safehtml - icon: /images/icons/secure.svg - cta: Learn more - - title: Enterprise crypto - content: | -
      -
    • Included in the std library
    • -
    • Maintained by the Go team
    • -
    - url: https://www.google.com - icon: /images/icons/crypto.svg - cta: Learn more - - title: Supply chain security - content: | -
      -
    • Ecosystem of 3rd party modules with a culture of limited dependencies
    • -
    • Tamper detection via the Go checksum database
    • -
    • Availability via the Go module proxy
    • -
    - url: https://www.google.com - icon: /images/icons/supply_chain_security.svg - cta: Learn more - - title: Swiftly handle security issues - content: | -
      -
    • Report bugs directly to the Go team
    • -
    • Leverage community resources like Snyk and Nancy
    • -
    - url: https://www.google.com - icon: /images/icons/swift_issues.svg - cta: Learn more diff --git a/go.dev/data/security/getstarted.yaml b/go.dev/data/security/getstarted.yaml deleted file mode 100644 index 5047ce7f..00000000 --- a/go.dev/data/security/getstarted.yaml +++ /dev/null @@ -1,21 +0,0 @@ -links: - - title: Learn about the Module Mirror, Index, and Checksum Database - url: https://www.google.com - icon: /images/icons/module.svg - cta: Learn more - - title: Talk by Katie Hockman on Modules, Module Mirrors, and the Checksum Database - url: https://www.google.com - icon: /images/icons/talk.svg - cta: Watch now - - title: Discover the Go Crypto Package - url: https://www.google.com - icon: /images/icons/discover.svg - cta: Learn more - - title: Report a security bug in the Go project - url: https://www.google.com - icon: /images/icons/bug.svg - cta: Report bug - - title: Join the \#security and \#crypto channels on the Gophers slack - url: https://www.google.com - icon: /images/icons/slack.svg - cta: Join now diff --git a/go.dev/data/security/recentUpdates.yaml b/go.dev/data/security/recentUpdates.yaml deleted file mode 100644 index e9aecc0c..00000000 --- a/go.dev/data/security/recentUpdates.yaml +++ /dev/null @@ -1,43 +0,0 @@ -links: - - title: Title of post - content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. - url: https://www.google.com - cta: Read blog post - - title: Title of post - content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. - url: https://www.google.com - cta: Read blog post - - title: Title of post - content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. - url: https://www.google.com - cta: Read blog post - - title: Title of post - content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. - url: https://www.google.com - cta: Read blog post - - - title: Title of post - content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. - url: https://www.google.com - cta: Read blog post - - title: Title of post - content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. - url: https://www.google.com - cta: Read blog post - - title: Title of post - content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. - url: https://www.google.com - cta: Read blog post - - title: Title of post - content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. - url: https://www.google.com - cta: Read blog post - - title: Title of post - content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. - url: https://www.google.com - cta: Read blog post - - - title: Title of post - content: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna amet aliqua. - url: https://www.google.com - cta: Read blog post diff --git a/go.dev/layouts/_default/baseof.html b/go.dev/layouts/_default/baseof.html index 04a29ab7..e1fe9dd8 100644 --- a/go.dev/layouts/_default/baseof.html +++ b/go.dev/layouts/_default/baseof.html @@ -3,7 +3,11 @@ - + @@ -17,9 +21,14 @@ {{$stylesFP := $styles | fingerprint -}} {{end -}} - + + + - {{.Title}}{{if not .IsHome}} - {{.Site.Title}}{{end}} {{if (isset .Params "link") -}} @@ -62,7 +71,7 @@ {{- if not $currentPage.Site.IsServer}} {{- $url = $url | absURL}} {{- end}} -
  • +
  • {{.Name}}
  • {{- end}} diff --git a/go.dev/layouts/learn/section.html b/go.dev/layouts/learn/section.html index 39bbb494..aaad0c6c 100644 --- a/go.dev/layouts/learn/section.html +++ b/go.dev/layouts/learn/section.html @@ -24,7 +24,7 @@ rel="noopener" > Download - +
    @@ -61,7 +61,7 @@

    Guided learning journeys

    -
    +
      {{ range first 4 $.Site.Data.learn.guidedLearning.links }}
    • @@ -69,7 +69,7 @@
    • {{ end }}
    -
    +
    @@ -78,7 +78,7 @@

    Online learning

    -
    +
      {{ range first 4 $.Site.Data.learn.courses.links }}
    • @@ -86,7 +86,7 @@
    • {{ end }}
    -
    +
    @@ -95,7 +95,7 @@

    Google Cloud Self-Paced Labs

    -
    +
      {{ range first 4 $.Site.Data.learn.cloud.links }}
    • @@ -104,7 +104,7 @@
    • {{ end }}
    -
    +
    @@ -113,7 +113,7 @@

    Featured books

    -
    +
      {{ range first 5 $.Site.Data.learn.books.links }}
    • @@ -121,7 +121,7 @@
    • {{ end }}
    -
    +
    @@ -130,18 +130,18 @@

    In-person training

    -
    +
    -
    +
    diff --git a/go.dev/layouts/partials/security/card.html b/go.dev/layouts/partials/security/card.html deleted file mode 100644 index bff5cf6d..00000000 --- a/go.dev/layouts/partials/security/card.html +++ /dev/null @@ -1,36 +0,0 @@ -
    -
    - {{if .icon}} -
    - -
    - {{end}} -
    -
    {{.title}}
    - {{if .content}} -
    {{.content | safeHTML}}
    - {{end}} - -
    -
    -
    diff --git a/go.dev/layouts/security/section.html b/go.dev/layouts/security/section.html deleted file mode 100644 index 46201d19..00000000 --- a/go.dev/layouts/security/section.html +++ /dev/null @@ -1,223 +0,0 @@ -{{define "main"}} -
    -
    -
    -
    - {{ partial "breadcrumbs.html" . }} -

    Build secure applications with Go

    -

    - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. -

    -
    -
    - Go Gopher riding a motorcycle -
    -
    -
    -
    - -
    -
    -
    -
      - {{ range $.Site.Data.security.foundations.links }} -
    • - {{ partial "security/card.html" . }} -
    • - {{ end }} -
    -
    -
    -
    -
    -

    Coming Soon

    -
    -
    -
      -
    • Native support for fuzz testing, maybe OSS-Fuzz integration
    • -
    • Vulnerabilities database curated by the Go team, with low-noise auditing tools
    • -
    -
    -
    - Go Gopher riding a motorcycle -
    -
    -
    -
    - -
    -
    -
    -

    Recent Updates

    -
    -
    -
      - {{ range $.Site.Data.security.getstarted.links }} -
    • - {{ partial "security/card.html" . }} -
    • - {{ end }} -
    -
    -
    -
    - - -
    -
    -
    -

    Get Started

    -
    -
    -
      - {{ range $.Site.Data.security.recentUpdates.links }} -
    • - {{ partial "security/card.html" . }} -
    • - {{ end }} -
    -
    -
    -
    - - -{{end}} \ No newline at end of file diff --git a/go.dev/static/images/gophers/motorcycle.svg b/go.dev/static/images/gophers/motorcycle.svg index 5f84eb25..e05346e4 100644 --- a/go.dev/static/images/gophers/motorcycle.svg +++ b/go.dev/static/images/gophers/motorcycle.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/go.dev/static/images/icons/bug.svg b/go.dev/static/images/icons/bug.svg deleted file mode 100644 index 40a6aa6f..00000000 --- a/go.dev/static/images/icons/bug.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/go.dev/static/images/icons/crypto.svg b/go.dev/static/images/icons/crypto.svg deleted file mode 100644 index 45db17db..00000000 --- a/go.dev/static/images/icons/crypto.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/go.dev/static/images/icons/discover.svg b/go.dev/static/images/icons/discover.svg deleted file mode 100644 index 969fb72f..00000000 --- a/go.dev/static/images/icons/discover.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/go.dev/static/images/icons/module.svg b/go.dev/static/images/icons/module.svg deleted file mode 100644 index 197263bd..00000000 --- a/go.dev/static/images/icons/module.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/go.dev/static/images/icons/secure.svg b/go.dev/static/images/icons/secure.svg deleted file mode 100644 index be741e37..00000000 --- a/go.dev/static/images/icons/secure.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/go.dev/static/images/icons/slack.svg b/go.dev/static/images/icons/slack.svg deleted file mode 100644 index 3fbe849a..00000000 --- a/go.dev/static/images/icons/slack.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/go.dev/static/images/icons/supply_chain_security.svg b/go.dev/static/images/icons/supply_chain_security.svg deleted file mode 100644 index cb3378e6..00000000 --- a/go.dev/static/images/icons/supply_chain_security.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/go.dev/static/images/icons/swift_issues.svg b/go.dev/static/images/icons/swift_issues.svg deleted file mode 100644 index b6c019b5..00000000 --- a/go.dev/static/images/icons/swift_issues.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/go.dev/static/images/icons/talk.svg b/go.dev/static/images/icons/talk.svg deleted file mode 100644 index 4da864f5..00000000 --- a/go.dev/static/images/icons/talk.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/go.dev/static/images/learn/clis.png b/go.dev/static/images/learn/clis.png index 8fe27421..267ff73f 100644 Binary files a/go.dev/static/images/learn/clis.png and b/go.dev/static/images/learn/clis.png differ diff --git a/go.dev/static/images/learn/codecademy.png b/go.dev/static/images/learn/codecademy.png index 7c7c69c4..8de4dbfd 100644 Binary files a/go.dev/static/images/learn/codecademy.png and b/go.dev/static/images/learn/codecademy.png differ diff --git a/go.dev/static/images/learn/codelabs.png b/go.dev/static/images/learn/codelabs.png index cdf54597..c8dabae2 100644 Binary files a/go.dev/static/images/learn/codelabs.png and b/go.dev/static/images/learn/codelabs.png differ diff --git a/go.dev/static/images/learn/edureka.png b/go.dev/static/images/learn/edureka.png index 047f11a5..a047f5ed 100644 Binary files a/go.dev/static/images/learn/edureka.png and b/go.dev/static/images/learn/edureka.png differ diff --git a/go.dev/static/images/learn/exercism.png b/go.dev/static/images/learn/exercism.png index 2bc4bb79..a2fd1c33 100644 Binary files a/go.dev/static/images/learn/exercism.png and b/go.dev/static/images/learn/exercism.png differ diff --git a/go.dev/static/images/learn/gophercises.png b/go.dev/static/images/learn/gophercises.png index e2732eca..5adb4760 100644 Binary files a/go.dev/static/images/learn/gophercises.png and b/go.dev/static/images/learn/gophercises.png differ diff --git a/go.dev/static/images/learn/introducing-go-book.png b/go.dev/static/images/learn/introducing-go-book.png index 39e558bd..a24626db 100644 Binary files a/go.dev/static/images/learn/introducing-go-book.png and b/go.dev/static/images/learn/introducing-go-book.png differ diff --git a/go.dev/static/images/learn/qwiklabs.png b/go.dev/static/images/learn/qwiklabs.png index 68d9f581..dce02305 100644 Binary files a/go.dev/static/images/learn/qwiklabs.png and b/go.dev/static/images/learn/qwiklabs.png differ diff --git a/go.dev/static/images/learn/star-rating.png b/go.dev/static/images/learn/star-rating.png index e453a187..4cd252b6 100644 Binary files a/go.dev/static/images/learn/star-rating.png and b/go.dev/static/images/learn/star-rating.png differ diff --git a/go.dev/static/images/learn/web-dev.png b/go.dev/static/images/learn/web-dev.png index 8b3cb8d5..989357aa 100644 Binary files a/go.dev/static/images/learn/web-dev.png and b/go.dev/static/images/learn/web-dev.png differ diff --git a/go.dev/static/images/logos/armut.png b/go.dev/static/images/logos/armut.png deleted file mode 100644 index 83cc4570..00000000 Binary files a/go.dev/static/images/logos/armut.png and /dev/null differ diff --git a/go.dev/static/js/gtm.js b/go.dev/static/js/gtm.js deleted file mode 100644 index 9581df3d..00000000 --- a/go.dev/static/js/gtm.js +++ /dev/null @@ -1,10 +0,0 @@ -(function (w, d, s, l, i) { - w[l] = w[l] || []; - w[l].push({'gtm.start': new Date().getTime(), 'event': 'gtm.js'}); - var f = d.getElementsByTagName(s)[0], - j = d.createElement(s), - dl = l != 'dataLayer' ? '&l=' + l : ''; - j.async = true; - j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; - f.parentNode.insertBefore(j, f); -})(window, document, 'script', 'dataLayer', 'GTM-W8MVQXG'); diff --git a/go.dev/static/js/hats.js b/go.dev/static/js/hats.js deleted file mode 100644 index f0dbd0a4..00000000 --- a/go.dev/static/js/hats.js +++ /dev/null @@ -1,55 +0,0 @@ -(function () { - var cookieName = 'HaTS_BKT'; - var inBucket; - - var cookies = decodeURIComponent(document.cookie).split(';'); - - for (let i = 0; i < cookies.length; i++) { - var c = cookies[i]; - - while (c.charAt(0) == ' ') c = c.substring(1); - - if (c.indexOf(cookieName + '=') == 0) - inBucket = c.substring((cookieName + '=').length, c.length); - } - - if (typeof inBucket === 'undefined') { - inBucket = String(Math.random() < 1); // 0.03 - document.cookie = - cookieName + '=' + inBucket + '; path=/; max-age=2592000;'; - } - - if (inBucket === 'true') { - var shouldPrompt = Math.random() < 1; // 0.1 - if (shouldPrompt) { - document.cookie = cookieName + '=false ; path=/; max-age=2592000;'; - - var tag = document.createElement('script'); - tag.src = - 'https://www.gstatic.com/feedback/js/help/prod/service/lazy.min.js'; - tag.type = 'text/javascript'; - document.head.appendChild(tag); - - tag.onload = function () { - var helpApi = window.help.service.Lazy.create(0, { - apiKey: 'AIzaSyDfBPfajByU2G6RAjUf5sjkMSSLNTj7MMc', - locale: 'en-US', - }); - - helpApi.requestSurvey({ - triggerId: 'RLVVv5Lf10njVvnD1rP0QUpmtosS', - callback: function (requestSurveyCallbackParam) { - if (!requestSurveyCallbackParam.surveyData) { - return; - } - helpApi.presentSurvey({ - surveyData: requestSurveyCallbackParam.surveyData, - colorScheme: 1, // light - customZIndex: 10000, - }); - }, - }); - }; - } - } -})(); -- cgit v1.3 From f9535ea8162ea3bb21619701326587a6e9730c38 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Wed, 11 Nov 2020 13:39:47 -0500 Subject: [x/go.dev] Maintenance to go.dev - Adds HaTS - Adds a new library to CLIs - Adds the Armut case study - Fixes About navlink, now highlights with blue line when on About page. staging link: https://staging.go.dev/ Jira link: https://leftfieldlabs.atlassian.net/secure/RapidBoard.jspa?rapidView=250&projectKey=GD&modal=detail&selectedIssue=GD-160 Change-Id: I9ab68f0c8bccb1253b86266314857108a2d45a1a X-GoDev-Commit: edb8f85788d6b7119ab26b93a0a26507589bb002 --- go.dev/app.learn.yaml | 8 +-- go.dev/app.staging.learn.yaml | 8 +-- go.dev/app.staging.yaml | 8 +-- go.dev/app.yaml | 8 +-- go.dev/assets/css/styles.css | 68 +++++++++++++++++++++-- go.dev/cmd/gencsp/main.go | 3 + go.dev/config.toml | 4 +- go.dev/content/solutions/armut/index.md | 9 +++ go.dev/content/solutions/clis/index.md | 3 + go.dev/layouts/_default/baseof.html | 3 +- go.dev/layouts/partials/learn/card.html | 28 +++++----- go.dev/layouts/partials/learn/selfPacedCard.html | 2 +- go.dev/static/images/logos/armut.png | Bin 0 -> 15990 bytes go.dev/static/js/hats.js | 55 ++++++++++++++++++ 14 files changed, 168 insertions(+), 39 deletions(-) create mode 100644 go.dev/content/solutions/armut/index.md create mode 100644 go.dev/static/images/logos/armut.png create mode 100644 go.dev/static/js/hats.js diff --git a/go.dev/app.learn.yaml b/go.dev/app.learn.yaml index 2a4b4687..9d391273 100644 --- a/go.dev/app.learn.yaml +++ b/go.dev/app.learn.yaml @@ -8,7 +8,7 @@ handlers: upload: public/learn/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /(explore|learn) secure: always @@ -26,7 +26,7 @@ handlers: upload: public/(.*) http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html, special casing the trailing slash. - url: /(.*)/ @@ -34,7 +34,7 @@ handlers: upload: public/learn/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html - url: /(.*) @@ -42,7 +42,7 @@ handlers: upload: public/learn/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /.* secure: always diff --git a/go.dev/app.staging.learn.yaml b/go.dev/app.staging.learn.yaml index bc2a2ebd..a6847508 100644 --- a/go.dev/app.staging.learn.yaml +++ b/go.dev/app.staging.learn.yaml @@ -8,7 +8,7 @@ handlers: upload: public/learn/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /(explore|learn) secure: always @@ -26,7 +26,7 @@ handlers: upload: public/(.*) http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html, special casing the trailing slash. - url: /(.*)/ @@ -34,7 +34,7 @@ handlers: upload: public/learn/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html - url: /(.*) @@ -42,7 +42,7 @@ handlers: upload: public/learn/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /.* secure: always diff --git a/go.dev/app.staging.yaml b/go.dev/app.staging.yaml index b0ba090a..6627fb57 100644 --- a/go.dev/app.staging.yaml +++ b/go.dev/app.staging.yaml @@ -8,7 +8,7 @@ handlers: upload: public/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /(explore|learn) secure: always @@ -26,7 +26,7 @@ handlers: upload: public/(.*) http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html, special casing the trailing slash. - url: /(.*)/ @@ -34,7 +34,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html - url: /(.*) @@ -42,7 +42,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /.* secure: always diff --git a/go.dev/app.yaml b/go.dev/app.yaml index 159cd094..3e4fcb04 100644 --- a/go.dev/app.yaml +++ b/go.dev/app.yaml @@ -8,7 +8,7 @@ handlers: upload: public/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /(explore|learn) secure: always @@ -26,7 +26,7 @@ handlers: upload: public/(.*) http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html, special casing the trailing slash. - url: /(.*)/ @@ -34,7 +34,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html - url: /(.*) @@ -42,7 +42,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" - url: /.* secure: always diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index f1675ba8..100667eb 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -1990,12 +1990,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { line-height: 2.25rem; } -/* @media only screen and (min-width: 48rem) { - .Learn-guided .Learn-cardList { - grid-template-columns: repeat(2, 1fr); - } -} */ - .Learn-selfPaced .Learn-card .Card-content { justify-content: space-between; } @@ -2228,6 +2222,68 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } } +.Learn-tile a { + width: 100%; +} + +.Learn-tileList { + display: grid; + gap: 2rem; + grid-template-columns: repeat(2, minmax(0, 1fr)); + list-style: none; + padding: 0; +} +@media only screen and (min-width: 38rem) { + .Learn-tileList { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } +} +@media only screen and (min-width: 48rem) { + .Learn-tileList { + justify-content: space-between; + } + .Learn-tileList { + column-gap: 3rem; + } +} +.Learn-tile { + display: flex; + flex-wrap: wrap; + justify-content: center; +} +.Learn-tile a { + color: #3c4043; +} +.Learn-tileTitle { + display: block; + font-size: 0.75rem; + font-style: normal; + font-weight: normal; + letter-spacing: 0.01rem; + line-height: 0.875rem; + margin: 1.5rem auto 0; + overflow-wrap: break-word; + text-align: center; +} +.Learn-tileThumbnail { + align-items: center; + background-color: #fff; + border-radius: 0.3125rem; + box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); + display: flex; + justify-content: center; + margin: auto; + width: 100%; +} +.Learn-tileThumbnail img { + max-height: 100%; + max-width: 100%; +} +.Learn-tileThumbnail--book img { + max-height: 100%; + max-width: 100%; +} + .Solutions-title, .Solutions-useCases, .Solutions-caseStudies { diff --git a/go.dev/cmd/gencsp/main.go b/go.dev/cmd/gencsp/main.go index 14070c97..d3175929 100644 --- a/go.dev/cmd/gencsp/main.go +++ b/go.dev/cmd/gencsp/main.go @@ -33,6 +33,7 @@ var csp = map[string][]string{ "connect-src": { "https://golang.org", "www.google-analytics.com", + "stats.g.doubleclick.net", }, "default-src": { self, @@ -56,6 +57,7 @@ var csp = map[string][]string{ "www.google.com", "feedback.googleusercontent.com", "www.googletagmanager.com", + "scone-pa.clients6.google.com", }, "img-src": { self, @@ -74,6 +76,7 @@ var csp = map[string][]string{ "'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M='", // Google Tag Manager Preview mode "'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo='", // Google Tag Manager Preview mode "www.google.com", + "apis.google.com", "www.gstatic.com", "support.google.com", "www.googletagmanager.com", diff --git a/go.dev/config.toml b/go.dev/config.toml index 318bfa96..9ed511e8 100644 --- a/go.dev/config.toml +++ b/go.dev/config.toml @@ -38,7 +38,9 @@ title = "go.dev" weight = -90 [[menu.main]] + identifier = "about" name = "About" + title = "About" url = "https://go.dev/about" weight = -80 @@ -101,7 +103,7 @@ title = "go.dev" identifier = "about" name = "About" title = "About" - url = "https://go.dev//about" + url = "https://go.dev/about" weight = -80 [[menu.footer]] diff --git a/go.dev/content/solutions/armut/index.md b/go.dev/content/solutions/armut/index.md new file mode 100644 index 00000000..b60ac5ca --- /dev/null +++ b/go.dev/content/solutions/armut/index.md @@ -0,0 +1,9 @@ +--- +linkTitle: "How Armut Labs use Go " +description: "Learn about how Armut Labs reduced resource consumption and API response time after moving from C# and .net core to Go." +company: Armut +logoSrc: armut.png +series: Case Studies +link: https://labs.armut.com/how-we-decreased-one-of-our-apis-response-time-by-87-and-used-less-resources-ce847e83308 +inLandingPageGrid: false +--- diff --git a/go.dev/content/solutions/clis/index.md b/go.dev/content/solutions/clis/index.md index b059a156..041540cb 100644 --- a/go.dev/content/solutions/clis/index.md +++ b/go.dev/content/solutions/clis/index.md @@ -113,6 +113,9 @@ goLibraries: - text: golang/glog url: https://pkg.go.dev/github.com/golang/glog?tab=overview desc: Leveled execution logs for Go + - text: go-prompt + url: https://pkg.go.dev/github.com/c-bata/go-prompt?tab=overview + desc: A library for building powerful interactive prompts, making it easier to build cross-platform command line tools using Go. --- ## Overview {#overview .sectionHeading} diff --git a/go.dev/layouts/_default/baseof.html b/go.dev/layouts/_default/baseof.html index e1fe9dd8..92fc3f3b 100644 --- a/go.dev/layouts/_default/baseof.html +++ b/go.dev/layouts/_default/baseof.html @@ -29,6 +29,7 @@ })(window,document,'script','dataLayer','GTM-W8MVQXG'); + {{.Title}}{{if not .IsHome}} - {{.Site.Title}}{{end}} {{if (isset .Params "link") -}} @@ -71,7 +72,7 @@ {{- if not $currentPage.Site.IsServer}} {{- $url = $url | absURL}} {{- end}} -
  • +
  • {{.Name}}
  • {{- end}} diff --git a/go.dev/layouts/partials/learn/card.html b/go.dev/layouts/partials/learn/card.html index f1545aa0..a53dedcc 100644 --- a/go.dev/layouts/partials/learn/card.html +++ b/go.dev/layouts/partials/learn/card.html @@ -1,16 +1,16 @@
    - -
    - {{if .thumbnail}} -
    - {{end}} -
    diff --git a/go.dev/layouts/partials/learn/selfPacedCard.html b/go.dev/layouts/partials/learn/selfPacedCard.html index ea6769f6..520dc857 100644 --- a/go.dev/layouts/partials/learn/selfPacedCard.html +++ b/go.dev/layouts/partials/learn/selfPacedCard.html @@ -4,7 +4,7 @@ {{if .thumbnail}}
    {{end}}
    diff --git a/go.dev/static/images/logos/armut.png b/go.dev/static/images/logos/armut.png new file mode 100644 index 00000000..83cc4570 Binary files /dev/null and b/go.dev/static/images/logos/armut.png differ diff --git a/go.dev/static/js/hats.js b/go.dev/static/js/hats.js new file mode 100644 index 00000000..5dc4213c --- /dev/null +++ b/go.dev/static/js/hats.js @@ -0,0 +1,55 @@ +(function () { + var cookieName = 'HaTS_BKT'; + var inBucket; + + var cookies = decodeURIComponent(document.cookie).split(';'); + + for (let i = 0; i < cookies.length; i++) { + var c = cookies[i]; + + while (c.charAt(0) == ' ') c = c.substring(1); + + if (c.indexOf(cookieName + '=') == 0) + inBucket = c.substring((cookieName + '=').length, c.length); + } + + if (typeof inBucket === 'undefined') { + inBucket = String(Math.random() < 0.03); + document.cookie = + cookieName + '=' + inBucket + '; path=/; max-age=2592000;'; + } + + if (inBucket === 'true') { + var shouldPrompt = Math.random() < 0.1; + if (shouldPrompt) { + document.cookie = cookieName + '=false ; path=/; max-age=2592000;'; + + var tag = document.createElement('script'); + tag.src = + 'https://www.gstatic.com/feedback/js/help/prod/service/lazy.min.js'; + tag.type = 'text/javascript'; + document.head.appendChild(tag); + + tag.onload = function () { + var helpApi = window.help.service.Lazy.create(0, { + apiKey: 'AIzaSyDfBPfajByU2G6RAjUf5sjkMSSLNTj7MMc', + locale: 'en-US', + }); + + helpApi.requestSurvey({ + triggerId: 'RLVVv5Lf10njVvnD1rP0QUpmtosS', + callback: function (requestSurveyCallbackParam) { + if (!requestSurveyCallbackParam.surveyData) { + return; + } + helpApi.presentSurvey({ + surveyData: requestSurveyCallbackParam.surveyData, + colorScheme: 1, // light + customZIndex: 10000, + }); + }, + }); + }; + } + } +})(); -- cgit v1.3 From e0173336287c5adbe1b105bbb531b9acafb23709 Mon Sep 17 00:00:00 2001 From: Sean Harrington Date: Mon, 7 Dec 2020 14:06:44 -0500 Subject: [x/go.dev] Maintenance to go.dev - Add Riot Games case study - Add additional quotes to the home page quote carousel - Update broken link 'Start Here' at bottom of case studies page - remove Grail logo from homepage staging link: https://staging.go.dev/ JIRA links: - https://leftfieldlabs.atlassian.net/browse/GD-186 - https://leftfieldlabs.atlassian.net/browse/GD-187 - https://leftfieldlabs.atlassian.net/browse/GD-188 - https://leftfieldlabs.atlassian.net/browse/GD-189 Change-Id: I88da54c9a7dcbc17e206fdf7c0a0a47911895770 X-GoDev-Commit: c991a9ed7a604d2cd33ee12bbd75ea8cce586632 --- go.dev/assets/css/styles.css | 4 ++-- go.dev/content/solutions/grail/index.md | 2 +- go.dev/content/solutions/riotgames/index.md | 9 ++++++++ go.dev/content/solutions/riotgames/riotgames.png | Bin 0 -> 110393 bytes go.dev/data/testimonials.yaml | 25 ++++++++++++++++++++++- go.dev/layouts/solutions/section.html | 2 +- go.dev/static/images/logos/riotgames.png | Bin 0 -> 110393 bytes 7 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 go.dev/content/solutions/riotgames/index.md create mode 100644 go.dev/content/solutions/riotgames/riotgames.png create mode 100644 go.dev/static/images/logos/riotgames.png diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index 100667eb..b12049ba 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -337,11 +337,11 @@ h6 { } .Header-menuItem--active a:link, .Header-menuItem--active a:visited { - border-top-color: #00add8; + border-bottom-color: #00add8; font-weight: bold; } .Header-menuItem a:hover { - border-top-color: #ce3262; + border-bottom-color: #fff; color: #3e4042; } .Header-navOpen { diff --git a/go.dev/content/solutions/grail/index.md b/go.dev/content/solutions/grail/index.md index 3997f36f..a0df8dca 100644 --- a/go.dev/content/solutions/grail/index.md +++ b/go.dev/content/solutions/grail/index.md @@ -10,5 +10,5 @@ logoSrc: grail.png series: Case Studies link: https://medium.com/grail-eng/bigslice-a-cluster-computing-system-for-go-7e03acd2419b -inLandingPageGrid: true +inLandingPageGrid: false --- \ No newline at end of file diff --git a/go.dev/content/solutions/riotgames/index.md b/go.dev/content/solutions/riotgames/index.md new file mode 100644 index 00000000..a9e151e1 --- /dev/null +++ b/go.dev/content/solutions/riotgames/index.md @@ -0,0 +1,9 @@ +--- +linkTitle: "Riot Games - Leveraging Golang for Game Development and Operations" +description: "Learn how Riot uses Go to develop, deploy, and operate backend microserves at scale–globally. They share thier experience across use cases, with specific examples, and speak to the value of the gopher community." +company: Riot Games +logoSrc: riotgames.png +series: Case Studies +link: https://technology.riotgames.com/news/leveraging-golang-game-development-and-operations +inLandingPageGrid: true +--- \ No newline at end of file diff --git a/go.dev/content/solutions/riotgames/riotgames.png b/go.dev/content/solutions/riotgames/riotgames.png new file mode 100644 index 00000000..facb585f Binary files /dev/null and b/go.dev/content/solutions/riotgames/riotgames.png differ diff --git a/go.dev/data/testimonials.yaml b/go.dev/data/testimonials.yaml index 2e5e99f5..d381f6b5 100644 --- a/go.dev/data/testimonials.yaml +++ b/go.dev/data/testimonials.yaml @@ -29,4 +29,27 @@ all: containerised with ease, making it much simpler to build and deploy. These attributes make Go an ideal choice for companies building microservices, as you can easily deploy into a highly available and - scalable environment such as Kubernetes.” \ No newline at end of file + scalable environment such as Kubernetes.” +- name: Bala Natarajan + title: Sr. Director of Engineering, Developer Experience + company: PayPal + quote: |- + "In our tightly managed environments where we run Go code, + we have seen a CPU reduction of approximately 10% + with cleaner and maintainable code." +- name: Benjamin Cane + title: Vice President and Principal Engineer + company: American Express + quote: |- + "Tooling has always been a problem with our legacy code base... but we have + found that Go has excellent tooling, plus built-in testing, benchmarking, + and profiling frameworks. It is easy to write efficient and resilient + applications. After working on Go, most of our developers don't want + to go back to other languages." +- name: John Biggs and Ben Popper + title: + company: Stack Overflow + quote: |- + "...when a programming language is designed for exactly the environment most + of us use right now—scalable, cloud-based servers that are optimized for + performance—a lot can go right." \ No newline at end of file diff --git a/go.dev/layouts/solutions/section.html b/go.dev/layouts/solutions/section.html index e8beafdc..20d64dcf 100644 --- a/go.dev/layouts/solutions/section.html +++ b/go.dev/layouts/solutions/section.html @@ -167,7 +167,7 @@ Start here. diff --git a/go.dev/static/images/logos/riotgames.png b/go.dev/static/images/logos/riotgames.png new file mode 100644 index 00000000..facb585f Binary files /dev/null and b/go.dev/static/images/logos/riotgames.png differ -- cgit v1.3 From ce0efef06a59cfa7929785bed2e5cecbeb9f4979 Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Thu, 10 Dec 2020 15:34:29 -0500 Subject: [x/go.dev] content/about.md: add information about custom links Refer to the issue that describes how to create custom links that appear in the right sidebar. Change-Id: I75775bb99f9ab44f51c3802541b92d4835301c8e X-GoDev-Commit: 28e1cdcc70d609ee3f8e31dd7a31a9e333c604e8 --- go.dev/content/about.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/go.dev/content/about.md b/go.dev/content/about.md index d0f15560..312750eb 100644 --- a/go.dev/content/about.md +++ b/go.dev/content/about.md @@ -45,6 +45,12 @@ The pkg.go.dev badge provides a way for Go users to learn about the pkg.go.dev p [![PkgGoDev](https://pkg.go.dev/badge/golang.org/x/pkgsite)](https://pkg.go.dev/golang.org/x/pkgsite) +## Adding links + +You can add links to your README files and package documentation that will be +shown on the right side of the pkg.go.dev page. For details, see [this +issue](https://golang.org/issue/42968). + ## Keyboard Shortcuts There are keyboard shortcuts for navigating package documentation pages. Type '?' on a package page for help. -- cgit v1.3 From dd491678bb40cbe27fb740e2aa579dc1ffd88eb2 Mon Sep 17 00:00:00 2001 From: Jamal Carvalho Date: Mon, 14 Dec 2020 14:15:12 -0500 Subject: [x/go.dev] content/about.md: add best practices section Adds best practices section to be linked to from the right sidebar on pkg.go.dev Change-Id: I2ba4ab98c89c13257447f1306294838026a4cab4 X-GoDev-Commit: 0984db241fdfdb1d4e65c87b1afe63042a3a9c48 --- go.dev/content/about.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/go.dev/content/about.md b/go.dev/content/about.md index 312750eb..65af86e8 100644 --- a/go.dev/content/about.md +++ b/go.dev/content/about.md @@ -39,6 +39,24 @@ It’s important to write a good summary of the package in the first sentence of Pkg.go.dev displays the GOOS and GOARCH for the documentation displayed at the bottom of the documentation page. +## Best practices + +Pkg.go.dev surfaces details about Go packages and modules in order to help provide guidelines for best practices with Go. + +Here are the details we surface: + +* Has go.mod file + * The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go. A module version is defined by a tree of source files, with a go.mod file in its root. [More information about the go.mod file](https://golang.org/cmd/go/#hdr-The_go_mod_file). + +* Permissive license + * Permissive licenses place minimal restrictions on how software can be used, modified, and redistributed. For more information on how pkg.go.dev determines if a license is permissive, see our [license policy](http://pkg.go.dev/license-policy). + +* Tagged version + * When the go get command resolves modules by default it prioritizes tagged versions. When no tagged versions exist, go get looks up the latest known commit. Modules with tagged versions give importers more predictable builds. See [semver.org](https://semver.org) and [Keeping Your Modules Compatible](https://blog.golang.org/module-compatibility) for more information. + +* Stable version + * Projects at v0 are assumed to be experimental. When a project reaches a stable version — major version v1 or higher — breaking changes must be done in a new major version. Stable versions give developers the confidence that breaking changes won’t occur when they upgrade a package to the latest minor version. See [Go Modules: v2 and Beyond](https://blog.golang.org/v2-go-modules) for more information. + ## Creating a badge The pkg.go.dev badge provides a way for Go users to learn about the pkg.go.dev page associated with a given Go package or module. You can create a badge using the [badge generation tool](https://pkg.go.dev/badge). The tool will generate html and markdown snippets that you can use on your project website or in a README file. -- cgit v1.3 From 906b3b288735d260f64762f5fa30bbc067677926 Mon Sep 17 00:00:00 2001 From: Jamal Carvalho Date: Thu, 14 Jan 2021 18:27:10 -0500 Subject: [x/go.dev] cmd/gencsp: add gstatic.com to csp hosts Adding the gstatic host with no subdomain because the HaTS survey is loading stylesheets from gstatic.com instead of www.gstatic.com. Change-Id: I665286496881d53a5f53ce1de3b5319b0b7bdd28 X-GoDev-Commit: 0b07f9e5a3bba32cb96c824acb02b8c05347c805 --- go.dev/cmd/gencsp/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/go.dev/cmd/gencsp/main.go b/go.dev/cmd/gencsp/main.go index d3175929..99273eb8 100644 --- a/go.dev/cmd/gencsp/main.go +++ b/go.dev/cmd/gencsp/main.go @@ -50,6 +50,7 @@ var csp = map[string][]string{ "fonts.googleapis.com", "feedback.googleusercontent.com", "www.gstatic.com", + "gstatic.com", "tagmanager.google.com", }, "frame-src": { @@ -65,6 +66,7 @@ var csp = map[string][]string{ "www.google-analytics.com", "ssl.gstatic.com", "www.gstatic.com", + "gstatic.com", "data: *", }, "object-src": { @@ -78,6 +80,7 @@ var csp = map[string][]string{ "www.google.com", "apis.google.com", "www.gstatic.com", + "gstatic.com", "support.google.com", "www.googletagmanager.com", "www.google-analytics.com", -- cgit v1.3 From ad5c68382cd3b508834b7e2c2f8d862d2df0df83 Mon Sep 17 00:00:00 2001 From: Jamal Carvalho Date: Fri, 15 Jan 2021 14:33:18 -0500 Subject: [x/go.dev] app.yaml: generate updated csp header Change-Id: If0e629d747bb6acbeb38f849c3eea3869b942563 X-GoDev-Commit: 124f227e8e290b41d469ab2cf09ea90162086d90 --- go.dev/app.learn.yaml | 8 ++++---- go.dev/app.staging.learn.yaml | 8 ++++---- go.dev/app.staging.yaml | 8 ++++---- go.dev/app.yaml | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/go.dev/app.learn.yaml b/go.dev/app.learn.yaml index 9d391273..1d9191cb 100644 --- a/go.dev/app.learn.yaml +++ b/go.dev/app.learn.yaml @@ -8,7 +8,7 @@ handlers: upload: public/learn/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com gstatic.com tagmanager.google.com;" - url: /(explore|learn) secure: always @@ -26,7 +26,7 @@ handlers: upload: public/(.*) http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html, special casing the trailing slash. - url: /(.*)/ @@ -34,7 +34,7 @@ handlers: upload: public/learn/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html - url: /(.*) @@ -42,7 +42,7 @@ handlers: upload: public/learn/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com gstatic.com tagmanager.google.com;" - url: /.* secure: always diff --git a/go.dev/app.staging.learn.yaml b/go.dev/app.staging.learn.yaml index a6847508..5c45a326 100644 --- a/go.dev/app.staging.learn.yaml +++ b/go.dev/app.staging.learn.yaml @@ -8,7 +8,7 @@ handlers: upload: public/learn/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com gstatic.com tagmanager.google.com;" - url: /(explore|learn) secure: always @@ -26,7 +26,7 @@ handlers: upload: public/(.*) http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html, special casing the trailing slash. - url: /(.*)/ @@ -34,7 +34,7 @@ handlers: upload: public/learn/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html - url: /(.*) @@ -42,7 +42,7 @@ handlers: upload: public/learn/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com gstatic.com tagmanager.google.com;" - url: /.* secure: always diff --git a/go.dev/app.staging.yaml b/go.dev/app.staging.yaml index 6627fb57..58da4445 100644 --- a/go.dev/app.staging.yaml +++ b/go.dev/app.staging.yaml @@ -8,7 +8,7 @@ handlers: upload: public/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com gstatic.com tagmanager.google.com;" - url: /(explore|learn) secure: always @@ -26,7 +26,7 @@ handlers: upload: public/(.*) http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html, special casing the trailing slash. - url: /(.*)/ @@ -34,7 +34,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html - url: /(.*) @@ -42,7 +42,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com gstatic.com tagmanager.google.com;" - url: /.* secure: always diff --git a/go.dev/app.yaml b/go.dev/app.yaml index 3e4fcb04..f1787e8d 100644 --- a/go.dev/app.yaml +++ b/go.dev/app.yaml @@ -8,7 +8,7 @@ handlers: upload: public/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com gstatic.com tagmanager.google.com;" - url: /(explore|learn) secure: always @@ -26,7 +26,7 @@ handlers: upload: public/(.*) http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html, special casing the trailing slash. - url: /(.*)/ @@ -34,7 +34,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com gstatic.com tagmanager.google.com;" # Handle arbitrary paths with an index.html - url: /(.*) @@ -42,7 +42,7 @@ handlers: upload: public/(.*)/index.html http_headers: # Please use cmd/gencsp to generate this. - Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com tagmanager.google.com;" + Content-Security-Policy: "connect-src https://golang.org www.google-analytics.com stats.g.doubleclick.net; default-src 'self'; font-src 'self' fonts.googleapis.com fonts.gstatic.com data:; frame-ancestors 'none'; frame-src 'self' www.google.com feedback.googleusercontent.com www.googletagmanager.com scone-pa.clients6.google.com; img-src 'self' www.google.com www.google-analytics.com ssl.gstatic.com www.gstatic.com gstatic.com data: *; object-src 'none'; script-src 'self' 'sha256-n6OdwTrm52KqKm6aHYgD0TFUdMgww4a0GQlIAVrMzck=' 'sha256-4ryYrf7Y5daLOBv0CpYtyBIcJPZkRD2eBPdfqsN3r1M=' 'sha256-sVKX08+SqOmnWhiySYk3xC7RDUgKyAkmbXV2GWts4fo=' www.google.com apis.google.com www.gstatic.com gstatic.com support.google.com www.googletagmanager.com www.google-analytics.com ssl.google-analytics.com tagmanager.google.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com feedback.googleusercontent.com www.gstatic.com gstatic.com tagmanager.google.com;" - url: /.* secure: always -- cgit v1.3 From 2bec037102532826c56ba423b417056d7380a30e Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Tue, 19 Jan 2021 09:15:43 -0500 Subject: [x/go.dev] content/about.md: use "redistributable" instead of "permissive" For golang/go#43758 Change-Id: I322b7f44dba96e881d7b2e49fef9dcde71fbd65b X-GoDev-Commit: 176f5808de6b97eea3d4b04dedb421ac8ab03857 --- go.dev/content/about.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go.dev/content/about.md b/go.dev/content/about.md index 65af86e8..ca37c783 100644 --- a/go.dev/content/about.md +++ b/go.dev/content/about.md @@ -48,8 +48,8 @@ Here are the details we surface: * Has go.mod file * The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go. A module version is defined by a tree of source files, with a go.mod file in its root. [More information about the go.mod file](https://golang.org/cmd/go/#hdr-The_go_mod_file). -* Permissive license - * Permissive licenses place minimal restrictions on how software can be used, modified, and redistributed. For more information on how pkg.go.dev determines if a license is permissive, see our [license policy](http://pkg.go.dev/license-policy). +* Redistributable license + * Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed. For more information on how pkg.go.dev determines if a license is redistributable, see our [license policy](http://pkg.go.dev/license-policy). * Tagged version * When the go get command resolves modules by default it prioritizes tagged versions. When no tagged versions exist, go get looks up the latest known commit. Modules with tagged versions give importers more predictable builds. See [semver.org](https://semver.org) and [Keeping Your Modules Compatible](https://blog.golang.org/module-compatibility) for more information. -- cgit v1.3 From bb7addaa51aa328c597ce21ec14c644701b9195f Mon Sep 17 00:00:00 2001 From: Jamal Carvalho Date: Mon, 25 Jan 2021 16:58:33 -0500 Subject: [x/go.dev] static/js: add HaTS trigger to go download links Adds trigger for an additional HaTS survey that may be requested after a user clicks any download link on the go.dev home page. Change-Id: I1311b0c481667588876731e504106641d8a223d3 X-GoDev-Commit: 43fa08407a8d7643d151cc4cc0bbc9e3a21f6565 --- go.dev/static/js/hats.js | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/go.dev/static/js/hats.js b/go.dev/static/js/hats.js index 5dc4213c..1a3e5dea 100644 --- a/go.dev/static/js/hats.js +++ b/go.dev/static/js/hats.js @@ -1,5 +1,4 @@ -(function () { - var cookieName = 'HaTS_BKT'; +function requestHaTs(cookieName, triggerId) { var inBucket; var cookies = decodeURIComponent(document.cookie).split(';'); @@ -37,7 +36,7 @@ }); helpApi.requestSurvey({ - triggerId: 'RLVVv5Lf10njVvnD1rP0QUpmtosS', + triggerId: triggerId, callback: function (requestSurveyCallbackParam) { if (!requestSurveyCallbackParam.surveyData) { return; @@ -52,4 +51,24 @@ }; } } +} + +(function () { + // HaTS - go.dev + requestHaTs('HaTS_BKT', 'RLVVv5Lf10njVvnD1rP0QUpmtosS'); + + // All download links on the go.dev homepage may trigger a survey. + [ + document.querySelector('.js-downloadBtn'), + document.querySelector('.js-downloadWin'), + document.querySelector('.js-downloadMac'), + document.querySelector('.js-downloadLinux'), + ].forEach(function (el) { + if (el) { + el.addEventListener('click', () => { + // HaTS - Core Go distribution + requestHaTs('HaTS_BKT_DIST', 'dz6fkRxyz0njVvnD1rP0QxCXzhSX'); + }); + } + }); })(); -- cgit v1.3 From e1921b5af6378294ec005722f191081ce39e8840 Mon Sep 17 00:00:00 2001 From: Jamal Carvalho Date: Tue, 26 Jan 2021 10:41:48 -0500 Subject: [x/go.dev] layouts/_default: move hats.js script load to end of document The hats.js script adds an event listener to the DOM so it must be loaded after the document has been parsed. Change-Id: I29485d9b3a04be4d5dbdb374aa521acf92ae7573 X-GoDev-Commit: 4e9d5170baca7b3bfb009b7316ace46c120bc91b --- go.dev/layouts/_default/baseof.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.dev/layouts/_default/baseof.html b/go.dev/layouts/_default/baseof.html index 92fc3f3b..c4acef86 100644 --- a/go.dev/layouts/_default/baseof.html +++ b/go.dev/layouts/_default/baseof.html @@ -29,7 +29,6 @@ })(window,document,'script','dataLayer','GTM-W8MVQXG'); - {{.Title}}{{if not .IsHome}} - {{.Site.Title}}{{end}} {{if (isset .Params "link") -}} @@ -184,6 +183,7 @@ + \ No newline at end of file -- cgit v1.3 From 2f5d4d5147ca636eb6bfad2ec5930bd411d3c7dd Mon Sep 17 00:00:00 2001 From: Jamal Carvalho Date: Tue, 26 Jan 2021 11:36:39 -0500 Subject: [x/go.dev] content/js: adjust sample rates for HaTS trigger Refactors HaTS trigger function to accept variable sample rate sizes. Updates Core Go distribution rate to bucket 10% of sessions and prompt 100% of bucketed sessions. Change-Id: If5295e007efcb88bdb2f350f923793c2e84a9c62 X-GoDev-Commit: eac142a4db32717a8a3a71eac90df8e2fc20bf63 --- go.dev/static/js/hats.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/go.dev/static/js/hats.js b/go.dev/static/js/hats.js index 1a3e5dea..28da81a9 100644 --- a/go.dev/static/js/hats.js +++ b/go.dev/static/js/hats.js @@ -1,4 +1,4 @@ -function requestHaTs(cookieName, triggerId) { +function requestHaTs(cookieName, triggerId, bucketSample, promptSample) { var inBucket; var cookies = decodeURIComponent(document.cookie).split(';'); @@ -13,13 +13,13 @@ function requestHaTs(cookieName, triggerId) { } if (typeof inBucket === 'undefined') { - inBucket = String(Math.random() < 0.03); + inBucket = String(Math.random() < bucketSample); document.cookie = cookieName + '=' + inBucket + '; path=/; max-age=2592000;'; } if (inBucket === 'true') { - var shouldPrompt = Math.random() < 0.1; + var shouldPrompt = Math.random() < promptSample; if (shouldPrompt) { document.cookie = cookieName + '=false ; path=/; max-age=2592000;'; @@ -55,7 +55,7 @@ function requestHaTs(cookieName, triggerId) { (function () { // HaTS - go.dev - requestHaTs('HaTS_BKT', 'RLVVv5Lf10njVvnD1rP0QUpmtosS'); + requestHaTs('HaTS_BKT', 'RLVVv5Lf10njVvnD1rP0QUpmtosS', 0.03, 0.1); // All download links on the go.dev homepage may trigger a survey. [ @@ -67,7 +67,7 @@ function requestHaTs(cookieName, triggerId) { if (el) { el.addEventListener('click', () => { // HaTS - Core Go distribution - requestHaTs('HaTS_BKT_DIST', 'dz6fkRxyz0njVvnD1rP0QxCXzhSX'); + requestHaTs('HaTS_BKT_DIST', 'dz6fkRxyz0njVvnD1rP0QxCXzhSX', 0.1, 1); }); } }); -- cgit v1.3 From 94c79bb6199fe1d86f14fdaae43617f3da9410a5 Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Mon, 25 Jan 2021 17:22:31 -0500 Subject: [x/go.dev] content/about.md: describe source linking Explain how pkg.go.dev links symbols to source code, and describe how the user can add those links. Change-Id: Ia3c60737c16042497a46f0c75a618f929a4a8e9c X-GoDev-Commit: b763616ed0ca2ccbbd59ab3f9808c8a095ccf167 --- go.dev/content/about.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/go.dev/content/about.md b/go.dev/content/about.md index ca37c783..94b22914 100644 --- a/go.dev/content/about.md +++ b/go.dev/content/about.md @@ -39,6 +39,23 @@ It’s important to write a good summary of the package in the first sentence of Pkg.go.dev displays the GOOS and GOARCH for the documentation displayed at the bottom of the documentation page. +Most of the time, pkg.go.dev can determine the location of a package's source +files, and provide links from symbols in the documentation to their definitions +in the source. If your package's source is not linked, try one of the following +two approaches. + +If pkg.go.dev finds a `go-source` meta tag on your site that follows the +[specified format](https://github.com/golang/gddo/wiki/Source-Code-Links), it +can often determine the right links, even though the format doesn't take +versioning into account. + +If that doesn't work, you will need to add your repo or code-hosting site to +pkg.go.dev's list of patterns (see [Go Issue 40477](https://golang.org/issues/40477) for context). +Read about how to [contribute to pkg.go.dev](https://go.googlesource.com/pkgsite#contributing), +then produce a CL that adds a pattern to the +[`internal/source`](https://go.googlesource.com/pkgsite/+/refs/heads/master/internal/source/source.go) +package. + ## Best practices Pkg.go.dev surfaces details about Go packages and modules in order to help provide guidelines for best practices with Go. -- cgit v1.3 From 78721852afb8dc52f2839dd983777b89c04d89fa Mon Sep 17 00:00:00 2001 From: Jamal Carvalho Date: Thu, 25 Feb 2021 10:51:45 -0500 Subject: [x/go.dev] static/js: update HaTS sample rates Adjusting the sample rates for HaTS to increase the number of responses. Change-Id: Iac4cf124c728fad08db160aecb2d90ae2a793fde X-GoDev-Commit: ea5dffd101800193c9a14c73a6ba6b22fcadace2 --- go.dev/static/js/hats.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.dev/static/js/hats.js b/go.dev/static/js/hats.js index 28da81a9..d4ac8242 100644 --- a/go.dev/static/js/hats.js +++ b/go.dev/static/js/hats.js @@ -55,7 +55,7 @@ function requestHaTs(cookieName, triggerId, bucketSample, promptSample) { (function () { // HaTS - go.dev - requestHaTs('HaTS_BKT', 'RLVVv5Lf10njVvnD1rP0QUpmtosS', 0.03, 0.1); + requestHaTs('HaTS_BKT', 'RLVVv5Lf10njVvnD1rP0QUpmtosS', 0.4, 0.5); // All download links on the go.dev homepage may trigger a survey. [ -- cgit v1.3 From 40f4908e4524cf7719f5bfc4e080608c1b56973b Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 26 Feb 2021 14:24:51 -0500 Subject: [x/go.dev] layouts/shortcodes: fix gopher.html template parse errors This doesn't make sense, because each (...) is a bool, so the first cannot be called as a function taking the second. {{if (eq $gopher "front") (eq $gopher "sticker1")}} I am not sure whether the current web site works with some older versions of Hugo, but it doesn't work on my machine with the both v0.59.1 and the latest v0.81.0. It just looks like it's always been broken, but then I'm confused about how the web site itself is running. In any event, this CL fixes the condition, which is clearly meant to be an "or" of those two: {{if or (eq $gopher "front") (eq $gopher "sticker1")}} But this is needlessly complex too, since eq will do that for us: {{if eq $gopher "front" "sticker1"}} Fixed that condition and simplified a few others. Now hugo runs successfully. Change-Id: I02568c4e9331c71107488d44423535186e73e809 X-GoDev-Commit: 189cbf4f05b7bb855a3dc6f95c0acc57a2ba1434 --- go.dev/layouts/shortcodes/gopher.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/go.dev/layouts/shortcodes/gopher.html b/go.dev/layouts/shortcodes/gopher.html index dfde60e0..f0cd021e 100644 --- a/go.dev/layouts/shortcodes/gopher.html +++ b/go.dev/layouts/shortcodes/gopher.html @@ -5,11 +5,11 @@ {{ $gopher := .Get "gopher"}} {{ $sizeIn := .Get "size"}} -{{if or (eq (.Get "align") "right") (eq (.Get "align") "Right")}} +{{if eq (.Get "align") "right" "Right"}} {{$align = "Right"}} {{end}} -{{if or (or (eq $sizeIn "XLarge") (eq $sizeIn "xl")) (eq $sizeIn "xlarge") }} +{{if eq $sizeIn "XLarge" "xl" "xlarge"}} {{$size = "XLarge"}} {{end}} @@ -21,7 +21,7 @@ {{$src = "/images/gophers/blue.svg"}} {{$alt = "Go gopher"}} {{end}} -{{if (eq $gopher "front") (eq $gopher "sticker1")}} +{{if eq $gopher "front" "sticker1"}} {{$src = "/images/gophers/front.svg"}} {{$alt = "Go gopher"}} {{end}} @@ -37,11 +37,11 @@ {{$src = "/images/gophers/green.svg"}} {{$alt = "Go gopher"}} {{end}} -{{if or (eq $gopher "grey") (eq $gopher "gray")}} +{{if eq $gopher "grey" "gray"}} {{$src = "/images/gophers/grey.svg"}} {{$alt = "Go gopher"}} {{end}} -{{if (eq $gopher "happy") (eq $gopher "sticker2")}} +{{if eq $gopher "happy" "sticker2"}} {{$src = "/images/gophers/happy.svg"}} {{$alt = "Go gopher"}} {{end}} -- cgit v1.3 From dcb48318e4605ed53e3c24917fda460f53e33aa6 Mon Sep 17 00:00:00 2001 From: Jamal Carvalho Date: Thu, 11 Mar 2021 14:53:56 -0500 Subject: [x/go.dev] assets/css: use system fonts Switches go.dev to system fonts to match the change made in pkg.go.dev. Change-Id: I74a994dc454aad20d7f20bb9e43801cf7ed5b78f X-GoDev-Commit: cc1cd37dd61b8cd8c08c74e7df40b02c797a791a --- go.dev/assets/css/styles.css | 61 +++++++++++--------------------------------- 1 file changed, 15 insertions(+), 46 deletions(-) diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index b12049ba..f671bc92 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -4,8 +4,20 @@ box-sizing: border-box; } body { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, + 'Apple Color Emoji', 'Segoe UI Emoji'; max-height: 100%; } +button, +input, +select, +textarea { + font: inherit; +} +code, +pre { + font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; +} html, .Site { max-height: 100%; @@ -24,7 +36,6 @@ a:hover { .Site { display: flex; flex-direction: column; - font-family: 'Roboto', Arial, Helvetica, sans-serif; margin: 0; } .bluebg { @@ -61,7 +72,6 @@ a:hover { } .CaseStudy-aboutBlockTitle { color: #000; - font-family: 'Work Sans', sans-serif; font-size: 1.125rem; font-weight: 500; line-height: 3rem; @@ -74,7 +84,6 @@ a:hover { } .CaseStudy-aboutBlockBody { color: #464a4d; - font-family: 'Roboto', Arial, Helvetica, sans-serif; font-size: 1rem; letter-spacing: 0.0063rem; line-height: 1.5rem; @@ -273,15 +282,6 @@ a.Footer-link--primary { padding: 0; } -h1, -h2, -h3, -h4, -h5, -h6 { - font-family: 'Roboto', Arial, Helvetica, sans-serif; -} - h1, h2 { font-weight: 600; @@ -424,7 +424,6 @@ h6 { } .Article-author, .Article-date { - font-family: 'Roboto', Arial, Helvetica, sans-serif; font-size: 0.875rem; line-height: 1.375rem; } @@ -438,7 +437,6 @@ h6 { .Article h5, .Article h6 { color: #000; - font-family: 'Work Sans', sans-serif; } .Article h1 { font-size: 2.25rem; @@ -487,7 +485,6 @@ h6 { .Article pre, .Article code { color: #3e4042; - font-family: 'Source Code Pro', monospace; } @media only screen and (min-width: 57.7rem) { .Article h1, @@ -523,7 +520,6 @@ h6 { } a.BreadcrumbNav-link { color: #000; - font-family: 'Work Sans', sans-serif; font-size: 0.875rem; text-decoration: none; white-space: nowrap; @@ -816,7 +812,6 @@ a.GettingStartedGo-resourceItemTitle { color: #fff; } .Hero h1 { - font-family: 'Work Sans', sans-serif; font-size: 2.625rem; font-weight: 500; letter-spacing: 0.3rem; @@ -950,9 +945,6 @@ a.GettingStartedGo-resourceItemTitle { color: #fff; text-decoration: underline; } -.Hero-footnote code { - font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; -} .SubHero-gridContainer { display: grid; gap: 0 5vw; @@ -1019,7 +1011,7 @@ a.GettingStartedGo-resourceItemTitle { grid-row: 1 / 3; } .Hero-blurb h1 { - font-size: 2.25rem; + font-size: 2.45rem; font-weight: 500; } .Hero-blurbList { @@ -1074,7 +1066,6 @@ a.GettingStartedGo-resourceItemTitle { } } .WhoUses-heroInnerLeft h3 { - font-family: 'Work Sans', sans-serif; font-size: 1.5rem; font-weight: normal; margin: 1.375rem 0; @@ -1337,7 +1328,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .WhoUsesCaseStudy-view-more a { color: #3c4043; - font-family: 'Google Sans', sans-serif; font-size: 0.875rem; font-style: normal; font-weight: 500; @@ -1450,7 +1440,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .WhyGo-reasonPackages { color: #3c4043; - font-family: 'Google Sans', sans-serif; font-size: 0.875rem; letter-spacing: 0.055rem; } @@ -1670,7 +1659,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .GoCarousel-eventDate p { color: #5f6368; - font-family: 'Google Sans', sans-serif; font-size: 0.8125rem; font-style: normal; line-height: 1rem; @@ -1794,10 +1782,9 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Learn-heroContent h1 { - font-family: Work Sans; + font-size: 1.5rem; font-style: normal; font-weight: normal; - font-size: 1.5rem; line-height: 2rem; } @@ -2139,7 +2126,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Learn-eventName { color: #000; - font-family: 'Work Sans', Arial, Helvetica, sans-serif; font-size: 1.25rem; font-weight: 500; margin: 0; @@ -2352,7 +2338,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .Solutions-title h1, .WhoUsesSubPage-heroInner--caseStudy h1, .WhoUsesSubPage-heroInner--useCase h1 { - font-family: 'Work Sans', Arial, Helvetica, sans-serif; font-size: 1.5rem; font-style: normal; font-weight: normal; @@ -2370,7 +2355,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Solutions-title h3 { color: #3c4043; - font-family: 'Roboto', Arial, Helvetica, sans-serif; font-size: 1rem; font-weight: normal; letter-spacing: 0.0063rem; @@ -2395,7 +2379,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { color: #5f5f5f; display: flex; flex-direction: column; - font-family: 'Roboto', Arial, Helvetica, sans-serif; font-size: 0.875rem; font-weight: normal; line-height: 1.5rem; @@ -2421,7 +2404,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Solutions-headlineNotification { color: #71757b; - font-family: 'Work Sans', sans-serif; font-size: 0.75rem; font-style: normal; font-weight: 500; @@ -2433,7 +2415,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Solutions-headline h2 { color: #000; - font-family: 'Work Sans', sans-serif; font-size: 1.5rem; font-style: normal; font-weight: normal; @@ -2475,7 +2456,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { border-style: none; color: #000; cursor: pointer; - font-family: 'Work Sans', Arial, Helvetica, sans-serif; font-size: 1rem; font-weight: 500; line-height: 2.25rem; @@ -2561,7 +2541,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .Solutions-useCaseAction { bottom: 1rem; color: #007f9f; - font-family: 'Roboto', Arial, Helvetica, sans-serif; font-size: 1rem; font-weight: normal; letter-spacing: 0.0063rem; @@ -2577,7 +2556,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Solutions-useCaseDescription { color: #71757b; - font-family: 'Roboto', Arial, Helvetica, sans-serif; font-size: 1rem; font-style: normal; font-weight: normal; @@ -2586,7 +2564,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Solutions-useCaseTitle { color: #000; - font-family: 'Work Sans', sans-serif; font-size: 1.125rem; font-weight: 500; line-height: 1.5rem; @@ -2619,7 +2596,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Solutions-footer p { color: #000; - font-family: 'Roboto', Arial, Helvetica, sans-serif; font-size: 1.125rem; font-weight: normal; letter-spacing: 0.007rem; @@ -2668,7 +2644,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .TestimonialsGo-author { color: #3c4043; - font-family: 'Work Sans', Arial, Helvetica, sans-serif; font-size: 0.8rem; font-style: normal; font-weight: normal; @@ -2703,7 +2678,6 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { margin-bottom: 2rem; } .PullQuote-body { - font-family: 'Roboto', Arial, Helvetica, sans-serif; margin: 1.5rem 0 1rem; } .PullQuote-link, @@ -2715,7 +2689,6 @@ p.BackgroundQuote-body { .BackgroundQuote-author { display: flex; flex-wrap: wrap; - font-family: 'Work Sans', sans-serif; font-style: normal; font-weight: 500; justify-content: flex-end; @@ -2770,14 +2743,12 @@ p.BackgroundQuote-body { } .QuoteBlock-body { color: #3f4346; - font-family: 'Roboto', Arial, Helvetica, sans-serif; font-size: 1.125rem; letter-spacing: 0.007rem; line-height: 2rem; } .QuoteBlock-author { color: #3f4346; - font-family: 'Work Sans', sans-serif; font-size: 1rem; font-style: normal; font-weight: 500; @@ -3405,7 +3376,6 @@ img.PullQuote-image { .Card-contentTitle { color: #000; - font-family: 'Work Sans', sans-serif; font-size: 1.125rem; font-weight: 500; } @@ -3468,13 +3438,12 @@ img.PullQuote-image { } .Book-content { - margin-left: 1.6875rem; flex: 1; + margin-left: 1.6875rem; } .Book-title { color: #000; - font-family: Work Sans; font-size: 1.125rem; font-weight: 500; line-height: 1.5rem; -- cgit v1.3 From 8ab8a702866679fcf7c5ded5bc255a6b2d80c1d2 Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Tue, 9 Mar 2021 12:14:55 -0500 Subject: [x/go.dev] content/about.md: describe build contexts Change-Id: Id9b3ae406a20bdfedd2c41cf406c638527e3ded1 X-GoDev-Commit: 21cc7a6f7da0a6c0c7df312afc32d041543d970d --- go.dev/content/about.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/go.dev/content/about.md b/go.dev/content/about.md index 94b22914..f52eaab5 100644 --- a/go.dev/content/about.md +++ b/go.dev/content/about.md @@ -37,7 +37,37 @@ The [guidelines for writing documentation](https://blog.golang.org/godoc) for th It’s important to write a good summary of the package in the first sentence of the package comment. The go.dev site indexes the first sentence and displays it in search results. -Pkg.go.dev displays the GOOS and GOARCH for the documentation displayed at the bottom of the documentation page. +### Build Context + +Most Go packages look and behave the same regardless of the machine architecture +or operating system. But some have different documentation, even different +exported symbols, for different architectures or OSes. Some packages may not even +exist for some architectures. + +Go calls an OS/architecture pair a "build context" and writes it with a slash, +like `linux/amd64`. You may also see the terms `GOOS` and `GOARCH` for the OS +and architecture respectively, because those are the names of the environment +variables that the go command uses. (See the [go command +documentation](https://golang.org/cmd/go) for more information.) + +If a package exists at only one build context, pkg.go.dev displays that build +context at the upper right corner of the documentation. For example, +https://pkg.go.dev/syscall/js displays "js/wasm". + +If a package is different in different build contexts, then pkg.go.dev will +display one by default and provide a dropdown control at the upper right so you +can select a different one. + +For packages that are the same across all build contexts, pkg.go.dev does not +display any build context information. + +Although there are many possible OS/architecture pairs, pkg.go.dev considers +only a +[handful](https://go.googlesource.com/pkgsite/+/master/internal/build_context.go#29) +of them. So if a package only exists for unsupported build contexts, pkg.go.dev +will not display documentation for it. + +### Source Links Most of the time, pkg.go.dev can determine the location of a package's source files, and provide links from symbols in the documentation to their definitions -- cgit v1.3 From 73d645c8773dfc512529ac738b4e718aa27f616a Mon Sep 17 00:00:00 2001 From: Mauricio Alvarado Date: Mon, 12 Apr 2021 13:27:16 -0500 Subject: [x/go.dev] added site reliability case study This change adds the site reliability engineering case study to the google solutions as well as adding assets for hero banner and logo. New case study on: staging.go.dev/solutions/google/ Complete case study: staging.go.dev/solutions/google/sitereliability/ Change-Id: Id147fde85bf0443d74e442b913748500528deca1 X-GoDev-Commit: 07f09622613635a8a1bd8ced2b4408e0526bbf26 --- go.dev/assets/css/styles.css | 6 +- go.dev/content/solutions/google/_index.md | 8 ++ go.dev/content/solutions/google/sitereliability.md | 110 +++++++++++++++++++++ .../images/go_sitereliability_case_study.png | Bin 0 -> 81212 bytes go.dev/static/images/logos/sitereliability.svg | 1 + 5 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 go.dev/content/solutions/google/sitereliability.md create mode 100644 go.dev/static/images/go_sitereliability_case_study.png create mode 100644 go.dev/static/images/logos/sitereliability.svg diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index f671bc92..d1e6b5c5 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -517,12 +517,16 @@ h6 { .BreadcrumbNav-li { align-items: center; display: flex; + white-space: nowrap; } a.BreadcrumbNav-link { color: #000; font-size: 0.875rem; text-decoration: none; - white-space: nowrap; +} +.BreadcrumbNav-li:last-child { + padding-right: 0.812rem; + white-space: normal; } .BreadcrumbNav-li:not(:last-child):after { background: url('/images/icons/arrow-forward.svg') no-repeat; diff --git a/go.dev/content/solutions/google/_index.md b/go.dev/content/solutions/google/_index.md index 6ed334eb..6e3ae17a 100644 --- a/go.dev/content/solutions/google/_index.md +++ b/go.dev/content/solutions/google/_index.md @@ -66,3 +66,11 @@ When the product Chrome comes to mind, you probably think solely of the user-ins The Firebase Hosting team provides static web hosting services for Google Cloud customers. They provide a static web host that sits behind a global content delivery network, and offer users tools that are easy to use. The team also develops features that range from uploading site files to registering domains to tracking usage. [Learn more](/solutions/google/firebase/) + +--- + +### Actuating Google Production: How Google’s Site Reliability Engineering Team Uses Go + +Google runs a small number of very large services. Those services are powered by a global infrastructure covering everything one needs: storage systems, load balancers, network, logging, monitoring, and many more. Nevertheless, it is not a static system - it cannot be. Architecture evolves, new products and ideas are created, new versions must be rolled out, configs pushed, database schema updated, and more. We end up deploying changes to our systems dozens of times per second. + +[Learn more](/solutions/google/sitereliability/) \ No newline at end of file diff --git a/go.dev/content/solutions/google/sitereliability.md b/go.dev/content/solutions/google/sitereliability.md new file mode 100644 index 00000000..a8506c02 --- /dev/null +++ b/go.dev/content/solutions/google/sitereliability.md @@ -0,0 +1,110 @@ +--- +title: "Actuating Google Production: How Google’s Site Reliability Engineering Team Uses Go" +company: Google Site Reliability Engineering (SRE) +logoSrc: sitereliability.svg +heroImgSrc: go_sitereliability_case_study.png +series: Case Studies +quote: | + Google’s Site Reliability Engineering team has a mission to protect, provide for, and progress the software and systems behind all of Google’s public services — Google Search, Ads, Gmail, Android, YouTube, and App Engine, to name just a few — with an ever-watchful eye on their availability, latency, performance, and capacity. + + They shared their experience building core production management systems with Go, coming from experience with Python and C++. +authors: + - Pierre Palatin, Site Reliability Engineer +aliases: + - /solutions/sitereliability +--- + +Google runs a small number of very large services. Those services are powered +by a global infrastructure covering everything a developer needs: storage +systems, load balancers, network, logging, monitoring, and much more. +Nevertheless, it is not a static system—it cannot be. Architecture evolves, +new products and ideas are created, new versions must be rolled out, configs +pushed, database schema updated, and more. We end up deploying changes to our +systems dozens of times per second. + +Because of this scale and critical need for reliability, Google pioneered Site +Reliability Engineering (SRE), a role that many other companies have since adopted. +“SRE is what you get when you treat operations as if it’s a software problem. +Our mission is to protect, provide for, and progress the software and systems +behind all of Google’s public services with an ever-watchful eye on their +availability, latency, performance, and capacity.” +- [Site Reliability Engineering (SRE)](https://sre.google/). + +{{% backgroundQuote %}} +Go promised a sweet spot between performance and readability that neither of +the other languages [Python and C++] were able to offer. +{{% /backgroundQuote %}} + +In 2013-2014, Google’s SRE team realized that our approach to production +management was not cutting it anymore in many ways. We had advanced far beyond +shell scripts, but our scale had so many moving pieces and complexities that a +new approach was needed. We determined that we needed to move toward a +declarative model of our production, called "Prodspec", driving a dedicated +control plane, called "Annealing". + +When we started those projects, Go was just becoming a viable option for +critical services at Google. Most engineers were more familiar with Python +and C++, either of which would have been valid choices. Nevertheless, Go +captured our interest. The appeal of novelty was certainly a factor of +course. But, more importantly, Go promised a sweet spot between performance +and readability that neither of the other languages were able to offer. We +started a small experiment with Go for some initial parts of Annealing and +Prodspec. As the projects progressed, those initial parts written in Go found +themselves at the core. We were happy with Go—its simplicity grew on us, the +performance was there, and concurrency primitives would have been hard to +replace. + +{{% backgroundQuote %}} +Now the majority of Google production is managed and maintained by our systems +written in Go. +{{% /backgroundQuote %}} + +At no point was there ever a mandate or requirement to use Go, but we had no +desire to return to Python or C++. Go grew organically in Annealing and +Prodspec. It was the right choice, and thus is now our language of choice. +Now the majority of Google production is managed and maintained by our systems +written in Go. + +The power of having a simple language in those projects is hard to overstate. +There have been cases where some feature was indeed missing, such as the +ability to enforce in the code that some complex structure should not be +mutated. But for each one of those cases, there have undoubtedly been tens or +hundred of cases where the simplicity helped. + +{{% backgroundQuote %}} +Go’s simplicity means that the code is easy to follow, whether it is to spot +bugs during review or when trying to determine exactly what happened during a +service disruption. +{{% /backgroundQuote %}} + +For example, Annealing impacts a wide variety of teams and services meaning +that we relied heavily on contributions across the company. The simplicity of +Go made it possible for people outside our team to see why some part or another +was not working for them, and often provide fixes or features themselves. This +allowed us to quickly grow. + +Prodspec and Annealing are in charge of some quite critical components. Go’s +simplicity means that the code is easy to follow, whether it is to spot bugs +during review or when trying to determine exactly what happened during a +service disruption. + +Go performance and concurrency support have also been key for our work. As our +model of production is declarative, we tend to manipulate a lot of structured +data, which describes what production is and what it should be. We have large +services so the data can grow large, often making purely sequential processing +not efficient enough. + +We are manipulating this data in many ways and many places. It is not a matter +of having a smart person come up with a parallel version of our algorithm. It +is a matter of casual parallelism, finding the next bottleneck and +parallelising that code section. And Go enables exactly that. + +As a result of our success with Go, we now use Go for every new development for +Prodspec and Annealing. + +In addition to the Site Reliability Engineering team, engineering teams across +Google have adopted Go in their development process. Read about how the +[Core Data Solutions](/solutions/google/coredata/), +[Firebase Hosting](/solutions/google/firebase/), and +[Chrome](/solutions/google/chrome/) teams use Go to build fast, reliable, +and efficient software at scale. \ No newline at end of file diff --git a/go.dev/static/images/go_sitereliability_case_study.png b/go.dev/static/images/go_sitereliability_case_study.png new file mode 100644 index 00000000..51241c5d Binary files /dev/null and b/go.dev/static/images/go_sitereliability_case_study.png differ diff --git a/go.dev/static/images/logos/sitereliability.svg b/go.dev/static/images/logos/sitereliability.svg new file mode 100644 index 00000000..c549d69a --- /dev/null +++ b/go.dev/static/images/logos/sitereliability.svg @@ -0,0 +1 @@ + \ No newline at end of file -- cgit v1.3 From 179305ea255adc8a68aba19b70ad675ed660a2ab Mon Sep 17 00:00:00 2001 From: Jamal Carvalho Date: Wed, 14 Apr 2021 16:34:19 -0400 Subject: [x/go.dev] assets/css: update colors and apply stylelint fixes gallery/files/a78bf2babcb445ce8fd789d85655dca5 Change-Id: Iac9271c7d4b3a0a6fb90f56038fd970ae29d5907 X-GoDev-Commit: 5daa2760aaf2cdfe7dde8723ed3f2993d20dba09 --- go.dev/.stylelintrc.json | 1 + go.dev/assets/css/styles.css | 228 +++++++++++++++++++++---------------------- 2 files changed, 115 insertions(+), 114 deletions(-) diff --git a/go.dev/.stylelintrc.json b/go.dev/.stylelintrc.json index 8321fe24..8374c488 100644 --- a/go.dev/.stylelintrc.json +++ b/go.dev/.stylelintrc.json @@ -3,6 +3,7 @@ "stylelint-order" ], "rules": { + "color-hex-case": "lower", "selector-list-comma-newline-after": "always", "order/order": [ "custom-properties", diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css index f671bc92..5e947e64 100644 --- a/go.dev/assets/css/styles.css +++ b/go.dev/assets/css/styles.css @@ -65,13 +65,13 @@ a:hover { z-index: 10; } .CaseStudy-aboutBlock { - border: 0.0625rem solid #dcdcdc; + border: 0.0625rem solid #dcdee0; border-radius: 0.25rem; box-sizing: border-box; padding: 3.75rem 2rem 3.75rem; } .CaseStudy-aboutBlockTitle { - color: #000; + color: #202224; font-size: 1.125rem; font-weight: 500; line-height: 3rem; @@ -93,7 +93,7 @@ a:hover { * text never wraps or gets cut off. */ .Banner { - background-color: #000; + background-color: #202224; display: none; } .Banner-inner { @@ -128,7 +128,7 @@ a:hover { } } .UseCase-halfColumn { - color: #3c4043; + color: #3e4042; display: inline-block; font-size: 1rem; letter-spacing: 0.0063rem; @@ -397,7 +397,7 @@ h6 { padding: 0.5rem; } .NavigationDrawer-listItem--active { - background-color: #d5eef5; + background-color: #bfeaf4; border-radius: 0.4rem; } .NavigationDrawer-scrim { @@ -436,7 +436,7 @@ h6 { .Article h4, .Article h5, .Article h6 { - color: #000; + color: #202224; } .Article h1 { font-size: 2.25rem; @@ -462,7 +462,7 @@ h6 { .Article p, .Article ul, .Article ol { - color: #3c4043; + color: #3e4042; font-size: 1rem; font-style: normal; font-weight: normal; @@ -473,7 +473,7 @@ h6 { margin-bottom: 0; } .Article ol .Article pre { - background-color: #f8f9f9; + background-color: #fafafa; border: 0.0625rem solid #dcdee0; border-radius: 0.375rem; color: #3e4042; @@ -519,7 +519,7 @@ h6 { display: flex; } a.BreadcrumbNav-link { - color: #000; + color: #202224; font-size: 0.875rem; text-decoration: none; white-space: nowrap; @@ -581,7 +581,7 @@ a.BreadcrumbNav-link { } .LearnGo, .UseCases { - background-color: #f6f8fa; + background-color: #fafafa; } .WhoUses-header, .WhyGo-header, @@ -613,7 +613,7 @@ a.BreadcrumbNav-link { } } .GoCarousel { - background-color: #f8f9fa; + background-color: #fafafa; display: flex; justify-items: center; overflow-x: hidden; @@ -637,11 +637,11 @@ a.BreadcrumbNav-link { .GoCarousel-controlPrev, .GoCarousel-controlNext { background-color: #fff; - border-width: 0; border-radius: 1.25rem; + border-width: 0; box-shadow: 0 0.0625rem 0.1875rem rgba(60, 64, 67, 0.15), 0 0.0625rem 0.125rem rgba(60, 64, 67, 0.3); - color: #777; + color: #848688; display: inline-block; font-size: 2.5rem; height: 2rem; @@ -655,9 +655,9 @@ a.BreadcrumbNav-link { } .GoCarousel-controlPrev:focus, .GoCarousel-controlNext:focus { - color: #555; box-shadow: 0 0.0625rem 0.5rem rgba(60, 64, 67, 0.25), 0 0.0625rem 0.25rem rgba(60, 64, 67, 0.4); + color: #555759; } .GoCarousel-controlPrev[hidden], .GoCarousel-controlNext[hidden] { @@ -717,13 +717,13 @@ a.BreadcrumbNav-link { } @media only screen and (min-width: 57.7rem) { .GettingStartedGo-header { - border-right: 0.0133rem solid #efefef; + border-right: 0.0133rem solid #f0f1f2; margin-bottom: 0; padding-right: 3.375rem; } } .GettingStartedGo-headerDesc { - color: #3c4043; + color: #3e4042; letter-spacing: 0.0063rem; line-height: 1.5rem; } @@ -767,7 +767,7 @@ a.GettingStartedGo-primaryCta { } } .GettingStartedGo-resourcesHeader { - color: #5f6368; + color: #555759; font-size: 0.6875rem; letter-spacing: 0.0625rem; margin-bottom: 1rem; @@ -777,12 +777,12 @@ a.GettingStartedGo-primaryCta { margin-bottom: 1rem; } a.GettingStartedGo-resourceItemTitle { - color: #202124; + color: #202224; font-weight: 500; line-height: 1.5rem; } .GettingStartedGo-resourceItemDescription { - color: #5f6368; + color: #555759; font-size: 0.8125rem; line-height: 1.5rem; } @@ -790,7 +790,7 @@ a.GettingStartedGo-resourceItemTitle { .WhyGo-headerH4, .LearnGo-header h4, .WhoUses-subheader { - color: #3c4043; + color: #3e4042; font-size: 0.875rem; font-style: normal; font-weight: normal; @@ -893,8 +893,8 @@ a.GettingStartedGo-resourceItemTitle { } .Hero-gopherLadder { bottom: 0; - max-width: 8rem; height: 15rem; + max-width: 8rem; object-fit: cover; object-position: 100% 0; right: 0; @@ -1029,10 +1029,10 @@ a.GettingStartedGo-resourceItemTitle { } } .WhoUsesHero { - background-color: #f6f8f8; + background-color: #fafafa; } .WhoUses-subheader { - color: #3c4043; + color: #3e4042; margin-bottom: 0; margin-left: auto; margin-right: auto; @@ -1071,7 +1071,7 @@ a.GettingStartedGo-resourceItemTitle { margin: 1.375rem 0; } .WhoUses-heroInnerLeft p { - color: #5f5f5f; + color: #6e7072; font-size: 0.875rem; margin-bottom: 1.188rem; } @@ -1133,7 +1133,7 @@ a.GettingStartedGo-resourceItemTitle { .WhoUsesCaseStudyList-caseStudyLink:link, .WhoUsesCaseStudyList-caseStudyLink:visited { border-radius: 0.25rem; - box-shadow: #e8eaed 0 0.0625rem 0.25rem; + box-shadow: #f0f1f2 0 0.0625rem 0.25rem; display: flex; height: 100%; padding: 0 0.3rem; @@ -1191,10 +1191,10 @@ a.GettingStartedGo-resourceItemTitle { margin-bottom: 1.5rem; } .FeaturedUsers table thead { - background-color: #f8f9f9; + background-color: #fafafa; } .FeaturedUsers table thead th { - color: #535353; + color: #555759; font-size: 1rem; font-weight: 500; line-height: 1.5rem; @@ -1239,7 +1239,7 @@ a.GettingStartedGo-resourceItemTitle { line-height: 1.5rem; } .FeaturedUsers table thead { - color: #535353; + color: #555759; font-size: 1rem; font-weight: 500; line-height: 1.5rem; @@ -1256,7 +1256,7 @@ a.GettingStartedGo-resourceItemTitle { .FeaturedUsers-moreProjectsBtn { background: transparent; border: none; - color: #12b5cb; + color: #5dc9e2; cursor: pointer; font-size: 0.875rem; padding: 0.5rem 0; @@ -1317,7 +1317,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { margin: 0 0 1.5rem; } .WhoUsesCaseStudy-library p { - color: #484a4c; + color: #3e4042; font-size: 1rem; letter-spacing: 0.0111rem; line-height: 1.1875rem; @@ -1327,7 +1327,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { margin-bottom: 2.5rem; } .WhoUsesCaseStudy-view-more a { - color: #3c4043; + color: #3e4042; font-size: 0.875rem; font-style: normal; font-weight: 500; @@ -1403,7 +1403,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } } .WhyGo-reason { - border: 0.063rem solid #dcdcdc; + border: 0.063rem solid #dcdee0; border-radius: 0.25rem; display: flex; flex: 0 30%; @@ -1439,7 +1439,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { text-decoration: none; } .WhyGo-reasonPackages { - color: #3c4043; + color: #3e4042; font-size: 0.875rem; letter-spacing: 0.055rem; } @@ -1459,10 +1459,10 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { padding: 0; } .WhyGo-reasonPackage { - border: 0.063rem solid #dbdce0; + border: 0.063rem solid #bfeaf4; border-radius: 0.125rem; box-sizing: border-box; - color: #4aa2b7; + color: #007d9c; font-size: 0.688rem; letter-spacing: 0.0129rem; line-height: 0.813rem; @@ -1474,7 +1474,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .WhyGo-reasonShowMoreImgWrapper { align-items: center; - background-color: #f6f8f8; + background-color: #fafafa; border-radius: 50%; display: flex; height: 14.313rem; @@ -1491,7 +1491,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { text-align: center; } .WhyGo-reasonShowMoreLink a { - border: 0.063rem solid #dbdce0; + border: 0.063rem solid #bfeaf4; border-radius: 0.125rem; box-sizing: border-box; display: inline-block; @@ -1503,14 +1503,14 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { vertical-align: middle; } .WhyGo-reasonText p { - color: #3c4043; + color: #3e4042; font-size: 1rem; font-weight: normal; letter-spacing: 0.006rem; line-height: 1.5rem; } .WhyGo-reasonTitle { - color: #202124; + color: #202224; font-size: 1.125rem; font-weight: 500; line-height: 1.5rem; @@ -1630,7 +1630,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .GoCarousel-eventThumbnail { background-color: #fff; - border: 0.0625rem solid #e5e5e5; + border: 0.0625rem solid #dcdee0; border-radius: 0.5rem; display: flex; height: 100%; @@ -1658,14 +1658,14 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { justify-content: space-between; } .GoCarousel-eventDate p { - color: #5f6368; + color: #555759; font-size: 0.8125rem; font-style: normal; line-height: 1rem; margin: 0 0 1.5rem 0; } .GoCarousel-eventHeader { - color: #5f6368; + color: #555759; font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.0625rem; @@ -1679,7 +1679,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .GoCarousel-eventName a { -webkit-box-orient: vertical; - color: #202124; + color: #202224; display: -webkit-box; font-weight: 500; -webkit-line-clamp: 2; @@ -1739,11 +1739,11 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Learn-hero { - background-color: #f6f8f8; + background-color: #fafafa; background-image: radial-gradient( 60.0625rem 60.0625rem, - #beeaf5 50%, - #f6f8f8 50% + #bfeaf4 50%, + #fafafa 50% ); background-position: top -50rem left -9rem; background-repeat: no-repeat; @@ -1752,9 +1752,9 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Learn-hero .Container { - z-index: 1; - position: relative; max-width: 68.125rem; + position: relative; + z-index: 1; } .Learn-heroInner { @@ -1789,7 +1789,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Learn-heroContent p { - color: #5f5f5f; + color: #6e7072; font-size: 0.875rem; line-height: 1.5rem; max-width: 27.1875rem; @@ -1959,8 +1959,8 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Learn-learningResources h2 { - font-weight: 500; font-size: 2rem; + font-weight: 500; letter-spacing: 0.1875rem; line-height: 2.3125rem; } @@ -1971,8 +1971,8 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Learn-learningResourcesHeader h3 { - font-weight: bold; font-size: 1.5rem; + font-weight: bold; letter-spacing: normal; line-height: 2.25rem; } @@ -2047,7 +2047,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Learn-inPerson { - border-bottom: 0.0625rem solid #e0e0e0; + border-bottom: 0.0625rem solid #dcdee0; flex: 1 1 31.25rem; margin: 0 0 0 1rem; /* Gutter between grid cells. */ max-width: 31rem; @@ -2056,7 +2056,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { .Learn-inPerson:nth-child(1), .Learn-inPerson:nth-child(2) { - border-top: 0.0625rem solid #e0e0e0; + border-top: 0.0625rem solid #dcdee0; } .Learn-inPersonTitle { font-size: 1.25rem; @@ -2079,7 +2079,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { padding: 1.875rem 0 0.175rem 0; } .Learn-eventItem + .Learn-eventItem { - border-top: 0.0625rem solid #e0e0e0; + border-top: 0.0625rem solid #dcdee0; } .Learn-eventThumbnail { @@ -2093,25 +2093,25 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { background-color: #fff; } .Learn-eventThumbnail img { - width: 100%; height: auto; object-fit: cover; + width: 100%; } .Learn-eventAttendees { display: flex; } .Learn-eventAttendeesItem img { - width: 2rem; - height: 2rem; border-radius: 100%; + height: 2rem; + width: 2rem; } .Learn-eventBody { display: flex; flex: 1; flex-direction: column; - min-width: 0; max-width: 100%; + min-width: 0; } .Learn-eventDate { display: flex; @@ -2125,27 +2125,27 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { margin: 0; } .Learn-eventName { - color: #000; + color: #202224; font-size: 1.25rem; font-weight: 500; margin: 0; + + margin-bottom: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - - margin-bottom: 1rem; } .Learn-eventName a { + color: #202224; text-decoration: none; - color: #000; } .Learn-eventDescription { -webkit-box-orient: vertical; /* See webkit-line-clamp */ display: -webkit-box; /* See webkit-line-clamp */ -webkit-line-clamp: 4; /* Elide flex text. webkit-line-clamp is broadly compatible with browsers. */ + line-height: 24px; overflow: hidden; text-overflow: ellipsis; - line-height: 24px; } .Learn-eventText { margin-bottom: 0.5rem; @@ -2174,14 +2174,14 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Learn-eventThumbnail { height: 8rem; - min-width: 8rem; - margin-right: 1rem; margin-bottom: 0; + margin-right: 1rem; + min-width: 8rem; } .Learn-eventThumbnail img { height: 8rem; - width: 8rem; object-fit: contain; + width: 8rem; } .Learn-eventDate { flex: 0; @@ -2238,7 +2238,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { justify-content: center; } .Learn-tile a { - color: #3c4043; + color: #3e4042; } .Learn-tileTitle { display: block; @@ -2354,7 +2354,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { text-align: center; } .Solutions-title h3 { - color: #3c4043; + color: #3e4042; font-size: 1rem; font-weight: normal; letter-spacing: 0.0063rem; @@ -2376,7 +2376,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Solutions-headlineBody { align-items: flex-start; - color: #5f5f5f; + color: #6e7072; display: flex; flex-direction: column; font-size: 0.875rem; @@ -2403,7 +2403,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { transform: translateX(0.2rem); } .Solutions-headlineNotification { - color: #71757b; + color: #6e7072; font-size: 0.75rem; font-style: normal; font-weight: 500; @@ -2411,10 +2411,10 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { margin: 1.5rem 0; } .Solutions-headline { - background-color: #f6f8f8; + background-color: #fafafa; } .Solutions-headline h2 { - color: #000; + color: #202224; font-size: 1.5rem; font-style: normal; font-weight: normal; @@ -2448,13 +2448,13 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { width: 100%; } .SolutionsTabs-tabList hr { - border: 0.0625rem solid #cfcfcf; + border: 0.0625rem solid #c6c8ca; margin: -0.0625rem 0 2rem; } .SolutionsTabs-tab { background-color: #fff; border-style: none; - color: #000; + color: #202224; cursor: pointer; font-size: 1rem; font-weight: 500; @@ -2464,13 +2464,13 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { padding: 0.375rem 0; } .SolutionsTabs-tab:focus { - border-bottom: 0.25rem solid #cfcfcf; + border-bottom: 0.25rem solid #c6c8ca; } .SolutionsTabs-tab:last-of-type { margin-right: 0; } .SolutionsTabs-tab[aria-selected='true'] { - border-bottom: 0.25rem solid #007f9f; + border-bottom: 0.25rem solid #007d9c; } @media only screen and (min-width: 48rem) { .SolutionsTabs-tab { @@ -2498,7 +2498,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Solutions-card { background: #fff; - border: 0.0625rem solid #cfcfcf; + border: 0.0625rem solid #c6c8ca; border-radius: 0.625rem; box-sizing: border-box; flex: 0 100%; @@ -2534,13 +2534,13 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } .Solutions-card a:link, .Solutions-card a:visited { - color: #000; + color: #202224; display: block; text-decoration: none; } .Solutions-useCaseAction { bottom: 1rem; - color: #007f9f; + color: #007d9c; font-size: 1rem; font-weight: normal; letter-spacing: 0.0063rem; @@ -2555,7 +2555,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { margin-left: 0.5rem; } .Solutions-useCaseDescription { - color: #71757b; + color: #6e7072; font-size: 1rem; font-style: normal; font-weight: normal; @@ -2563,7 +2563,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { line-height: 1.5rem; } .Solutions-useCaseTitle { - color: #000; + color: #202224; font-size: 1.125rem; font-weight: 500; line-height: 1.5rem; @@ -2595,7 +2595,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { margin: 2rem 0 2.875rem; } .Solutions-footer p { - color: #000; + color: #202224; font-size: 1.125rem; font-weight: normal; letter-spacing: 0.007rem; @@ -2636,14 +2636,14 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { justify-content: space-between; } .TestimonialsGo-quoteSection p { - color: #000; + color: #202224; font-size: 0.875rem; letter-spacing: 0.0082rem; line-height: 1.5rem; text-align: center; } .TestimonialsGo-author { - color: #3c4043; + color: #3e4042; font-size: 0.8rem; font-style: normal; font-weight: normal; @@ -2674,7 +2674,7 @@ a.WhoUsesCaseStudy-librariesViewMoreLink { } } .PullQuote { - color: #5f5f5f; + color: #6e7072; margin-bottom: 2rem; } .PullQuote-body { @@ -2699,7 +2699,7 @@ p.BackgroundQuote-body { font-size: 0.875rem; } .BackgroundQuote { - background-color: #007f9f; + background-color: #007d9c; color: #fff; margin: 1.5rem auto; padding: 2rem 1.5rem; @@ -2709,8 +2709,8 @@ p.BackgroundQuote-body { line-height: 2.25rem; } .QuoteBlock { - border-bottom: 0.25rem solid #007f9f; - border-top: 0.25rem solid #007f9f; + border-bottom: 0.25rem solid #007d9c; + border-top: 0.25rem solid #007d9c; display: block; float: none; margin-bottom: 1.5rem; @@ -2742,20 +2742,20 @@ p.BackgroundQuote-body { } } .QuoteBlock-body { - color: #3f4346; + color: #3e4042; font-size: 1.125rem; letter-spacing: 0.007rem; line-height: 2rem; } .QuoteBlock-author { - color: #3f4346; + color: #3e4042; font-size: 1rem; font-style: normal; font-weight: 500; line-height: 3rem; } .QuoteBlock-link { - color: #5f5f5f; + color: #6e7072; } .LargeMedia { align-items: flex-start; @@ -2763,7 +2763,7 @@ p.BackgroundQuote-body { padding: 2.125rem 0.5rem; } .LargeMedia + .LargeMedia { - border-top: 0.0625rem solid #e0e0e0; + border-top: 0.0625rem solid #dcdee0; } .LargeMedia-image { height: 5rem; @@ -2957,7 +2957,7 @@ p.BackgroundQuote-body { fill: #fff; } .SearchForm--open svg { - fill: #5f6368; + fill: #555759; margin-right: 0.5rem; } .SearchForm-input { @@ -2975,7 +2975,7 @@ p.BackgroundQuote-body { width: 100%; } .SearchForm-input::placeholder { - color: #80868b; + color: #848688; } .SearchForm-input { background-color: transparent; @@ -3015,7 +3015,7 @@ p.BackgroundQuote-body { width: 100%; } .SearchForm svg { - fill: #5f6368; + fill: #555759; margin-right: 0.5rem; } } @@ -3032,7 +3032,7 @@ p.BackgroundQuote-body { padding: 1.25rem 0; } .Series-listItem + .Series-listItem { - border-top: 0.0625rem solid #e0e0e0; + border-top: 0.0625rem solid #dcdee0; } .Series-listItemIcon { margin-right: 1rem; @@ -3049,7 +3049,7 @@ p.BackgroundQuote-body { margin: 0; } .Series-listItemSecondary { - color: #000; + color: #202224; display: inline-block; margin-bottom: 0; text-decoration: none; @@ -3114,7 +3114,7 @@ p.BackgroundQuote-body { width: 100%; } .CaseStudy-contentBody hr { - border: 0.0625rem solid #cfcfcf; + border: 0.0625rem solid #c6c8ca; margin: 2rem 0 2rem; } .CaseStudy-contentAside { @@ -3178,7 +3178,7 @@ p.BackgroundQuote-body { a.UseCase-anchorLink { background: transparent; border: none; - color: #1f2224; + color: #202224; font-size: 1.125rem; font-weight: 400; line-height: 1.5rem; @@ -3193,7 +3193,7 @@ a.UseCase-anchorLink.selected { font-weight: 500; } a.UseCase-anchorLink.selected::before { - background-color: #007f9f; + background-color: #007d9c; border-radius: 1rem; content: ' '; display: inline-block; @@ -3215,7 +3215,7 @@ a.UseCase-anchorLink.selected::before { position: relative; } .WhoUsesSubPage-heroInner--useCase { - background-color: #f6f8f8; + background-color: #fafafa; padding-bottom: 2.5rem; padding-top: 3.5rem; } @@ -3248,7 +3248,7 @@ a.UseCase-anchorLink.selected::before { padding: 0 1.5rem; } .WhoUsesSubPage-heroImg { - background: -webkit-linear-gradient(0deg, #f6f8f8 50vw, #beeaf5 50vw); + background: -webkit-linear-gradient(0deg, #fafafa 50vw, #bfeaf4 50vw); display: flex; max-width: 75.75rem; padding-left: 1.5rem; @@ -3270,7 +3270,7 @@ a.UseCase-anchorLink.selected::before { line-height: 3rem; } .WhoUsesSubPage-heroImg { - background: -webkit-linear-gradient(0deg, #f6f8f8 40vw, #beeaf5 40vw); + background: -webkit-linear-gradient(0deg, #fafafa 40vw, #bfeaf4 40vw); } .WhoUsesSubPage-heroImg img { max-height: 15.625rem; @@ -3282,7 +3282,7 @@ a.UseCase-anchorLink.selected::before { margin-top: 0; } .WhoUsesSubPage-heroInner--caseStudy { - background: -webkit-linear-gradient(0deg, #f6f8f8 70vw, #beeaf5 70vw); + background: -webkit-linear-gradient(0deg, #fafafa 70vw, #bfeaf4 70vw); flex-direction: row; } .WhoUsesSubPage-heroContent--caseStudy { @@ -3315,7 +3315,7 @@ a.UseCase-anchorLink.selected::before { } .ToolsBlurbs-blurb { background-color: #fff; - border: 0.0625rem solid #dcdcdc; + border: 0.0625rem solid #dcdee0; border-radius: 0.25rem; padding: 1.5rem 1rem; } @@ -3338,10 +3338,10 @@ img.PullQuote-image { } .Card { - border: 0.0625rem solid #cfcfcf; + background-color: #fff; + border: 0.0625rem solid #c6c8ca; border-radius: 0.25rem; height: 100%; - background-color: #fff; } .Card a, @@ -3357,8 +3357,8 @@ img.PullQuote-image { } .Card-thumbnail { - background-size: cover; background-position: center; + background-size: cover; height: 9.5625rem; } @@ -3375,16 +3375,16 @@ img.PullQuote-image { } .Card-contentTitle { - color: #000; + color: #202224; font-size: 1.125rem; font-weight: 500; } .Card-contentBody { - color: #5f5f5f; + color: #6e7072; + flex: auto; font-size: 0.875rem; margin-top: 1rem; - flex: auto; } .Card-contentCta { @@ -3401,7 +3401,7 @@ img.PullQuote-image { } .Card-selfPacedCredits { - color: #5f5f5f; + color: #6e7072; flex: 1; font-size: 0.75rem; } @@ -3443,7 +3443,7 @@ img.PullQuote-image { } .Book-title { - color: #000; + color: #202224; font-size: 1.125rem; font-weight: 500; line-height: 1.5rem; @@ -3451,7 +3451,7 @@ img.PullQuote-image { } .Book-description { - color: #5f5f5f; + color: #6e7072; font-size: 0.875rem; line-height: 1.5rem; } -- cgit v1.3 From 56f3dff2d5878ad4a78e52d1d441740c4edd7a2f Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 26 Feb 2021 14:53:16 -0500 Subject: [x/go.dev] content/solutions: mv 'capital one' capital-one Hugo is already doing this transformation when generating the static tree. Make the source directory name match the serving directory name. Change-Id: I65c13eff89e1728c3546eea2aa4618c20250c3df X-GoDev-Commit: 9bdd0da00c6ca3c87b627dc6f3551ff5f1d12c1b --- go.dev/content/solutions/capital one/index.md | 9 --------- go.dev/content/solutions/capital one/logo.svg | 2 -- go.dev/content/solutions/capital-one/index.md | 9 +++++++++ go.dev/content/solutions/capital-one/logo.svg | 2 ++ 4 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 go.dev/content/solutions/capital one/index.md delete mode 100644 go.dev/content/solutions/capital one/logo.svg create mode 100644 go.dev/content/solutions/capital-one/index.md create mode 100644 go.dev/content/solutions/capital-one/logo.svg diff --git a/go.dev/content/solutions/capital one/index.md b/go.dev/content/solutions/capital one/index.md deleted file mode 100644 index d86b32ee..00000000 --- a/go.dev/content/solutions/capital one/index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -linkTitle: "Capital One - A Serverless and Go Journey" -description: "At the time, no single team member knew Go, but within a month, everyone was writing in Go and we were building out the endpoints. It was the flexibility, how easy it was to use, and the really cool concept behind Go (how Go handles native concurrency, garbage collection, and of course safety+speed.) that helped engage us during the build. Also, who can beat that cute mascot!" -company: Capital One -logoSrc: capital-one.svg -series: Case Studies -link: https://medium.com/capital-one-tech/a-serverless-and-go-journey-credit-offers-api-74ef1f9fde7f -inLandingPageGrid: true ---- diff --git a/go.dev/content/solutions/capital one/logo.svg b/go.dev/content/solutions/capital one/logo.svg deleted file mode 100644 index 5c3fdda2..00000000 --- a/go.dev/content/solutions/capital one/logo.svg +++ /dev/null @@ -1,2 +0,0 @@ - -image/svg+xml diff --git a/go.dev/content/solutions/capital-one/index.md b/go.dev/content/solutions/capital-one/index.md new file mode 100644 index 00000000..d86b32ee --- /dev/null +++ b/go.dev/content/solutions/capital-one/index.md @@ -0,0 +1,9 @@ +--- +linkTitle: "Capital One - A Serverless and Go Journey" +description: "At the time, no single team member knew Go, but within a month, everyone was writing in Go and we were building out the endpoints. It was the flexibility, how easy it was to use, and the really cool concept behind Go (how Go handles native concurrency, garbage collection, and of course safety+speed.) that helped engage us during the build. Also, who can beat that cute mascot!" +company: Capital One +logoSrc: capital-one.svg +series: Case Studies +link: https://medium.com/capital-one-tech/a-serverless-and-go-journey-credit-offers-api-74ef1f9fde7f +inLandingPageGrid: true +--- diff --git a/go.dev/content/solutions/capital-one/logo.svg b/go.dev/content/solutions/capital-one/logo.svg new file mode 100644 index 00000000..5c3fdda2 --- /dev/null +++ b/go.dev/content/solutions/capital-one/logo.svg @@ -0,0 +1,2 @@ + +image/svg+xml -- cgit v1.3 From d39eee238030ed9afa52172696f0d0ea95b881d7 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 28 Apr 2021 16:26:16 -0400 Subject: [x/go.dev] content/solutions/target: remove duplicate description setting (It's set again below the deleted line.) Change-Id: Ia8bb604238e2dcbdbcdce14aec60bc8b30cd4c0d X-GoDev-Commit: 321c6e13ec76dfd200c06a15b0b3c9d85449d3cc --- go.dev/content/solutions/target/index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/go.dev/content/solutions/target/index.md b/go.dev/content/solutions/target/index.md index c5784b29..3dc004f9 100644 --- a/go.dev/content/solutions/target/index.md +++ b/go.dev/content/solutions/target/index.md @@ -1,6 +1,5 @@ --- linkTitle: "Target - Recommending Go" -description: "" company: Target logoSrc: target.svg series: Case Studies -- cgit v1.3 From 745b337de19216ccdf92cd9ba597fefa165d1131 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 28 Apr 2021 16:39:12 -0400 Subject: [x/go.dev] testdata/golden: introduce golden copy of site for testing Create testdata for Hugo replacement code. Generated with: mkdir testdata hugo && cp -a public testdata/golden and then removed trailing spaces and added final \n to html files. Eventually this will go away, but as the replacement code evolves, updating the testdata directory will help us see the effect of the changes. Change-Id: I9f07bbd4aab4ffc9926c16f5cd8383f3a77bcd85 X-GoDev-Commit: 5d6711a7a5ffbba57992df3056e2261d5bd6c663 --- go.dev/testdata/golden/about/index.html | 466 +++ go.dev/testdata/golden/categories/index.html | 314 ++ go.dev/testdata/golden/categories/index.xml | 14 + go.dev/testdata/golden/copyright/index.html | 316 ++ ...fb96bf0f7621d090f417ecd7883100b759d4dc23c5d.css | 3485 ++++++++++++++++++++ .../images/SCN_magnifying_glass_cloud_site.png | Bin 0 -> 22491 bytes go.dev/testdata/golden/images/adobe-logo.png | Bin 0 -> 23917 bytes .../books/building-microservices-with-go.jpg | Bin 0 -> 39160 bytes .../building-restful-web-services-with-go.jpg | Bin 0 -> 26118 bytes .../testdata/golden/images/books/go-in-action.jpg | Bin 0 -> 22764 bytes .../go-programming-for-network-operations.jpg | Bin 0 -> 21853 bytes .../images/books/go-web-development-cookbook.jpg | Bin 0 -> 26447 bytes .../golden/images/books/go-web-programming.jpg | Bin 0 -> 22309 bytes .../hands-on-software-architecture-with-golang.jpg | Bin 0 -> 34433 bytes .../images/books/mastering-go-web-services.jpg | Bin 0 -> 25891 bytes .../powerful-command-line-applications-in-go.jpg | Bin 0 -> 29309 bytes .../images/books/web-development-with-go.jpg | Bin 0 -> 16548 bytes go.dev/testdata/golden/images/close-24px.svg | 1 + .../golden/images/companies-using-go-hero.svg | 9 + .../testdata/golden/images/device-information.png | Bin 0 -> 38933 bytes go.dev/testdata/golden/images/empty_case_study.png | Bin 0 -> 10042 bytes .../testdata/golden/images/empty_case_study_2.png | Bin 0 -> 7172 bytes go.dev/testdata/golden/images/go-logo-blue.svg | 1 + go.dev/testdata/golden/images/go-logo-white.svg | 1 + .../testdata/golden/images/go_amex_case_study.png | Bin 0 -> 60326 bytes .../golden/images/go_amex_case_study_logo.png | Bin 0 -> 92894 bytes .../testdata/golden/images/go_at&t_case_study.png | Bin 0 -> 52611 bytes .../golden/images/go_at_t_case_study_logo.png | Bin 0 -> 74559 bytes .../golden/images/go_chrome_case_study.png | Bin 0 -> 117554 bytes .../golden/images/go_core_data_case_study.png | Bin 0 -> 75810 bytes .../golden/images/go_firebase_case_study.png | Bin 0 -> 132178 bytes .../images/go_google_case_study_carousel.png | Bin 0 -> 94027 bytes .../golden/images/go_mercadolibre_case_study.png | Bin 0 -> 54789 bytes .../images/go_mercadolibre_case_study_logo.png | Bin 0 -> 60547 bytes .../golden/images/go_paypal_case_study.png | Bin 0 -> 59379 bytes .../golden/images/go_paypal_case_study_logo.png | Bin 0 -> 81600 bytes .../images/go_sitereliability_case_study.png | Bin 0 -> 81212 bytes go.dev/testdata/golden/images/google-grey.png | Bin 0 -> 6269 bytes go.dev/testdata/golden/images/google-logo.png | Bin 0 -> 24881 bytes go.dev/testdata/golden/images/google-logo.svg | 38 + go.dev/testdata/golden/images/google-white.png | Bin 0 -> 6302 bytes go.dev/testdata/golden/images/gopher-footer.jpg | Bin 0 -> 89734 bytes go.dev/testdata/golden/images/gophers/biplane.svg | 1 + go.dev/testdata/golden/images/gophers/blue.svg | 1 + go.dev/testdata/golden/images/gophers/factory.png | Bin 0 -> 38325 bytes go.dev/testdata/golden/images/gophers/front.svg | 1 + .../golden/images/gophers/graduate-colorized.svg | 1 + go.dev/testdata/golden/images/gophers/graduate.svg | 1 + go.dev/testdata/golden/images/gophers/green.svg | 1 + go.dev/testdata/golden/images/gophers/grey.svg | 1 + go.dev/testdata/golden/images/gophers/happy.svg | 1 + .../golden/images/gophers/headlamp-colorized.svg | 1 + go.dev/testdata/golden/images/gophers/headlamp.svg | 1 + go.dev/testdata/golden/images/gophers/ladder.svg | 1 + .../golden/images/gophers/machine-colorized.svg | 1 + go.dev/testdata/golden/images/gophers/machine.svg | 1 + .../golden/images/gophers/megaphone-gopher.svg | 45 + .../testdata/golden/images/gophers/megaphone.svg | 1 + .../testdata/golden/images/gophers/motorcycle.svg | 1 + .../testdata/golden/images/gophers/newscasters.png | Bin 0 -> 7707 bytes go.dev/testdata/golden/images/gophers/peach.svg | 1 + .../testdata/golden/images/gophers/pilot-bust.svg | 1 + go.dev/testdata/golden/images/gophers/pink.svg | 1 + go.dev/testdata/golden/images/gophers/running.svg | 1 + .../golden/images/gophers/shopping-cart.png | Bin 0 -> 139736 bytes .../golden/images/gophers/skateboarding.svg | 227 ++ go.dev/testdata/golden/images/gophers/slate.svg | 1 + go.dev/testdata/golden/images/gophers/violet.svg | 1 + go.dev/testdata/golden/images/gophers/wrench.svg | 1 + go.dev/testdata/golden/images/gophers/yellow.svg | 1 + .../testdata/golden/images/icons/arrow-forward.svg | 8 + .../testdata/golden/images/icons/chevron-down.svg | 3 + go.dev/testdata/golden/images/icons/code.svg | 9 + .../golden/images/icons/command-folder.svg | 7 + go.dev/testdata/golden/images/icons/gear.svg | 14 + go.dev/testdata/golden/images/icons/package.svg | 10 + go.dev/testdata/golden/images/icons/sphere.svg | 3 + go.dev/testdata/golden/images/learn/clis.png | Bin 0 -> 5889 bytes go.dev/testdata/golden/images/learn/codecademy.png | Bin 0 -> 740 bytes go.dev/testdata/golden/images/learn/codelabs.png | Bin 0 -> 970 bytes go.dev/testdata/golden/images/learn/codelabs_2.png | Bin 0 -> 16372 bytes .../testdata/golden/images/learn/commandline.svg | 1 + .../golden/images/learn/concurrency-in-go.png | Bin 0 -> 27279 bytes go.dev/testdata/golden/images/learn/coursera.png | Bin 0 -> 4517 bytes go.dev/testdata/golden/images/learn/earth.png | Bin 0 -> 18083 bytes go.dev/testdata/golden/images/learn/edureka.png | Bin 0 -> 26261 bytes go.dev/testdata/golden/images/learn/exercism.png | Bin 0 -> 1832 bytes .../images/learn/get-programming-with-go.jpeg | Bin 0 -> 43353 bytes .../images/learn/go-programming-blueprints.png | Bin 0 -> 32969 bytes .../images/learn/go-programming-language-book.png | Bin 0 -> 59228 bytes .../testdata/golden/images/learn/go_cdk_logo.png | Bin 0 -> 11959 bytes .../testdata/golden/images/learn/gobyexample.png | Bin 0 -> 8375 bytes .../testdata/golden/images/learn/gohelloworld.png | Bin 0 -> 37836 bytes .../testdata/golden/images/learn/gophercises.png | Bin 0 -> 48432 bytes go.dev/testdata/golden/images/learn/helloworld.png | Bin 0 -> 35540 bytes go.dev/testdata/golden/images/learn/install.png | Bin 0 -> 7977 bytes .../golden/images/learn/introducing-go-book.png | Bin 0 -> 56439 bytes go.dev/testdata/golden/images/learn/qwiklabs.png | Bin 0 -> 2761 bytes .../testdata/golden/images/learn/star-rating.png | Bin 0 -> 280 bytes go.dev/testdata/golden/images/learn/tour.png | Bin 0 -> 15249 bytes go.dev/testdata/golden/images/learn/web-dev.png | Bin 0 -> 5142 bytes .../golden/images/logos/american-express.png | Bin 0 -> 28257 bytes .../golden/images/logos/american-express.svg | 1 + go.dev/testdata/golden/images/logos/amex-logo.png | Bin 0 -> 38594 bytes go.dev/testdata/golden/images/logos/amex.svg | 34 + go.dev/testdata/golden/images/logos/armut.png | Bin 0 -> 15990 bytes go.dev/testdata/golden/images/logos/caddy.svg | 1 + .../testdata/golden/images/logos/capital-one.svg | 41 + go.dev/testdata/golden/images/logos/chrome.svg | 1 + .../golden/images/logos/cloudflare-icon.svg | 1 + go.dev/testdata/golden/images/logos/cloudflare.png | Bin 0 -> 37318 bytes go.dev/testdata/golden/images/logos/cloudflare.svg | 33 + go.dev/testdata/golden/images/logos/cockroach.svg | 1 + go.dev/testdata/golden/images/logos/comcast.svg | 65 + go.dev/testdata/golden/images/logos/curve.png | Bin 0 -> 30753 bytes go.dev/testdata/golden/images/logos/curve.svg | 34 + go.dev/testdata/golden/images/logos/docker.svg | 1 + go.dev/testdata/golden/images/logos/drone.svg | 1 + .../testdata/golden/images/logos/dropbox-icon.svg | 1 + go.dev/testdata/golden/images/logos/dropbox.png | Bin 0 -> 2978 bytes go.dev/testdata/golden/images/logos/dropbox.svg | 1 + go.dev/testdata/golden/images/logos/economist.svg | 20 + go.dev/testdata/golden/images/logos/etcd.svg | 1 + go.dev/testdata/golden/images/logos/facebook.png | Bin 0 -> 24059 bytes go.dev/testdata/golden/images/logos/firebase.svg | 2 + go.dev/testdata/golden/images/logos/github.svg | 59 + go.dev/testdata/golden/images/logos/gokit.png | Bin 0 -> 4657 bytes .../testdata/golden/images/logos/google-cloud.png | Bin 0 -> 9328 bytes .../testdata/golden/images/logos/google-cloud.svg | 1 + .../golden/images/logos/google-fourcolor.svg | 1 + go.dev/testdata/golden/images/logos/google-g.svg | 1 + go.dev/testdata/golden/images/logos/google.svg | 26 + go.dev/testdata/golden/images/logos/govuk.svg | 1 + go.dev/testdata/golden/images/logos/grail.png | Bin 0 -> 5134 bytes go.dev/testdata/golden/images/logos/grail.svg | 18 + go.dev/testdata/golden/images/logos/hugo.svg | 13 + go.dev/testdata/golden/images/logos/ibm.svg | 1 + go.dev/testdata/golden/images/logos/kubernetes.svg | 1 + .../golden/images/logos/lets-encrypt-icon.svg | 1 + .../testdata/golden/images/logos/lets-encrypt.svg | 1 + go.dev/testdata/golden/images/logos/mattermost.png | Bin 0 -> 28180 bytes go.dev/testdata/golden/images/logos/medium.svg | 1 + .../testdata/golden/images/logos/mercado-libre.png | Bin 0 -> 38435 bytes .../testdata/golden/images/logos/mercadoLibre.svg | 95 + go.dev/testdata/golden/images/logos/microsoft.png | Bin 0 -> 7139 bytes go.dev/testdata/golden/images/logos/microsoft.svg | 160 + go.dev/testdata/golden/images/logos/mongodb.svg | 1 + go.dev/testdata/golden/images/logos/netflix.svg | 1 + go.dev/testdata/golden/images/logos/paypal.svg | 1 + go.dev/testdata/golden/images/logos/prometheus.svg | 50 + go.dev/testdata/golden/images/logos/riotgames.png | Bin 0 -> 110393 bytes go.dev/testdata/golden/images/logos/salesforce.svg | 62 + .../golden/images/logos/sitereliability.svg | 1 + go.dev/testdata/golden/images/logos/stripe.svg | 121 + go.dev/testdata/golden/images/logos/target.svg | 1 + .../golden/images/logos/terraform-icon.svg | 1 + go.dev/testdata/golden/images/logos/terraform.png | Bin 0 -> 4951 bytes .../images/logos/the-new-york-times-icon.svg | 1 + go.dev/testdata/golden/images/logos/twitch.svg | 24 + go.dev/testdata/golden/images/logos/twitter.svg | 12 + .../testdata/golden/images/logos/uber-app-icon.svg | 14 + go.dev/testdata/golden/images/logos/uber.svg | 23 + go.dev/testdata/golden/images/logos/vitess.png | Bin 0 -> 83229 bytes go.dev/testdata/golden/images/logos/wildlife.svg | 14 + go.dev/testdata/golden/images/logos/youtube.svg | 1 + go.dev/testdata/golden/images/meetup.svg | 47 + go.dev/testdata/golden/images/menu-24px-white.svg | 1 + go.dev/testdata/golden/images/menu-24px.svg | 1 + go.dev/testdata/golden/images/quote.svg | 3 + go.dev/testdata/golden/images/sap-logo.png | Bin 0 -> 11718 bytes go.dev/testdata/golden/images/star-24px.svg | 1 + go.dev/testdata/golden/images/walmart-logo.png | Bin 0 -> 543912 bytes go.dev/testdata/golden/index.html | 1558 +++++++++ go.dev/testdata/golden/index.xml | 304 ++ go.dev/testdata/golden/js/carousels.js | 183 + go.dev/testdata/golden/js/hats.js | 74 + go.dev/testdata/golden/js/misc.js | 187 ++ go.dev/testdata/golden/js/searchBox.js | 64 + go.dev/testdata/golden/js/site.js | 183 + go.dev/testdata/golden/learn/index.html | 1265 +++++++ go.dev/testdata/golden/learn/index.xml | 14 + go.dev/testdata/golden/robots.txt | 2 + .../testdata/golden/series/case-studies/index.html | 540 +++ .../testdata/golden/series/case-studies/index.xml | 236 ++ go.dev/testdata/golden/series/index.html | 330 ++ go.dev/testdata/golden/series/index.xml | 33 + go.dev/testdata/golden/series/use-cases/index.html | 350 ++ go.dev/testdata/golden/series/use-cases/index.xml | 54 + go.dev/testdata/golden/sitemap.xml | 90 + .../golden/solutions/americanexpress/amex-logo.png | Bin 0 -> 72648 bytes .../golden/solutions/americanexpress/index.html | 477 +++ go.dev/testdata/golden/solutions/armut/index.html | 389 +++ .../golden/solutions/capital-one/index.html | 389 +++ .../testdata/golden/solutions/capital-one/logo.svg | 2 + go.dev/testdata/golden/solutions/chrome/index.html | 1 + .../testdata/golden/solutions/clis/CLI-green.svg | 13 + .../testdata/golden/solutions/clis/cli-white.svg | 19 + go.dev/testdata/golden/solutions/clis/index.html | 784 +++++ .../golden/solutions/cloud/cloud-green.svg | 9 + .../golden/solutions/cloud/cloud-white.svg | 13 + go.dev/testdata/golden/solutions/cloud/index.html | 898 +++++ .../golden/solutions/cloudflare/index.html | 389 +++ .../testdata/golden/solutions/cloudflare/logo.png | Bin 0 -> 45434 bytes .../golden/solutions/cockroachlabs/index.html | 389 +++ .../golden/solutions/cockroachlabs/logo.png | Bin 0 -> 9557 bytes .../testdata/golden/solutions/coredata/index.html | 1 + go.dev/testdata/golden/solutions/curve/index.html | 389 +++ go.dev/testdata/golden/solutions/curve/logo.png | Bin 0 -> 178749 bytes go.dev/testdata/golden/solutions/devops/index.html | 796 +++++ .../testdata/golden/solutions/devops/ops-green.svg | 14 + .../testdata/golden/solutions/devops/ops-white.svg | 18 + .../testdata/golden/solutions/dropbox/index.html | 389 +++ go.dev/testdata/golden/solutions/dropbox/logo.svg | 9 + .../testdata/golden/solutions/facebook/index.html | 389 +++ .../testdata/golden/solutions/firebase/index.html | 1 + .../golden/solutions/google/chrome/index.html | 459 +++ .../golden/solutions/google/coredata/index.html | 487 +++ .../golden/solutions/google/firebase/index.html | 474 +++ go.dev/testdata/golden/solutions/google/index.html | 462 +++ go.dev/testdata/golden/solutions/google/index.xml | 54 + .../solutions/google/sitereliability/index.html | 510 +++ go.dev/testdata/golden/solutions/grail/index.html | 389 +++ go.dev/testdata/golden/solutions/grail/logo.png | Bin 0 -> 12225 bytes go.dev/testdata/golden/solutions/index.html | 1166 +++++++ go.dev/testdata/golden/solutions/index.xml | 236 ++ .../golden/solutions/mercadolibre/index.html | 571 ++++ .../golden/solutions/mercadolibre/logo.svg | 119 + .../testdata/golden/solutions/microsoft/index.html | 389 +++ .../testdata/golden/solutions/netflix/index.html | 389 +++ go.dev/testdata/golden/solutions/netflix/logo.svg | 1 + go.dev/testdata/golden/solutions/paypal/index.html | 482 +++ go.dev/testdata/golden/solutions/paypal/logo.svg | 28 + .../testdata/golden/solutions/riotgames/index.html | 389 +++ .../golden/solutions/riotgames/riotgames.png | Bin 0 -> 110393 bytes .../golden/solutions/salesforce/index.html | 389 +++ .../testdata/golden/solutions/salesforce/logo.svg | 16 + .../golden/solutions/sitereliability/index.html | 1 + go.dev/testdata/golden/solutions/target/index.html | 389 +++ go.dev/testdata/golden/solutions/target/logo.svg | 10 + go.dev/testdata/golden/solutions/twitch/index.html | 389 +++ go.dev/testdata/golden/solutions/twitch/logo.svg | 19 + .../testdata/golden/solutions/twitter/index.html | 389 +++ go.dev/testdata/golden/solutions/twitter/logo.svg | 1 + go.dev/testdata/golden/solutions/uber/index.html | 389 +++ go.dev/testdata/golden/solutions/uber/logo.svg | 7 + go.dev/testdata/golden/solutions/webdev/index.html | 870 +++++ .../golden/solutions/webdev/webdev-green.svg | 15 + .../golden/solutions/webdev/webdev-white.svg | 19 + .../golden/solutions/wildlifestudios/index.html | 389 +++ .../golden/solutions/wildlifestudios/logo.png | Bin 0 -> 61518 bytes go.dev/testdata/golden/tags/index.html | 314 ++ go.dev/testdata/golden/tags/index.xml | 14 + go.dev/testdata/golden/tos/index.html | 316 ++ 253 files changed, 27781 insertions(+) create mode 100644 go.dev/testdata/golden/about/index.html create mode 100644 go.dev/testdata/golden/categories/index.html create mode 100644 go.dev/testdata/golden/categories/index.xml create mode 100644 go.dev/testdata/golden/copyright/index.html create mode 100644 go.dev/testdata/golden/css/styles.73fb2ccdcaa5280aaf4dffb96bf0f7621d090f417ecd7883100b759d4dc23c5d.css create mode 100644 go.dev/testdata/golden/images/SCN_magnifying_glass_cloud_site.png create mode 100644 go.dev/testdata/golden/images/adobe-logo.png create mode 100644 go.dev/testdata/golden/images/books/building-microservices-with-go.jpg create mode 100644 go.dev/testdata/golden/images/books/building-restful-web-services-with-go.jpg create mode 100644 go.dev/testdata/golden/images/books/go-in-action.jpg create mode 100644 go.dev/testdata/golden/images/books/go-programming-for-network-operations.jpg create mode 100644 go.dev/testdata/golden/images/books/go-web-development-cookbook.jpg create mode 100644 go.dev/testdata/golden/images/books/go-web-programming.jpg create mode 100644 go.dev/testdata/golden/images/books/hands-on-software-architecture-with-golang.jpg create mode 100644 go.dev/testdata/golden/images/books/mastering-go-web-services.jpg create mode 100644 go.dev/testdata/golden/images/books/powerful-command-line-applications-in-go.jpg create mode 100644 go.dev/testdata/golden/images/books/web-development-with-go.jpg create mode 100644 go.dev/testdata/golden/images/close-24px.svg create mode 100644 go.dev/testdata/golden/images/companies-using-go-hero.svg create mode 100644 go.dev/testdata/golden/images/device-information.png create mode 100644 go.dev/testdata/golden/images/empty_case_study.png create mode 100644 go.dev/testdata/golden/images/empty_case_study_2.png create mode 100644 go.dev/testdata/golden/images/go-logo-blue.svg create mode 100644 go.dev/testdata/golden/images/go-logo-white.svg create mode 100644 go.dev/testdata/golden/images/go_amex_case_study.png create mode 100644 go.dev/testdata/golden/images/go_amex_case_study_logo.png create mode 100644 go.dev/testdata/golden/images/go_at&t_case_study.png create mode 100644 go.dev/testdata/golden/images/go_at_t_case_study_logo.png create mode 100644 go.dev/testdata/golden/images/go_chrome_case_study.png create mode 100644 go.dev/testdata/golden/images/go_core_data_case_study.png create mode 100644 go.dev/testdata/golden/images/go_firebase_case_study.png create mode 100644 go.dev/testdata/golden/images/go_google_case_study_carousel.png create mode 100644 go.dev/testdata/golden/images/go_mercadolibre_case_study.png create mode 100644 go.dev/testdata/golden/images/go_mercadolibre_case_study_logo.png create mode 100644 go.dev/testdata/golden/images/go_paypal_case_study.png create mode 100644 go.dev/testdata/golden/images/go_paypal_case_study_logo.png create mode 100644 go.dev/testdata/golden/images/go_sitereliability_case_study.png create mode 100644 go.dev/testdata/golden/images/google-grey.png create mode 100644 go.dev/testdata/golden/images/google-logo.png create mode 100644 go.dev/testdata/golden/images/google-logo.svg create mode 100644 go.dev/testdata/golden/images/google-white.png create mode 100644 go.dev/testdata/golden/images/gopher-footer.jpg create mode 100644 go.dev/testdata/golden/images/gophers/biplane.svg create mode 100644 go.dev/testdata/golden/images/gophers/blue.svg create mode 100644 go.dev/testdata/golden/images/gophers/factory.png create mode 100644 go.dev/testdata/golden/images/gophers/front.svg create mode 100644 go.dev/testdata/golden/images/gophers/graduate-colorized.svg create mode 100644 go.dev/testdata/golden/images/gophers/graduate.svg create mode 100644 go.dev/testdata/golden/images/gophers/green.svg create mode 100644 go.dev/testdata/golden/images/gophers/grey.svg create mode 100644 go.dev/testdata/golden/images/gophers/happy.svg create mode 100644 go.dev/testdata/golden/images/gophers/headlamp-colorized.svg create mode 100644 go.dev/testdata/golden/images/gophers/headlamp.svg create mode 100644 go.dev/testdata/golden/images/gophers/ladder.svg create mode 100644 go.dev/testdata/golden/images/gophers/machine-colorized.svg create mode 100644 go.dev/testdata/golden/images/gophers/machine.svg create mode 100644 go.dev/testdata/golden/images/gophers/megaphone-gopher.svg create mode 100644 go.dev/testdata/golden/images/gophers/megaphone.svg create mode 100644 go.dev/testdata/golden/images/gophers/motorcycle.svg create mode 100644 go.dev/testdata/golden/images/gophers/newscasters.png create mode 100644 go.dev/testdata/golden/images/gophers/peach.svg create mode 100644 go.dev/testdata/golden/images/gophers/pilot-bust.svg create mode 100644 go.dev/testdata/golden/images/gophers/pink.svg create mode 100644 go.dev/testdata/golden/images/gophers/running.svg create mode 100644 go.dev/testdata/golden/images/gophers/shopping-cart.png create mode 100644 go.dev/testdata/golden/images/gophers/skateboarding.svg create mode 100644 go.dev/testdata/golden/images/gophers/slate.svg create mode 100644 go.dev/testdata/golden/images/gophers/violet.svg create mode 100644 go.dev/testdata/golden/images/gophers/wrench.svg create mode 100644 go.dev/testdata/golden/images/gophers/yellow.svg create mode 100644 go.dev/testdata/golden/images/icons/arrow-forward.svg create mode 100644 go.dev/testdata/golden/images/icons/chevron-down.svg create mode 100644 go.dev/testdata/golden/images/icons/code.svg create mode 100644 go.dev/testdata/golden/images/icons/command-folder.svg create mode 100644 go.dev/testdata/golden/images/icons/gear.svg create mode 100644 go.dev/testdata/golden/images/icons/package.svg create mode 100644 go.dev/testdata/golden/images/icons/sphere.svg create mode 100644 go.dev/testdata/golden/images/learn/clis.png create mode 100644 go.dev/testdata/golden/images/learn/codecademy.png create mode 100644 go.dev/testdata/golden/images/learn/codelabs.png create mode 100644 go.dev/testdata/golden/images/learn/codelabs_2.png create mode 100644 go.dev/testdata/golden/images/learn/commandline.svg create mode 100644 go.dev/testdata/golden/images/learn/concurrency-in-go.png create mode 100644 go.dev/testdata/golden/images/learn/coursera.png create mode 100644 go.dev/testdata/golden/images/learn/earth.png create mode 100644 go.dev/testdata/golden/images/learn/edureka.png create mode 100644 go.dev/testdata/golden/images/learn/exercism.png create mode 100644 go.dev/testdata/golden/images/learn/get-programming-with-go.jpeg create mode 100644 go.dev/testdata/golden/images/learn/go-programming-blueprints.png create mode 100644 go.dev/testdata/golden/images/learn/go-programming-language-book.png create mode 100644 go.dev/testdata/golden/images/learn/go_cdk_logo.png create mode 100644 go.dev/testdata/golden/images/learn/gobyexample.png create mode 100644 go.dev/testdata/golden/images/learn/gohelloworld.png create mode 100644 go.dev/testdata/golden/images/learn/gophercises.png create mode 100644 go.dev/testdata/golden/images/learn/helloworld.png create mode 100644 go.dev/testdata/golden/images/learn/install.png create mode 100644 go.dev/testdata/golden/images/learn/introducing-go-book.png create mode 100644 go.dev/testdata/golden/images/learn/qwiklabs.png create mode 100644 go.dev/testdata/golden/images/learn/star-rating.png create mode 100644 go.dev/testdata/golden/images/learn/tour.png create mode 100644 go.dev/testdata/golden/images/learn/web-dev.png create mode 100644 go.dev/testdata/golden/images/logos/american-express.png create mode 100644 go.dev/testdata/golden/images/logos/american-express.svg create mode 100644 go.dev/testdata/golden/images/logos/amex-logo.png create mode 100644 go.dev/testdata/golden/images/logos/amex.svg create mode 100644 go.dev/testdata/golden/images/logos/armut.png create mode 100644 go.dev/testdata/golden/images/logos/caddy.svg create mode 100644 go.dev/testdata/golden/images/logos/capital-one.svg create mode 100644 go.dev/testdata/golden/images/logos/chrome.svg create mode 100644 go.dev/testdata/golden/images/logos/cloudflare-icon.svg create mode 100644 go.dev/testdata/golden/images/logos/cloudflare.png create mode 100644 go.dev/testdata/golden/images/logos/cloudflare.svg create mode 100644 go.dev/testdata/golden/images/logos/cockroach.svg create mode 100644 go.dev/testdata/golden/images/logos/comcast.svg create mode 100644 go.dev/testdata/golden/images/logos/curve.png create mode 100644 go.dev/testdata/golden/images/logos/curve.svg create mode 100644 go.dev/testdata/golden/images/logos/docker.svg create mode 100644 go.dev/testdata/golden/images/logos/drone.svg create mode 100644 go.dev/testdata/golden/images/logos/dropbox-icon.svg create mode 100644 go.dev/testdata/golden/images/logos/dropbox.png create mode 100644 go.dev/testdata/golden/images/logos/dropbox.svg create mode 100644 go.dev/testdata/golden/images/logos/economist.svg create mode 100644 go.dev/testdata/golden/images/logos/etcd.svg create mode 100644 go.dev/testdata/golden/images/logos/facebook.png create mode 100644 go.dev/testdata/golden/images/logos/firebase.svg create mode 100644 go.dev/testdata/golden/images/logos/github.svg create mode 100644 go.dev/testdata/golden/images/logos/gokit.png create mode 100644 go.dev/testdata/golden/images/logos/google-cloud.png create mode 100644 go.dev/testdata/golden/images/logos/google-cloud.svg create mode 100644 go.dev/testdata/golden/images/logos/google-fourcolor.svg create mode 100644 go.dev/testdata/golden/images/logos/google-g.svg create mode 100644 go.dev/testdata/golden/images/logos/google.svg create mode 100644 go.dev/testdata/golden/images/logos/govuk.svg create mode 100644 go.dev/testdata/golden/images/logos/grail.png create mode 100644 go.dev/testdata/golden/images/logos/grail.svg create mode 100644 go.dev/testdata/golden/images/logos/hugo.svg create mode 100644 go.dev/testdata/golden/images/logos/ibm.svg create mode 100644 go.dev/testdata/golden/images/logos/kubernetes.svg create mode 100644 go.dev/testdata/golden/images/logos/lets-encrypt-icon.svg create mode 100644 go.dev/testdata/golden/images/logos/lets-encrypt.svg create mode 100644 go.dev/testdata/golden/images/logos/mattermost.png create mode 100644 go.dev/testdata/golden/images/logos/medium.svg create mode 100644 go.dev/testdata/golden/images/logos/mercado-libre.png create mode 100644 go.dev/testdata/golden/images/logos/mercadoLibre.svg create mode 100644 go.dev/testdata/golden/images/logos/microsoft.png create mode 100644 go.dev/testdata/golden/images/logos/microsoft.svg create mode 100644 go.dev/testdata/golden/images/logos/mongodb.svg create mode 100644 go.dev/testdata/golden/images/logos/netflix.svg create mode 100644 go.dev/testdata/golden/images/logos/paypal.svg create mode 100644 go.dev/testdata/golden/images/logos/prometheus.svg create mode 100644 go.dev/testdata/golden/images/logos/riotgames.png create mode 100644 go.dev/testdata/golden/images/logos/salesforce.svg create mode 100644 go.dev/testdata/golden/images/logos/sitereliability.svg create mode 100644 go.dev/testdata/golden/images/logos/stripe.svg create mode 100644 go.dev/testdata/golden/images/logos/target.svg create mode 100644 go.dev/testdata/golden/images/logos/terraform-icon.svg create mode 100644 go.dev/testdata/golden/images/logos/terraform.png create mode 100644 go.dev/testdata/golden/images/logos/the-new-york-times-icon.svg create mode 100644 go.dev/testdata/golden/images/logos/twitch.svg create mode 100644 go.dev/testdata/golden/images/logos/twitter.svg create mode 100644 go.dev/testdata/golden/images/logos/uber-app-icon.svg create mode 100644 go.dev/testdata/golden/images/logos/uber.svg create mode 100644 go.dev/testdata/golden/images/logos/vitess.png create mode 100644 go.dev/testdata/golden/images/logos/wildlife.svg create mode 100644 go.dev/testdata/golden/images/logos/youtube.svg create mode 100644 go.dev/testdata/golden/images/meetup.svg create mode 100644 go.dev/testdata/golden/images/menu-24px-white.svg create mode 100644 go.dev/testdata/golden/images/menu-24px.svg create mode 100644 go.dev/testdata/golden/images/quote.svg create mode 100644 go.dev/testdata/golden/images/sap-logo.png create mode 100644 go.dev/testdata/golden/images/star-24px.svg create mode 100644 go.dev/testdata/golden/images/walmart-logo.png create mode 100644 go.dev/testdata/golden/index.html create mode 100644 go.dev/testdata/golden/index.xml create mode 100644 go.dev/testdata/golden/js/carousels.js create mode 100644 go.dev/testdata/golden/js/hats.js create mode 100644 go.dev/testdata/golden/js/misc.js create mode 100644 go.dev/testdata/golden/js/searchBox.js create mode 100644 go.dev/testdata/golden/js/site.js create mode 100644 go.dev/testdata/golden/learn/index.html create mode 100644 go.dev/testdata/golden/learn/index.xml create mode 100644 go.dev/testdata/golden/robots.txt create mode 100644 go.dev/testdata/golden/series/case-studies/index.html create mode 100644 go.dev/testdata/golden/series/case-studies/index.xml create mode 100644 go.dev/testdata/golden/series/index.html create mode 100644 go.dev/testdata/golden/series/index.xml create mode 100644 go.dev/testdata/golden/series/use-cases/index.html create mode 100644 go.dev/testdata/golden/series/use-cases/index.xml create mode 100644 go.dev/testdata/golden/sitemap.xml create mode 100644 go.dev/testdata/golden/solutions/americanexpress/amex-logo.png create mode 100644 go.dev/testdata/golden/solutions/americanexpress/index.html create mode 100644 go.dev/testdata/golden/solutions/armut/index.html create mode 100644 go.dev/testdata/golden/solutions/capital-one/index.html create mode 100644 go.dev/testdata/golden/solutions/capital-one/logo.svg create mode 100644 go.dev/testdata/golden/solutions/chrome/index.html create mode 100644 go.dev/testdata/golden/solutions/clis/CLI-green.svg create mode 100644 go.dev/testdata/golden/solutions/clis/cli-white.svg create mode 100644 go.dev/testdata/golden/solutions/clis/index.html create mode 100644 go.dev/testdata/golden/solutions/cloud/cloud-green.svg create mode 100644 go.dev/testdata/golden/solutions/cloud/cloud-white.svg create mode 100644 go.dev/testdata/golden/solutions/cloud/index.html create mode 100644 go.dev/testdata/golden/solutions/cloudflare/index.html create mode 100644 go.dev/testdata/golden/solutions/cloudflare/logo.png create mode 100644 go.dev/testdata/golden/solutions/cockroachlabs/index.html create mode 100644 go.dev/testdata/golden/solutions/cockroachlabs/logo.png create mode 100644 go.dev/testdata/golden/solutions/coredata/index.html create mode 100644 go.dev/testdata/golden/solutions/curve/index.html create mode 100644 go.dev/testdata/golden/solutions/curve/logo.png create mode 100644 go.dev/testdata/golden/solutions/devops/index.html create mode 100644 go.dev/testdata/golden/solutions/devops/ops-green.svg create mode 100644 go.dev/testdata/golden/solutions/devops/ops-white.svg create mode 100644 go.dev/testdata/golden/solutions/dropbox/index.html create mode 100644 go.dev/testdata/golden/solutions/dropbox/logo.svg create mode 100644 go.dev/testdata/golden/solutions/facebook/index.html create mode 100644 go.dev/testdata/golden/solutions/firebase/index.html create mode 100644 go.dev/testdata/golden/solutions/google/chrome/index.html create mode 100644 go.dev/testdata/golden/solutions/google/coredata/index.html create mode 100644 go.dev/testdata/golden/solutions/google/firebase/index.html create mode 100644 go.dev/testdata/golden/solutions/google/index.html create mode 100644 go.dev/testdata/golden/solutions/google/index.xml create mode 100644 go.dev/testdata/golden/solutions/google/sitereliability/index.html create mode 100644 go.dev/testdata/golden/solutions/grail/index.html create mode 100644 go.dev/testdata/golden/solutions/grail/logo.png create mode 100644 go.dev/testdata/golden/solutions/index.html create mode 100644 go.dev/testdata/golden/solutions/index.xml create mode 100644 go.dev/testdata/golden/solutions/mercadolibre/index.html create mode 100644 go.dev/testdata/golden/solutions/mercadolibre/logo.svg create mode 100644 go.dev/testdata/golden/solutions/microsoft/index.html create mode 100644 go.dev/testdata/golden/solutions/netflix/index.html create mode 100644 go.dev/testdata/golden/solutions/netflix/logo.svg create mode 100644 go.dev/testdata/golden/solutions/paypal/index.html create mode 100644 go.dev/testdata/golden/solutions/paypal/logo.svg create mode 100644 go.dev/testdata/golden/solutions/riotgames/index.html create mode 100644 go.dev/testdata/golden/solutions/riotgames/riotgames.png create mode 100644 go.dev/testdata/golden/solutions/salesforce/index.html create mode 100644 go.dev/testdata/golden/solutions/salesforce/logo.svg create mode 100644 go.dev/testdata/golden/solutions/sitereliability/index.html create mode 100644 go.dev/testdata/golden/solutions/target/index.html create mode 100644 go.dev/testdata/golden/solutions/target/logo.svg create mode 100644 go.dev/testdata/golden/solutions/twitch/index.html create mode 100644 go.dev/testdata/golden/solutions/twitch/logo.svg create mode 100644 go.dev/testdata/golden/solutions/twitter/index.html create mode 100644 go.dev/testdata/golden/solutions/twitter/logo.svg create mode 100644 go.dev/testdata/golden/solutions/uber/index.html create mode 100644 go.dev/testdata/golden/solutions/uber/logo.svg create mode 100644 go.dev/testdata/golden/solutions/webdev/index.html create mode 100644 go.dev/testdata/golden/solutions/webdev/webdev-green.svg create mode 100644 go.dev/testdata/golden/solutions/webdev/webdev-white.svg create mode 100644 go.dev/testdata/golden/solutions/wildlifestudios/index.html create mode 100644 go.dev/testdata/golden/solutions/wildlifestudios/logo.png create mode 100644 go.dev/testdata/golden/tags/index.html create mode 100644 go.dev/testdata/golden/tags/index.xml create mode 100644 go.dev/testdata/golden/tos/index.html diff --git a/go.dev/testdata/golden/about/index.html b/go.dev/testdata/golden/about/index.html new file mode 100644 index 00000000..989d978f --- /dev/null +++ b/go.dev/testdata/golden/about/index.html @@ -0,0 +1,466 @@ + + + + + + + + + + + + + + + + + +About - go.dev + + + + + + + + +
    +
    +

    About

    + + +

    Go.dev is a companion website to golang.org. Golang.org is the home of the open source project and distribution, while go.dev is the hub for Go users providing centralized and curated resources from across the Go ecosystem.

    + +

    Go gopher +Go.dev provides:

    + +
      +
    1. Centralized information for Go packages and modules published on index.golang.org.
    2. +
    3. Essential learning resources
    4. +
    5. Critical use cases & case studies
    6. +
    + +

    Go.dev is currently in MVP status. We’re proud of what we’ve built and excited to share it with the community. We hope you find value and joy in using go.dev. Go.dev only has a small portion of features we intend to build, and we are actively seeking feedback. If you have any ideas, suggestions or issues, please let us know.

    + +

    Adding a package

    + +

    Data for the site is downloaded from proxy.golang.org. We monitor the Go Module Index regularly for new packages to add to pkg.go.dev. If you don’t see a package on pkg.go.dev, you can add it by doing one of the following:

    + +
      +
    • Visiting that page on pkg.go.dev, and clicking the “Request” button. For example:
      https://pkg.go.dev/example.com/my/module

    • + +
    • Making a request to proxy.golang.org for the module version, to any endpoint specified by the Module proxy protocol. For example:
      https://proxy.golang.org/example.com/my/module/@v/v1.0.0.info

    • + +
    • Downloading the package via the go command. For example:
      GOPROXY=https://proxy.golang.org GO111MODULE=on go get example.com/my/module@v1.0.0

    • +
    + +

    Removing a package

    + +

    If you are the author of a package and would like to have it removed from pkg.go.dev, please file an issue on the Go Issue Tracker with the path that you want to remove.

    + +

    Note that we can only remove a module entirely from the site. We cannot remove it just for specific versions.

    + +

    Documentation

    + +

    Documentation is generated based on Go source code downloaded from the Go Module Mirror at proxy.golang.org/<module>/@v/<version>.zip. New module versions are fetched from index.golang.org and added to pkg.go.dev site every few minutes.

    + +

    The guidelines for writing documentation for the godoc tool apply to pkg.go.dev.

    + +

    It’s important to write a good summary of the package in the first sentence of the package comment. The go.dev site indexes the first sentence and displays it in search results.

    + +

    Build Context

    + +

    Most Go packages look and behave the same regardless of the machine architecture +or operating system. But some have different documentation, even different +exported symbols, for different architectures or OSes. Some packages may not even +exist for some architectures.

    + +

    Go calls an OS/architecture pair a “build context” and writes it with a slash, +like linux/amd64. You may also see the terms GOOS and GOARCH for the OS +and architecture respectively, because those are the names of the environment +variables that the go command uses. (See the go command +documentation for more information.)

    + +

    If a package exists at only one build context, pkg.go.dev displays that build +context at the upper right corner of the documentation. For example, +https://pkg.go.dev/syscall/js displays “js/wasm”.

    + +

    If a package is different in different build contexts, then pkg.go.dev will +display one by default and provide a dropdown control at the upper right so you +can select a different one.

    + +

    For packages that are the same across all build contexts, pkg.go.dev does not +display any build context information.

    + +

    Although there are many possible OS/architecture pairs, pkg.go.dev considers +only a +handful +of them. So if a package only exists for unsupported build contexts, pkg.go.dev +will not display documentation for it.

    + + + +

    Most of the time, pkg.go.dev can determine the location of a package’s source +files, and provide links from symbols in the documentation to their definitions +in the source. If your package’s source is not linked, try one of the following +two approaches.

    + +

    If pkg.go.dev finds a go-source meta tag on your site that follows the +specified format, it +can often determine the right links, even though the format doesn’t take +versioning into account.

    + +

    If that doesn’t work, you will need to add your repo or code-hosting site to +pkg.go.dev’s list of patterns (see Go Issue 40477 for context). +Read about how to contribute to pkg.go.dev, +then produce a CL that adds a pattern to the +internal/source +package.

    + +

    Best practices

    + +

    Pkg.go.dev surfaces details about Go packages and modules in order to help provide guidelines for best practices with Go.

    + +

    Here are the details we surface:

    + +
      +
    • Has go.mod file

      + +
        +
      • The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go. A module version is defined by a tree of source files, with a go.mod file in its root. More information about the go.mod file.
      • +
    • + +
    • Redistributable license

      + +
        +
      • Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed. For more information on how pkg.go.dev determines if a license is redistributable, see our license policy.
      • +
    • + +
    • Tagged version

      + +
        +
      • When the go get command resolves modules by default it prioritizes tagged versions. When no tagged versions exist, go get looks up the latest known commit. Modules with tagged versions give importers more predictable builds. See semver.org and Keeping Your Modules Compatible for more information.
      • +
    • + +
    • Stable version

      + +
        +
      • Projects at v0 are assumed to be experimental. When a project reaches a stable version — major version v1 or higher — breaking changes must be done in a new major version. Stable versions give developers the confidence that breaking changes won’t occur when they upgrade a package to the latest minor version. See Go Modules: v2 and Beyond for more information.
      • +
    • +
    + +

    Creating a badge

    + +

    The pkg.go.dev badge provides a way for Go users to learn about the pkg.go.dev page associated with a given Go package or module. You can create a badge using the badge generation tool. The tool will generate html and markdown snippets that you can use on your project website or in a README file.

    + +

    PkgGoDev

    + + + +

    You can add links to your README files and package documentation that will be +shown on the right side of the pkg.go.dev page. For details, see this +issue.

    + +

    Keyboard Shortcuts

    + +

    There are keyboard shortcuts for navigating package documentation pages. Type ‘?’ on a package page for help.

    + +

    Bookmarklet

    + +

    The pkg.go.dev bookmarklet navigates from pages on source code hosts, such as GitHub, Bitbucket, Launchpad etc., to the package documentation. To install the bookmarklet, click and drag the following link to your bookmark bar: Pkg.go.dev Doc

    + +

    License policy

    + +

    Information for a given package or module may be limited if we are not able to detect a suitable license. See our license policy for more information.

    + +

    Feedback

    + +

    Share your ideas, feature requests, and bugs on the Go Issue Tracker For questions, please post on the #tools slack channel on the Gophers Slack, or email the golang-dev mailing list.

    + +
    +
    + + + diff --git a/go.dev/testdata/golden/categories/index.html b/go.dev/testdata/golden/categories/index.html new file mode 100644 index 00000000..f1628476 --- /dev/null +++ b/go.dev/testdata/golden/categories/index.html @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + +Categories - go.dev + + + + + + + + +
    +

    Categories

    +
      + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/categories/index.xml b/go.dev/testdata/golden/categories/index.xml new file mode 100644 index 00000000..da46ce5e --- /dev/null +++ b/go.dev/testdata/golden/categories/index.xml @@ -0,0 +1,14 @@ + + + + Categories on go.dev + https://go.dev/categories/ + Recent content in Categories on go.dev + Hugo -- gohugo.io + en + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/copyright/index.html b/go.dev/testdata/golden/copyright/index.html new file mode 100644 index 00000000..acfe6bb1 --- /dev/null +++ b/go.dev/testdata/golden/copyright/index.html @@ -0,0 +1,316 @@ + + + + + + + + + + + + + + + + + +Copyright - go.dev + + + + + + + + +
    + +
    + + + diff --git a/go.dev/testdata/golden/css/styles.73fb2ccdcaa5280aaf4dffb96bf0f7621d090f417ecd7883100b759d4dc23c5d.css b/go.dev/testdata/golden/css/styles.73fb2ccdcaa5280aaf4dffb96bf0f7621d090f417ecd7883100b759d4dc23c5d.css new file mode 100644 index 00000000..ab6525d6 --- /dev/null +++ b/go.dev/testdata/golden/css/styles.73fb2ccdcaa5280aaf4dffb96bf0f7621d090f417ecd7883100b759d4dc23c5d.css @@ -0,0 +1,3485 @@ +*, +:before, +:after { + box-sizing: border-box; +} +body { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, + 'Apple Color Emoji', 'Segoe UI Emoji'; + max-height: 100%; +} +button, +input, +select, +textarea { + font: inherit; +} +code, +pre { + font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; +} +html, +.Site { + max-height: 100%; + scroll-behavior: smooth; + scroll-padding-top: 4.6875rem; +} +a, +a:link, +a:visited { + color: #007d9c; + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +.Site { + display: flex; + flex-direction: column; + margin: 0; +} +.bluebg { + background: #007d9c; +} +.SiteContent { + flex: 1; +} +.SiteContent--default { + margin-top: 3.5rem; +} +.SiteContent--lower { + margin-top: calc(3.5rem + 9.75rem); +} +.Site-footer { + border-top: 0.0625rem solid #dcdee0; + color: #fff; + font-size: 0.875rem; +} +.Site-header { + background: #007d9c; + border-bottom: none; + box-shadow: 0 0.0625rem 0.125rem rgba(171, 171, 171, 0.3); + position: fixed; + top: 0; + width: 100%; + z-index: 10; +} +.CaseStudy-aboutBlock { + border: 0.0625rem solid #dcdee0; + border-radius: 0.25rem; + box-sizing: border-box; + padding: 3.75rem 2rem 3.75rem; +} +.CaseStudy-aboutBlockTitle { + color: #202224; + font-size: 1.125rem; + font-weight: 500; + line-height: 3rem; + margin-bottom: 0.6875rem; +} +.CaseStudy-aboutBlockImg { + display: block; + margin: 0 auto; + max-height: 3.125rem; +} +.CaseStudy-aboutBlockBody { + color: #464a4d; + font-size: 1rem; + letter-spacing: 0.0063rem; + line-height: 1.5rem; +} +/** + * Only show on wide viewports so the + * text never wraps or gets cut off. + */ +.Banner { + background-color: #202224; + display: none; +} +.Banner-inner { + align-items: center; + display: flex; + justify-content: space-between; + margin: 0 auto; + max-width: 75.75rem; + min-height: 2.5rem; + padding: 0.5rem 1.5rem; +} +.Banner-message { + color: #fff; + margin-right: 1.25rem; +} +.Banner-action:link, +.Banner-action:visited { + color: #fff; + text-decoration: underline; + white-space: nowrap; +} +@media only screen and (min-width: 48rem) { + .Banner { + display: block; + } + .SiteContent--default { + /* fixed header height + banner height */ + margin-top: calc(3.5rem + 2.475rem); + } + .SiteContent--lower { + margin-top: calc(3.5rem + 4.875rem); + } +} +.UseCase-halfColumn { + color: #3e4042; + display: inline-block; + font-size: 1rem; + letter-spacing: 0.0063rem; + line-height: 1.5rem; + width: 100%; +} +@media only screen and (min-width: 48rem) { + .UseCase-halfColumn { + padding-right: 1.25rem; + width: 50%; + } +} +.UseCase-halfColumn > h2 { + line-height: 1.55; +} +.Header, +.Container { + margin: 0 auto; + max-width: 75.75rem; +} +.Container--padded { + padding: 0 1.5rem; +} +.Footer { + background-color: #253443; +} +.Footer-links { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + padding: 2rem 1.5rem 2.625rem 1.5rem; +} +.Footer-linkColumn { + flex: 0 0 9.5rem; +} +a.Footer-link { + color: #fff; + display: flex; + flex: 1; + font-size: 0.875rem; + line-height: 2rem; +} +a.Footer-link--primary { + font-size: 1.125rem; + line-height: 1.75rem; + margin-bottom: 0.5rem; + margin-top: 0.75rem; +} +.Footer-bottom { + align-items: center; + border-top: 0.0625rem solid #dcdee0; + display: flex; + margin: 0 1.5rem; + min-height: 4.125rem; +} +.Footer-gopher { + align-self: flex-end; + width: 5rem; +} +.Footer-listRow { + display: flex; + flex: 1; + flex-wrap: wrap; + list-style: none; + margin: 0; + padding: 0; + text-align: center; +} +.Footer-listItem { + align-items: center; + display: flex; + flex: 1 100%; + justify-content: center; + margin: 0.4rem 0; + padding: 0 1rem; +} +.Footer-listItem a:link, +.Footer-listItem a:visited { + color: #fff; +} +@media only screen and (min-width: 52rem) { + .Footer-listItem { + flex: initial; + } + .Footer-listItem + .Footer-listItem { + border-left: 0.0625rem solid #c6c8ca; + } +} +.Footer-feedbackButton { + background: none; + border: none; + color: #fff; + font-size: 0.875rem; + padding: 0; +} +.Footer-feedbackButton:hover { + cursor: pointer; + text-decoration: underline; +} +.Footer-googleLogo { + align-self: flex-end; + height: 1.5rem; + margin-bottom: 1.3rem; + text-align: right; +} +.Footer-googleLogoImg { + height: 1.5rem; +} +.Container--fullBleed { + margin: 0; + max-width: none; +} +.Header-nav { + align-items: center; + display: flex; + height: 3.5rem; + justify-content: space-between; +} +.Header-rightContent { + align-items: center; + display: flex; + height: 100%; + justify-content: flex-end; + width: 100%; +} +.Header--dark { + border-bottom: none; + color: #fff; +} +.Header-logo { + display: block; + height: 2rem; + margin-right: 2.25rem; + width: 5.125rem; +} +.Header-logo--hidden { + display: none; +} +.Header-logo--hidden { + display: none; +} +.Header-menuItem { + display: none; +} +.Header-menu { + align-items: stretch; + display: flex; + height: 100%; + list-style: none; + margin: 0; + padding: 0; +} + +h1, +h2 { + font-weight: 600; + letter-spacing: 0.03rem; +} + +h3 { + font-size: 1.125rem; +} + +h3, +h4 { + letter-spacing: 0.08rem; +} +h5, +h6 { + font-weight: 500; + letter-spacing: 0.08rem; +} + +@media only screen and (min-width: 57.7rem) { + .Header { + padding: 0 1.5rem; + } + .Header-menuItem { + align-items: stretch; + display: inline-flex; + flex: none; + } + .Header-menu { + justify-content: flex-end; + } + .Header-navOpen { + display: none; + } +} +.Header-menuItem a:link, +.Header-menuItem a:visited { + align-items: center; + border-bottom: 0.1875rem solid transparent; + border-top: 0.1875rem solid transparent; /* To ensure the text remains centered. */ + color: #3e4042; + display: inline-flex; + margin: 0 0.3125rem; + padding: 0 0.9375rem; + text-align: center; + text-decoration: none; + width: 100%; +} +.Header--dark .Header-menuItem a:link, +.Header--dark .Header-menuItem a:visited { + color: #fff; +} +.Header-menuItem--active a:link, +.Header-menuItem--active a:visited { + border-bottom-color: #00add8; + font-weight: bold; +} +.Header-menuItem a:hover { + border-bottom-color: #fff; + color: #3e4042; +} +.Header-navOpen { + background: no-repeat center/2rem url('/images/menu-24px.svg'); + border: none; + height: 2.5rem; + margin: auto 1rem; + width: 2.5rem; +} +.Header-navOpen--white { + background: no-repeat center/2rem url('/images/menu-24px-white.svg'); +} +.NavigationDrawer { + background: #fff; + height: 100%; + left: auto; + max-width: 27rem; + position: fixed; + right: 0; + top: 0; + transform: translateX(100%); + transition: transform 100ms ease-in-out; + width: 85%; + z-index: 20; +} +.NavigationDrawer.is-active { + transform: translateX(0); +} +.NavigationDrawer-header { + align-items: center; + display: flex; + justify-content: space-between; +} +.NavigationDrawer-logo { + display: block; + height: 2rem; + margin: 1rem 1rem; + width: 5.125rem; +} +.NavigationDrawer-list { + list-style: none; + margin: 0; + padding: 0; +} +.NavigationDrawer-listItem { + font-size: 1.125rem; + margin: 0 0.5rem; +} +.NavigationDrawer-listItem a:link, +.NavigationDrawer-listItem a:visited { + display: block; + margin: 0 1rem; + padding: 0.5rem; +} +.NavigationDrawer-listItem--active { + background-color: #bfeaf4; + border-radius: 0.4rem; +} +.NavigationDrawer-scrim { + display: none; + height: 100%; + left: 0; + position: fixed; + top: 0; + width: 100%; + z-index: 5; +} +.NavigationDrawer.is-active + .NavigationDrawer-scrim { + background-color: rgba(0, 0, 0, 0.32); + display: block; +} +.Article { + color: #202224; + margin: 0 auto 1.875rem; + max-width: 45rem; + padding: 0 1.5rem; +} +.Article--solutions { + max-width: 75.75rem; +} +.Article-author, +.Article-date { + font-size: 0.875rem; + line-height: 1.375rem; +} +.Article-date { + color: #6e7072; +} +.Article h1, +.Article h2, +.Article h3, +.Article h4, +.Article h5, +.Article h6 { + color: #202224; +} +.Article h1 { + font-size: 2.25rem; + font-weight: 400; + line-height: 3rem; + margin: 1rem 0 1rem; +} +.Article h2 { + font-size: 1.4rem; + font-weight: normal; + line-height: 2rem; + margin-top: 2.25rem; +} +.Article h3 { + font-size: 1.125rem; + font-weight: 500; +} +.Article h4, +.Article h5, +.Article h6 { + font-size: 1rem; +} +.Article p, +.Article ul, +.Article ol { + color: #3e4042; + font-size: 1rem; + font-style: normal; + font-weight: normal; + letter-spacing: 0.0063rem; + line-height: 1.75rem; +} +.Article p:last-of-type { + margin-bottom: 0; +} +.Article ol .Article pre { + background-color: #fafafa; + border: 0.0625rem solid #dcdee0; + border-radius: 0.375rem; + color: #3e4042; + font-size: 1rem; + line-height: 1.45; + overflow-x: auto; + padding: 1.5rem; +} +.Article pre, +.Article code { + color: #3e4042; +} +@media only screen and (min-width: 57.7rem) { + .Article h1, + .Article h2, + .Article h4, + .Article h5, + .Article h6 { + margin: initial; + } + .Article h2 + h3 { + margin-top: 1.5rem; + } + .Article h3 { + margin-top: 1.875rem; + } + .Article h2 { + font-size: 1.5rem; + font-weight: 500; + line-height: 2.25rem; + } +} +.BreadcrumbNav-inner { + display: flex; + justify-content: start; + list-style: none; + margin: 0 auto; + max-width: 75.75rem; + padding: 0 0 1rem; +} +.BreadcrumbNav-li { + align-items: center; + display: flex; + white-space: nowrap; +} +a.BreadcrumbNav-link { + color: #202224; + font-size: 0.875rem; + text-decoration: none; +} +.BreadcrumbNav-li:last-child { + padding-right: 0.812rem; + white-space: normal; +} +.BreadcrumbNav-li:not(:last-child):after { + background: url('/images/icons/arrow-forward.svg') no-repeat; + content: ' '; + display: block; + height: 1rem; + margin: 0 0.8125rem; + width: 1rem; +} +@media only screen and (min-width: 57.7rem) { + .BreadcrumbNav-inner { + margin-top: 0; + } +} +.SubHero-gridContainer, +.WhoUses-gridContainer, +.WhoUsesHero-gridContainer, +.WhoUsesCaseStudyList-gridContainer, +.WhyGo-gridContainer, +.UseCases-gridContainer, +.LearnGo-gridContainer { + display: flex; + flex-direction: column; + flex-wrap: wrap; + margin: 0 auto; + max-width: 75.75rem; +} +.SubHero-gridContainer, +.WhoUses-gridContainer, +.WhoUsesHero-gridContainer, +.WhyGo-gridContainer, +.UseCases-gridContainer, +.LearnGo-gridContainer { + padding: 3rem 1.5rem 1rem; +} +.WhoUsesHero-gridContainer { + align-items: center; +} +@media only screen and (min-width: 28rem) { + .WhoUses-gridContainer, + .WhoUsesHero-gridContainer, + .WhoUsesCaseStudyList-gridContainer, + .WhyGo-gridContainer, + .UseCases-gridContainer, + .LearnGo-gridContainer { + flex-direction: row; + justify-content: space-between; + } + .WhoUsesHero-gridContainer { + align-items: start; + } +} +.WhyGo, +.WhoUses { + background-color: #fff; +} +.LearnGo, +.UseCases { + background-color: #fafafa; +} +.WhoUses-header, +.WhyGo-header, +.LearnGo-header { + flex: 0 0 100%; + text-align: center; +} +.WhoUses-headerH2, +.WhyGo-headerH2, +.GettingStartedGo-headerH2, +.LearnGo-header h2 { + font-size: 1.25rem; + font-style: normal; + font-weight: 500; + letter-spacing: 0.188rem; + line-height: 1.75rem; + margin-bottom: 1.5rem; + margin-bottom: 0.5rem; + margin-top: 0; +} +@media only screen and (min-width: 57.7rem) { + .WhoUses-headerH2, + .WhyGo-headerH2, + .GettingStartedGo-headerH2, + .LearnGo-header h2 { + font-size: 2.25rem; + line-height: 2.625rem; + margin-bottom: 1.5rem; + } +} +.GoCarousel { + background-color: #fafafa; + display: flex; + justify-items: center; + overflow-x: hidden; + position: relative; +} +.GoCarousel-wrapper { + margin: auto; + max-width: 62.5rem; + overflow: hidden; + position: relative; + width: 90vw; + z-index: 1; +} +.GoCarousel-slide { + border-radius: 0.125rem; + cursor: pointer; + display: flex; + position: relative; + transition: all 1s; +} +.GoCarousel-controlPrev, +.GoCarousel-controlNext { + background-color: #fff; + border-radius: 1.25rem; + border-width: 0; + box-shadow: 0 0.0625rem 0.1875rem rgba(60, 64, 67, 0.15), + 0 0.0625rem 0.125rem rgba(60, 64, 67, 0.3); + color: #848688; + display: inline-block; + font-size: 2.5rem; + height: 2rem; + line-height: 2.5rem; + outline: none; + padding: 0 0.375rem 0 0.25rem; + position: absolute; + transition: transform 100ms; + width: 2rem; + z-index: 2; +} +.GoCarousel-controlPrev:focus, +.GoCarousel-controlNext:focus { + box-shadow: 0 0.0625rem 0.5rem rgba(60, 64, 67, 0.25), + 0 0.0625rem 0.25rem rgba(60, 64, 67, 0.4); + color: #555759; +} +.GoCarousel-controlPrev[hidden], +.GoCarousel-controlNext[hidden] { + display: none; +} +.GoCarousel-icon { + user-select: none; +} +.GoCarousel-controlPrev, +.GoCarousel-controlNext { + cursor: pointer; + font-size: 1.6875rem; + text-align: center; + top: 50%; + transform: translateY(-50%); +} +.GoCarousel-controlPrev { + left: 1rem; +} +.GoCarousel-controlNext { + right: 1rem; +} +.GoCarousel-controlPrev:active, +.GoCarousel-controlNext:active { + transform: translateY(-50%) scale(0.9); +} +.GoCarousel-controlsContainer { + display: block; + margin: 0 auto; + max-width: 75.75rem; + position: relative; + width: auto; + width: 100%; +} +.GettingStartedGo-gridContainer { + display: flex; + flex-direction: column; + flex-wrap: wrap; + margin: 0 auto; + max-width: 75.75rem; + padding: 3.75rem 1.5rem 2.625rem; +} +@media only screen and (min-width: 57.7rem) { + .GettingStartedGo-gridContainer { + flex-direction: row; + } + .GoCarousel-controlPrev, + .GoCarousel-controlNext { + top: 50%; + } +} +.GettingStartedGo-header { + border-right: 0; + flex: 0 37%; + margin-bottom: 2rem; + padding-right: 0; +} +@media only screen and (min-width: 57.7rem) { + .GettingStartedGo-header { + border-right: 0.0133rem solid #f0f1f2; + margin-bottom: 0; + padding-right: 3.375rem; + } +} +.GettingStartedGo-headerDesc { + color: #3e4042; + letter-spacing: 0.0063rem; + line-height: 1.5rem; +} +.GettingStartedGo-ctas { + font-size: 0.875rem; + font-weight: normal; + letter-spacing: 0.0164rem; + line-height: 1rem; + margin-top: 1rem; +} +a.GettingStartedGo-primaryCta { + background: #007d9c; + border-radius: 0.125rem; + color: #fff; + display: inline-block; + margin-right: 1.3125rem; + padding: 0.4375rem 1.3125rem; + text-decoration: none; +} +.GettingStartedGo-resourcesSection { + display: flex; + flex: 1; + flex-direction: column; +} +@media only screen and (min-width: 38rem) { + .GettingStartedGo-resourcesSection { + flex-direction: row; + } +} +.GettingStartedGo-resourcesList { + flex: 50%; + list-style: none; + margin: 0; + padding-left: 0; + padding-right: 2.375rem; +} +@media only screen and (min-width: 57.7rem) { + .GettingStartedGo-resourcesList { + padding-left: 3.375rem; + padding-right: 0; + } +} +.GettingStartedGo-resourcesHeader { + color: #555759; + font-size: 0.6875rem; + letter-spacing: 0.0625rem; + margin-bottom: 1rem; + text-transform: uppercase; +} +.GettingStartedGo-resourceItem { + margin-bottom: 1rem; +} +a.GettingStartedGo-resourceItemTitle { + color: #202224; + font-weight: 500; + line-height: 1.5rem; +} +.GettingStartedGo-resourceItemDescription { + color: #555759; + font-size: 0.8125rem; + line-height: 1.5rem; +} +.WhoUses-header h4, +.WhyGo-headerH4, +.LearnGo-header h4, +.WhoUses-subheader { + color: #3e4042; + font-size: 0.875rem; + font-style: normal; + font-weight: normal; + letter-spacing: 0.006rem; + line-height: 1.125rem; + margin-bottom: 1.5rem; + margin-top: 0; +} +@media only screen and (min-width: 38rem) { + .WhoUses-header h4, + .WhyGo-headerH4, + .LearnGo-header h4, + .WhoUses-subheader { + font-size: 1rem; + line-height: 1.5rem; + } +} +.Hero { + color: #fff; +} +.Hero h1 { + font-size: 2.625rem; + font-weight: 500; + letter-spacing: 0.3rem; + margin: 1rem 0; +} +.Hero h2 { + font-size: 1.5rem; + font-weight: 400; + letter-spacing: 0.011rem; + max-width: 40rem; +} +.Hero-gridContainer { + column-gap: 1rem; + display: grid; + grid-template-columns: 3fr minmax(6.25rem, 1fr); + margin: 0 auto; + max-width: 40rem; + padding: 1rem 1.5rem 0; +} +.Hero-actions { + display: flex; + flex: 3 1; + flex-direction: column; + flex-wrap: wrap; + grid-column: 1 / 3; + margin-top: 1rem; +} +.Hero-actions > div { + display: flex; + width: 100%; +} +.Hero-actions a, +.Hero-actions a:visited, +.Hero-actions a:hover { + color: #fff; + margin: 0.5rem 0; + max-width: 13.75rem; + padding: 1rem 0; + text-align: center; + text-decoration: underline; +} +.Hero-actions a.Primary, +.Hero-actions a.Secondary { + align-items: center; + border-radius: 0.25rem; + display: flex; + flex-wrap: nowrap; + font-size: 0.875rem; + height: 2.5rem; + justify-content: center; + line-height: 1.3125rem; + margin: 0; + text-decoration: none; + width: 100%; +} +.Hero-actions a.Primary { + margin: 0 1.3125rem 0 0; +} +.Hero-actions a.Primary { + background-color: #fddd00; + border: 0.0625rem solid #fddd00; + box-shadow: 0 0.125rem 0.3125rem 0 rgba(0, 0, 0, 0.2); + color: #202224; +} +.Hero-actions a.Secondary { + border: 0.0625rem solid #fff; + color: #fff; +} +.DownloadBtn-versionNum { + font-size: 0.6875rem; + font-weight: 300; +} +.Hero-gopher { + align-items: flex-end; + display: flex; + grid-column: 2 / 3; + grid-row: 1 / 2; + justify-content: flex-end; +} +.Hero-gopherLadder { + bottom: 0; + height: 15rem; + max-width: 8rem; + object-fit: cover; + object-position: 100% 0; + right: 0; + width: 100%; +} +.Hero-blurb { + grid-column: 1 / 2; + margin: 0 auto; +} +.Hero-blurb h1 { + font-size: 1.375rem; + font-weight: 500; + letter-spacing: 0.0019rem; + margin-top: 0; +} +.Hero-blurbList { + font-size: 0.8125rem; + list-style: none; + margin-bottom: 0; + margin-top: 1rem; + padding: 0; +} +.Hero-blurbList li { + line-height: 1.125rem; + margin-bottom: 0.5rem; + padding-left: 1.5rem; + position: relative; +} +.Hero-blurbList svg { + left: 0; + margin-right: 0.6875rem; + position: absolute; + top: 0.3125rem; +} +.Hero-footnote { + flex-direction: column; + font-size: 0.8125rem; + letter-spacing: 0.007rem; + margin: 0.5rem 0 1.5rem; +} +.Hero-footnote p { + margin: 0; +} +.Hero-footnote p + p { + margin-top: 0.75rem; +} +.Hero-footnote a { + color: #fff; + text-decoration: underline; +} +.SubHero-gridContainer { + display: grid; + gap: 0 5vw; + grid-template-columns: 1fr; +} +.SubHero-blurb { + margin: 0 auto 0; + max-width: 25rem; +} +.SubHero-blurb:not(:last-of-type) { + margin: 0 auto 4rem; +} +.SubHero-blurb h3 { + margin-top: 0; + text-align: center; +} +.SubHero-blurb p { + margin-bottom: 0; +} +@media only screen and (min-width: 38rem) { + .Hero-blurb { + margin: auto; + } +} +@media only screen and (min-width: 48rem) { + .Hero-gridContainer { + gap: 0 5vw; + grid-template-columns: 2.5fr minmax(auto, 16.25rem); + max-width: 75.75rem; + } + .Hero-gopherLadder { + height: 23rem; + max-width: 11.5rem; + } + .Hero-actions { + align-items: flex-start; + flex: 1 1; + flex-direction: row; + grid-column: 1 / 2; + justify-content: initial; + } + .Hero-actions a, + .Hero-actions a:visited, + .Hero-actions a:hover { + max-width: 17.5rem; + } + .Hero-actions a.Primary, + .Hero-actions a.Secondary { + font-size: 1.5rem; + height: 4rem; + line-height: 1.75rem; + } + .Hero-actions a.Secondary { + margin: 0; + } + .Hero-footnote { + margin: 1rem 0 1.5rem; + } + .Hero-blurb { + grid-column: 1 / 2; + margin: 2.5rem auto 0; + } + .Hero-gopher { + grid-row: 1 / 3; + } + .Hero-blurb h1 { + font-size: 2.45rem; + font-weight: 500; + } + .Hero-blurbList { + font-size: 1rem; + } + .SubHero-gridContainer { + grid-template-columns: 1fr 1fr 1fr; + } + .SubHero-blurb { + margin: 0 auto; + } + .DownloadBtn-versionNum { + font-size: 1rem; + font-weight: 300; + } +} +.WhoUsesHero { + background-color: #fafafa; +} +.WhoUses-subheader { + color: #3e4042; + margin-bottom: 0; + margin-left: auto; + margin-right: auto; + max-width: 25rem; +} +.WhoUsesHero-gridContainer { + display: flex; + justify-content: space-between; + width: 100%; +} +.WhoUses-heroImg { + max-width: 38.75rem; + width: 100%; +} +.WhoUses-heroInnerLeft { + line-height: 1.5rem; + margin-bottom: 2rem; + margin-right: 0; + max-width: 19.625rem; + text-align: center; + width: 90%; +} +@media only screen and (min-width: 57.7rem) { + .WhoUses-heroInnerLeft { + margin-right: 2rem; + text-align: start; + width: 19.625rem; + } + .WhoUses-subheader { + max-width: none; + } +} +.WhoUses-heroInnerLeft h3 { + font-size: 1.5rem; + font-weight: normal; + margin: 1.375rem 0; +} +.WhoUses-heroInnerLeft p { + color: #6e7072; + font-size: 0.875rem; + margin-bottom: 1.188rem; +} +.WhoUsesCaseStudyList { + align-content: center; + display: flex; + flex: 0 0 100%; + justify-content: space-evenly; + list-style: none; +} +.WhoUsesCaseStudyList-gridContainer { + display: grid; + gap: 0.8rem; + grid-template-columns: repeat(3, minmax(0, 33.333%)); + margin: 1.5rem auto 3.75rem; + padding: 0; + width: 100%; +} +.WhoUsesCaseStudyList-caseStudy { + align-items: center; + display: flex; + flex: 0 1 50%; + height: 3.8512rem; + justify-content: center; + position: relative; +} +.WhoUsesCaseStudyList-caseStudy p { + display: none; +} +.WhoUsesCaseStudyList-caseStudyLink:link, +.WhoUsesCaseStudyList-caseStudyLink:visited { + color: #6e7072; + flex-direction: column; + text-align: center; + text-decoration: none; + transition: box-shadow 0.2s ease-in-out; +} +.WhoUsesCaseStudyList-caseStudyLink:link:hover { + box-shadow: 0 -0.0625rem 0.3125rem rgba(128, 134, 139, 0.09), + 0 0.1875rem 0.3125rem rgba(128, 134, 139, 0.06), + 0 0.0625rem 0.125rem rgba(60, 64, 67, 0.3), + 0 0.0625rem 0.1875rem rgba(60, 64, 67, 0.15); +} +.WhoUsesCaseStudyList-caseStudyLink img { + height: auto; +} +@media only screen and (max-width: 38rem) { + .WhoUsesCaseStudyList-caseStudyLink img { + max-height: 2rem; + max-width: 100%; + } +} +.WhoUsesCaseStudyList-logo { + margin: auto; + max-height: 4rem; + max-width: 9.375rem; + width: auto; +} +.WhoUsesCaseStudyList-caseStudyLink:link, +.WhoUsesCaseStudyList-caseStudyLink:visited { + border-radius: 0.25rem; + box-shadow: #f0f1f2 0 0.0625rem 0.25rem; + display: flex; + height: 100%; + padding: 0 0.3rem; + width: 100%; +} +.WhoUsesCaseStudyList-seeAll { + display: inline-block; + margin-left: 1rem; +} +.WhoUsesCaseStudyList-seeAll:hover { + text-decoration: none; +} +@media only screen and (min-width: 32rem) { + .WhoUsesCaseStudyList-gridContainer { + gap: 1rem 1.125rem; + } + .WhoUsesCaseStudyList-caseStudyLink { + padding: 0 1.5rem; + } + .WhoUsesCaseStudyList-caseStudy { + height: 5.9375rem; + } +} +@media only screen and (min-width: 57.7rem) { + .WhoUsesCaseStudyList-gridContainer { + grid-template-columns: repeat(4, minmax(0, 25%)); + } + .WhoUsesCaseStudyList-caseStudyLink:link, + .WhoUsesCaseStudyList-caseStudyLink:visited { + color: transparent; + } + .WhoUses-caseStudy a:link:hover, + .WhoUses-caseStudy a:visited:hover { + box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); + } + .WhoUsesCaseStudyList-caseStudyLink:link:hover + .WhoUsesCaseStudyList-caseStudyLink:visited:hover { + color: #6e7072; + transition: all 0.2s ease-in-out; + } +} +@media only screen and (min-width: 66.75rem) { + .WhoUsesCaseStudyList-gridContainer { + grid-template-columns: repeat(6, 1fr); + } + .WhoUsesCaseStudyList-caseStudy { + flex: 0 1 1fr; + } +} +.FeaturedUsers { + margin: 2.375rem auto 3.75rem; +} +.FeaturedUsers table { + border-collapse: collapse; + margin-bottom: 1.5rem; +} +.FeaturedUsers table thead { + background-color: #fafafa; +} +.FeaturedUsers table thead th { + color: #555759; + font-size: 1rem; + font-weight: 500; + line-height: 1.5rem; + padding: 0.75rem 0; +} +.FeaturedUsers table thead th:not(:nth-child(1)) { + text-align: left; +} +.FeaturedUsers table td th:not(:nth-child(1)) { + text-align: left; +} +.FeaturedUsers table tr td, +.FeaturedUsers table tr th { + padding: 1rem 0.3rem; + width: 30%; +} +.FeaturedUsers table tr td:first-of-type { + padding-left: 1rem; +} +.FeaturedUsers table tr td:first-of-type, +.FeaturedUsers table tr th:first-of-type { + width: 15%; +} +.FeaturedUsers table tr td:nth-of-type(2), +.FeaturedUsers table tr th:nth-of-type(2) { + width: 40%; +} +.FeaturedUsers table td { + color: #3e4042; + font-size: 0.875rem; + letter-spacing: 0.0117rem; + line-height: 1.5rem; + vertical-align: top; +} +.FeaturedUsers table td ul { + margin-top: 0; + padding-left: 1rem; +} +.FeaturedUsers table td ul li { + font-size: 0.875rem; + letter-spacing: 0.0117rem; + line-height: 1.5rem; +} +.FeaturedUsers table thead { + color: #555759; + font-size: 1rem; + font-weight: 500; + line-height: 1.5rem; +} +.FeaturedUsers table tbody tr { + border-bottom: 0.0625rem solid #dcdee0; +} +.FeaturedUsers table tbody tr td { + margin: 0; +} +.FeaturedUsers table tbody tr td img { + width: 5rem; +} +.FeaturedUsers-moreProjectsBtn { + background: transparent; + border: none; + color: #5dc9e2; + cursor: pointer; + font-size: 0.875rem; + padding: 0.5rem 0; + position: relative; +} +.FeaturedUsers--hiddenDesktop { + display: block; + height: 3rem; + margin-bottom: 1rem; + width: auto; +} +.FeaturedUsers--hiddenMobile, +.FeaturedUsers--hiddenMobile { + display: none; +} +@media only screen and (max-width: 48rem) { + .FeaturedUsers table tbody tr td:last-of-type { + padding-left: 1rem; + padding-top: 5rem; + } +} +@media only screen and (min-width: 48rem) { + .FeaturedUsers--hiddenMobile, + .FeaturedUsers--hiddenMobile { + display: table-cell; + } + .FeaturedUsers table tr td { + padding: 1rem 2rem 1rem 0; + width: 30%; + } + .FeaturedUsers--hiddenDesktop { + display: none; + } +} +.WhoUsesCaseStudy-librariesWrapper { + margin-bottom: 2.25rem; + margin-top: 1.875rem; +} +a.WhoUsesCaseStudy-librariesViewMoreLink { + color: #007d9c; + font-size: 0.875rem; +} +.WhoUsesCaseStudy-libraryTitle { + font-weight: 400; +} +.WhoUsesCaseStudy-librariesList { + column-gap: 7.375rem; + display: grid; + grid-template-columns: 1fr; + list-style: none; + margin: 1.5rem 0 0; + padding: 0; +} +.WhoUsesCaseStudy-librariesList h3 { + font-weight: 500; +} +.WhoUsesCaseStudy-library { + margin: 0 0 1.5rem; +} +.WhoUsesCaseStudy-library p { + color: #3e4042; + font-size: 1rem; + letter-spacing: 0.0111rem; + line-height: 1.1875rem; + margin: 0.5rem 0 0; +} +.WhoUsesCaseStudy-view-more { + margin-bottom: 2.5rem; +} +.WhoUsesCaseStudy-view-more a { + color: #3e4042; + font-size: 0.875rem; + font-style: normal; + font-weight: 500; + letter-spacing: 0.0156rem; + line-height: 1rem; + margin-bottom: 2.5rem; + text-align: center; +} +@media only screen and (min-width: 38rem) { + .WhoUsesCaseStudy-librariesList { + column-gap: 4rem; + grid-template-columns: 1fr 1fr; + } +} +.UseCases-gridContainer { + flex-direction: row; + justify-content: space-around; + margin: -1rem 0 0 -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ +} +.UseCase { + flex: 1 0 15.625rem; + margin-top: 1rem; + max-width: 15.625rem; + padding: 1rem 0 0 1rem; /* Gutter between grid cells. */ +} +.UseCase-logo { + align-items: center; + background: linear-gradient(10.64deg, #007d9c 0%, #00a29c 100%); + border-radius: 50%; + display: flex; + height: 3.75rem; + justify-content: center; + margin: auto; + width: 3.75rem; +} +.UseCase-logo img { + height: 2.625rem; + width: 2.625rem; +} +.UseCase-title { + text-align: center; +} +.UseCase-action { + font-size: 1.125rem; + line-height: 2.5rem; + text-align: center; +} +.WhyGo-gridContainer { + align-items: center; + justify-content: center; +} +.WhyGo-reasons { + column-gap: 3.313rem; + display: grid; + grid-template-columns: repeat(1, 1fr); + justify-content: space-between; + list-style: none; + padding-left: 0; + row-gap: 2rem; +} +.WhyGo-forwardArrowIcon, +.Solutions-forwardArrowIcon { + font-size: 1rem; +} +@media only screen and (min-width: 57.7rem) { + .WhyGo-reasons { + grid-template-columns: repeat(2, 1fr); + } +} +@media only screen and (min-width: 72.75rem) { + .WhyGo-reasons { + grid-template-columns: repeat(3, 1fr); + } +} +.WhyGo-reason { + border: 0.063rem solid #dcdee0; + border-radius: 0.25rem; + display: flex; + flex: 0 30%; + flex-direction: column; + height: 100%; + justify-content: space-between; + margin-bottom: 1.5rem; + margin-top: 0; + max-width: 40rem; +} +.WhyGo-reasonDetails { + padding: 2rem 2rem 0.188rem; +} +.WhyGo-reasonFooter { + background-color: rgba(246, 248, 248, 0.35); + padding: 1rem 2rem 2rem; +} +.WhyGo-reasonIcon { + margin-bottom: 1rem; + text-align: left; +} +.WhyGo-reasonIcon img { + height: 2.25rem; +} +.WhyGo-reasonLearnMoreLink { + margin-top: 1.5rem; +} +.WhyGo-reasonLearnMoreLink a { + align-items: center; + display: flex; + font-size: 0.875rem; + letter-spacing: 0.016rem; + text-decoration: none; +} +.WhyGo-reasonPackages { + color: #3e4042; + font-size: 0.875rem; + letter-spacing: 0.055rem; +} +.WhyGo-reasonPackagesHeader { + margin-bottom: 0.688rem; +} +.WhyGo-reasonPackagesHeader img { + height: 0.938rem; + margin-right: 0.376rem; + padding: 0.063rem 0 0.063rem; + vertical-align: bottom; +} +.WhyGo-reasonPackagesList { + display: flex; + flex-direction: row; + flex-wrap: wrap; + padding: 0; +} +.WhyGo-reasonPackage { + border: 0.063rem solid #bfeaf4; + border-radius: 0.125rem; + box-sizing: border-box; + color: #007d9c; + font-size: 0.688rem; + letter-spacing: 0.0129rem; + line-height: 0.813rem; + list-style: none; + margin: 0.125rem 0.5rem 0.5rem 0; + padding: 0.188rem 0.188rem; + + text-align: center; +} +.WhyGo-reasonShowMoreImgWrapper { + align-items: center; + background-color: #fafafa; + border-radius: 50%; + display: flex; + height: 14.313rem; + margin: 2.5rem auto 1.375rem; + width: 14.313rem; +} +.WhyGo-reasonShowMoreImg { + margin-left: 5%; + width: 100%; +} +.WhyGo-reasonShowMoreLink { + font-size: 0.875rem; + letter-spacing: 0.0164rem; + text-align: center; +} +.WhyGo-reasonShowMoreLink a { + border: 0.063rem solid #bfeaf4; + border-radius: 0.125rem; + box-sizing: border-box; + display: inline-block; + padding: 0.275rem 1.063rem 0.275rem 0.275rem; + text-decoration: none; +} +.WhyGo-reasonShowMoreLink a i { + padding-bottom: 0.063rem; + vertical-align: middle; +} +.WhyGo-reasonText p { + color: #3e4042; + font-size: 1rem; + font-weight: normal; + letter-spacing: 0.006rem; + line-height: 1.5rem; +} +.WhyGo-reasonTitle { + color: #202224; + font-size: 1.125rem; + font-weight: 500; + line-height: 1.5rem; +} +.WhyGo-gopher { + flex: 1; + max-width: 28.4375rem; + text-align: center; +} +.WhyGo-gopher img { + width: 100%; +} + +.headerWithLink { + display: flex; + justify-content: space-between; + width: 100%; +} + +.headerWithLink h3 { + font-weight: 500; + margin-bottom: 0; +} +.headerLink { + align-self: center; + font-size: 1.125rem; + font-weight: 600; + margin: 0; +} +.LearnGo-subHeader { + display: flex; + justify-content: space-between; + width: 100%; +} +.LearnGo-subHeader h3 { + color: #6e7072; + font-size: 1rem; + font-weight: normal; +} +.LearnGo-courses { + display: flex; + flex: 1 0 100%; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-around; + list-style: none; + margin: 0 0 1rem -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ + padding-left: 0; +} +@media only screen and (min-width: 72.75rem) { + .LearnGo-courses { + justify-content: space-between; + } +} +.LearnGo-courseItem { + align-items: center; + display: flex; + flex-wrap: wrap; + justify-content: center; + padding: 1rem 0 0 1rem; /* Gutter between grid cells. */ +} +.LearnGo-courseItem a { + color: #3e4042; +} +.LearnGo-courseTitle { + text-align: center; +} +.LearnGo-courseImage { + align-items: center; + background-color: #fff; + border-radius: 0.3125rem; + box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); + display: flex; + height: 11rem; + justify-content: center; + margin: auto; + max-width: 16.5rem; + width: 16.5rem; +} +.LearnGo-courseImage img { + max-height: 100%; + max-width: 100%; +} +.GoCarousel-eventsWrapper { + margin: auto; + max-width: 68rem; + overflow: hidden; + position: relative; + width: 84vw; +} +.GoCarousel-eventsSlides { + display: flex; + left: 0; + list-style: none; + margin: 0; + padding: 0; + position: relative; + top: 0; + transition: left 0.2s ease-out; + width: 625rem; +} +.GoCarousel-eventGroup { + align-items: flex-start; + border-radius: 0.125rem; + cursor: pointer; + display: flex; + margin: 1rem 0; + padding: 1rem; + position: relative; + transition: all 1s; + width: 84vw; +} +.GoCarousel-eventsSlidesingleItem { + display: flex; + flex: 1; + margin-right: 2rem; +} +.GoCarousel-eventThumbnail { + background-color: #fff; + border: 0.0625rem solid #dcdee0; + border-radius: 0.5rem; + display: flex; + height: 100%; + margin-right: 1.3125rem; + width: 6.625rem; +} +.GoCarousel-eventThumbnail img { + align-self: center; + height: auto; + object-fit: contain; + padding: 1rem; + width: 100%; +} +.GoCarousel-eventBody { + display: inline-flex; + flex: 1; + flex-direction: column; + height: 100%; + min-width: 0; + position: relative; +} +.GoCarousel-eventDate { + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} +.GoCarousel-eventDate p { + color: #555759; + font-size: 0.8125rem; + font-style: normal; + line-height: 1rem; + margin: 0 0 1.5rem 0; +} +.GoCarousel-eventHeader { + color: #555759; + font-size: 0.6875rem; + font-weight: 500; + letter-spacing: 0.0625rem; + line-height: 1rem; + margin: 0 0 0.875rem; + text-transform: uppercase; +} +.GoCarousel-eventName { + margin: 0 0 0.25rem 0; + width: 100%; +} +.GoCarousel-eventName a { + -webkit-box-orient: vertical; + color: #202224; + display: -webkit-box; + font-weight: 500; + -webkit-line-clamp: 2; + line-height: 1.5rem; + overflow: hidden; + text-overflow: ellipsis; +} +.LearnGo-eventDescription { + -webkit-box-orient: vertical; /* See webkit-line-clamp */ + display: -webkit-box; /* See webkit-line-clamp */ + -webkit-line-clamp: 4; /* Elide flex text. webkit-line-clamp is broadly compatible with browsers. */ +} +.GoCarousel-viewMore { + bottom: 0; + font-size: 0.875rem; + letter-spacing: 0.026rem; + line-height: 1rem; + margin: 0; + min-width: 6.25rem; + position: absolute; +} +@media only screen and (min-width: 48rem) { + .GoCarousel-eventGroup { + width: 42vw; + } +} +@media only screen and (min-width: 66.75rem) { + .GoCarousel-eventThumbnail img { + display: block; + margin: auto; + } + .GoCarousel-eventDate { + flex: 0; + flex-direction: row; + justify-content: flex-start; + min-width: 9rem; + } + .GoCarousel-eventText { + display: flex; + flex-direction: column; + height: 100%; + min-width: 0; + position: relative; + } + .GoCarousel-viewMore { + text-align: left; + width: 15.625rem; + } + .GoCarousel-eventBody { + display: flex; + flex-direction: column; + } + .GoCarousel-eventGroup { + max-width: 22.66rem; + width: 28vw; + } +} + +.Learn-hero { + background-color: #fafafa; + background-image: radial-gradient( + 60.0625rem 60.0625rem, + #bfeaf4 50%, + #fafafa 50% + ); + background-position: top -50rem left -9rem; + background-repeat: no-repeat; + background-size: 75rem 75rem; + padding: 0 2.25rem 0; +} + +.Learn-hero .Container { + max-width: 68.125rem; + position: relative; + z-index: 1; +} + +.Learn-heroInner { + display: flex; + flex-direction: column-reverse; +} + +.Learn-heroGopher { + display: flex; + justify-content: flex-end; + padding-top: 1.25rem; +} + +.Learn-heroGopher img { + height: 13.5625rem; + width: auto; +} + +.Learn-heroContent { + padding-top: 1.125rem; +} + +.Learn-heroContent a:not(.js-downloadBtn) { + text-decoration: underline; +} + +.Learn-heroContent h1 { + font-size: 1.5rem; + font-style: normal; + font-weight: normal; + line-height: 2rem; +} + +.Learn-heroContent p { + color: #6e7072; + font-size: 0.875rem; + line-height: 1.5rem; + max-width: 27.1875rem; +} + +.Learn-heroAction { + align-items: center; + background-color: #007d9c; + border-radius: 0.25rem; + display: flex; + height: 2.5rem; + justify-content: center; + width: 10.5rem; +} + +.Learn-heroAction a, +.Learn-heroAction a:hover, +.Learn-heroAction a:visited { + color: #fff; + font-size: 0.875rem; + font-weight: 500; + line-height: 1rem; + text-decoration: none; +} + +.Learn-heroAction span { + font-weight: normal; +} + +/* Learn page grid rules */ + +.LearnGo-gridContainer { + display: flex; + justify-content: center; + padding: 0rem 0rem 1rem; +} + +.Learn-cardList { + column-gap: 3.313rem; + display: grid; + grid-template-columns: repeat(1, 1fr); + justify-content: space-between; + list-style: none; + padding-left: 0; + row-gap: 2rem; +} + +.Learn-card { + height: 23.375rem; + max-width: 40rem; +} + +@media only screen and (min-width: 48rem) { + .Learn-cardList { + grid-template-columns: repeat(2, 1fr); + } +} +@media only screen and (min-width: 72.75rem) { + .Learn-cardList { + grid-template-columns: repeat(4, 1fr); + } +} + +/* End Learn page grid rules */ + +/* Learn quickstart grid */ + +.Learn-hero .Learn-quickstarts { + margin: 0; + margin-top: 4rem; +} + +.Learn-hero .Learn-quickstart { + height: auto; +} + +.Learn-hero .LearnGo-gridContainer { + padding: 3rem 0rem 3rem; +} + +@media only screen and (min-width: 48rem) { + .Learn-hero .Learn-cardList { + grid-template-columns: repeat(2, 1fr); + } +} + +@media only screen and (min-width: 57.7rem) { + .Learn-hero .Learn-cardList { + grid-template-columns: repeat(3, 1fr); + } +} +@media only screen and (min-width: 72.75rem) { + .Learn-hero .Learn-cardList { + grid-template-columns: repeat(3, 1fr); + } +} + +/* Learn hero section */ + +@media only screen and (min-width: 57.7rem) { + .Learn-hero { + background-position: top -35rem left 30rem; + } + + .Learn-heroInner { + flex-direction: row; + justify-content: space-between; + } + + .Learn-heroContent { + padding-top: 3.75rem; + } + + .Learn-heroGopher { + flex: 1; + justify-content: center; + padding-top: 2.625rem; + } + + .Learn-heroGopher img { + height: 21.0625rem; + } + + .Learn-heroAction { + height: 4rem; + width: 16.5625rem; + } + + .Learn-heroAction a, + .Learn-heroAction a:hover, + .Learn-heroAction a:visited { + font-size: 1.5rem; + line-height: 1.75rem; + } + + .Learn-heroAction span { + font-size: 1rem; + } +} + +@media only screen and (min-width: 91rem) { + .Learn-hero { + background-position: top -35rem left 50rem; + } +} + +.Learn-guided, +.Learn-online, +.Learn-selfPaced, +.Learn-books, +.Learn-inPersonTraining, +.Learn-meetups { + margin-top: 3.75rem; + padding: 0 1.5rem; +} + +.Learn-learningResources { + align-items: center; + display: flex; + flex-direction: column; + margin: 3.75rem 0; +} + +.Learn-learningResources h2, +.Learn-learningResourcesHeader h3 { + margin: 0; +} + +.Learn-learningResources h2 { + font-size: 2rem; + font-weight: 500; + letter-spacing: 0.1875rem; + line-height: 2.3125rem; +} + +.Learn-learningResourcesHeader { + display: flex; + justify-content: center; +} + +.Learn-learningResourcesHeader h3 { + font-size: 1.5rem; + font-weight: bold; + letter-spacing: normal; + line-height: 2.25rem; +} + +.Learn-selfPaced .Learn-card .Card-content { + justify-content: space-between; +} + +.Learn-online .Card-thumbnail { + background-position: 1.5rem center; + background-repeat: no-repeat; + background-size: auto 1.5rem; + height: 7.5625rem; +} + +.Learn-selfPaced .Learn-card { + height: 20.3125rem; +} + +@media only screen and (min-width: 48rem) { + .Learn-learningResourcesHeader { + display: flex; + justify-content: flex-start; + } + + .Learn-learningResourcesHeader h2 { + font-size: 2.25rem; + line-height: 2.625rem; + } +} + +.Learn-cardList.Learn-bookList { + grid-template-columns: repeat(1, 1fr); + width: 100%; +} + +.Learn-card.Learn-book { + height: auto; +} + +@media only screen and (min-width: 48rem) { + .Learn-cardList.Learn-bookList { + grid-template-columns: repeat(3, 1fr); + } + + .Learn-card.Learn-book { + max-width: 13.125rem; + } +} + +@media only screen and (min-width: 57.7rem) { + .Learn-cardList.Learn-bookList { + grid-template-columns: repeat(4, 1fr); + } +} + +@media only screen and (min-width: 72.75rem) { + .Learn-cardList.Learn-bookList { + grid-template-columns: repeat(5, 1fr); + } +} + +.Learn-inPersonList { + display: flex; + flex: 1 0 100%; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; + list-style: none; + margin: 1.875rem 0 1.875rem -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ + padding-left: 0; +} + +.Learn-inPerson { + border-bottom: 0.0625rem solid #dcdee0; + flex: 1 1 31.25rem; + margin: 0 0 0 1rem; /* Gutter between grid cells. */ + max-width: 31rem; + padding-bottom: 1.25rem; +} + +.Learn-inPerson:nth-child(1), +.Learn-inPerson:nth-child(2) { + border-top: 0.0625rem solid #dcdee0; +} +.Learn-inPersonTitle { + font-size: 1.25rem; +} +.Learn-inPersonBlurb { + margin: 0; +} + +.Learn-events { + flex: 1 0 100%; + list-style: none; + margin: 0.5rem 0 1.875rem; + padding: 0; + width: 100%; +} +.Learn-eventItem { + align-items: flex-start; + display: flex; + flex-direction: column; + padding: 1.875rem 0 0.175rem 0; +} +.Learn-eventItem + .Learn-eventItem { + border-top: 0.0625rem solid #dcdee0; +} + +.Learn-eventThumbnail { + align-self: center; + display: flex; + flex: 0 0 3rem; + height: auto; + margin-bottom: 1rem; +} +.Learn-eventThumbnail--noimage { + background-color: #fff; +} +.Learn-eventThumbnail img { + height: auto; + + object-fit: cover; + width: 100%; +} +.Learn-eventAttendees { + display: flex; +} +.Learn-eventAttendeesItem img { + border-radius: 100%; + height: 2rem; + width: 2rem; +} +.Learn-eventBody { + display: flex; + flex: 1; + flex-direction: column; + max-width: 100%; + min-width: 0; +} +.Learn-eventDate { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + + margin-bottom: 1rem; +} +.Learn-eventDate p { + color: #6e7072; + margin: 0; +} +.Learn-eventName { + color: #202224; + font-size: 1.25rem; + font-weight: 500; + margin: 0; + + margin-bottom: 1rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.Learn-eventName a { + color: #202224; + text-decoration: none; +} +.Learn-eventDescription { + -webkit-box-orient: vertical; /* See webkit-line-clamp */ + display: -webkit-box; /* See webkit-line-clamp */ + -webkit-line-clamp: 4; /* Elide flex text. webkit-line-clamp is broadly compatible with browsers. */ + line-height: 24px; + overflow: hidden; + text-overflow: ellipsis; +} +.Learn-eventText { + margin-bottom: 0.5rem; +} +.Learn-viewMore { + align-items: center; + display: flex; + font-size: 0.875rem; + margin: 0; + min-width: 6.25rem; +} +.Learn-viewMore:hover { + text-decoration: none; +} +.Learn-viewMore span { + font-size: 1rem; + margin-left: 0.48rem; +} +@media only screen and (min-width: 33.75rem) { + .Learn-eventItem { + flex-direction: row; + } + + .Learn-eventBody { + max-width: 46.825rem; + } + .Learn-eventThumbnail { + height: 8rem; + margin-bottom: 0; + margin-right: 1rem; + min-width: 8rem; + } + .Learn-eventThumbnail img { + height: 8rem; + object-fit: contain; + width: 8rem; + } + .Learn-eventDate { + flex: 0; + flex-direction: column; + justify-content: center; + min-width: 9rem; + } + .Learn-eventText { + display: flex; + flex-direction: column; + min-width: 0; + padding-right: 2rem; + } + .Learn-eventDescription { + -webkit-line-clamp: 2; /* see non-media-query definition. */ + margin: 0 0 0.5rem; + } + .Learn-viewMore { + align-self: center; + text-align: right; + } + .Learn-eventItem { + padding: 1.875rem 0; + } +} + +.Learn-tile a { + width: 100%; +} + +.Learn-tileList { + display: grid; + gap: 2rem; + grid-template-columns: repeat(2, minmax(0, 1fr)); + list-style: none; + padding: 0; +} +@media only screen and (min-width: 38rem) { + .Learn-tileList { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } +} +@media only screen and (min-width: 48rem) { + .Learn-tileList { + justify-content: space-between; + } + .Learn-tileList { + column-gap: 3rem; + } +} +.Learn-tile { + display: flex; + flex-wrap: wrap; + justify-content: center; +} +.Learn-tile a { + color: #3e4042; +} +.Learn-tileTitle { + display: block; + font-size: 0.75rem; + font-style: normal; + font-weight: normal; + letter-spacing: 0.01rem; + line-height: 0.875rem; + margin: 1.5rem auto 0; + overflow-wrap: break-word; + text-align: center; +} +.Learn-tileThumbnail { + align-items: center; + background-color: #fff; + border-radius: 0.3125rem; + box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); + display: flex; + justify-content: center; + margin: auto; + width: 100%; +} +.Learn-tileThumbnail img { + max-height: 100%; + max-width: 100%; +} +.Learn-tileThumbnail--book img { + max-height: 100%; + max-width: 100%; +} + +.Solutions-title, +.Solutions-useCases, +.Solutions-caseStudies { + margin: auto; + max-width: 75.75rem; +} +.Solutions-title, +.Solutions-useCases, +.Solutions-caseStudies { + padding: 0 1.5rem; +} +.SolutionsHeroCarousel-wrapper { + max-width: 68rem; + width: 76vw; +} +.SolutionsHeroCarousel-slides { + transition: left 0.2s ease-out; +} +.GoCarousel-controlNext-solutionsHero { + right: 0.5rem; +} +.GoCarousel-controlPrev-solutionsHero { + left: 0.5rem; +} +.SolutionsHeroCarousel-slides { + display: flex; + left: 0; + list-style: none; + margin: 0; + padding: 0; + position: relative; + top: 0; + width: 625rem; +} +.SolutionsHeroCarousel-slide { + display: flex; + flex-direction: column; + justify-content: center; + max-width: 68rem; + padding: 0 0.2rem; + position: relative; + width: 76vw; +} +@media only screen and (min-width: 38rem) { + .SolutionsHeroCarousel-wrapper, + .SolutionsHeroCarousel-slide { + width: 82vw; + } + .GoCarousel-controlPrev-solutionsHero { + left: 2rem; + } + .GoCarousel-controlNext-solutionsHero { + right: 2rem; + } +} +.Solutions-headline .Container { + display: flex; +} +.Solutions-useCases, +.Solutions-caseStudies { + margin-bottom: 6.25rem; +} +.Solutions-title { + padding: 5rem 1.5rem 3rem; +} +.Solutions-title h1, +.WhoUsesSubPage-heroInner--caseStudy h1, +.WhoUsesSubPage-heroInner--useCase h1 { + font-size: 1.5rem; + font-style: normal; + font-weight: normal; + line-height: 2rem; + margin-bottom: 0.5rem; +} +.WhoUsesSubPage-heroInner--caseStudy h1 { + margin-top: 0; +} +.WhoUsesSubPage-heroInner--useCase h1 { + margin-top: 1rem; +} +.Solutions-title h1 { + text-align: center; +} +.Solutions-title h3 { + color: #3e4042; + font-size: 1rem; + font-weight: normal; + letter-spacing: 0.0063rem; + line-height: 1.5rem; + margin-bottom: 0; + text-align: center; +} +.Solutions-headlineText { + display: inline-block; +} +.Solutions-headlineImg { + margin-top: 1.5rem; + position: relative; + width: 100%; +} +.Solutions-headlineImg img { + display: block; + width: 100%; +} +.Solutions-headlineBody { + align-items: flex-start; + color: #6e7072; + display: flex; + flex-direction: column; + font-size: 0.875rem; + font-weight: normal; + line-height: 1.5rem; + margin-bottom: 1.5rem; +} +.Solutions-headlineBody a { + align-items: center; + display: flex; + margin-top: 1rem; + text-decoration: none; +} +.Solutions-headlineBody a i, +.WhyGo-reasonLearnMoreLink a i, +.WhyGo-reasonShowMoreLink a i { + margin-left: 0.2rem; + text-decoration: none; + transition: transform 100ms ease-in-out; +} +.Solutions-headlineBody a:hover i, +.WhyGo-reasonLearnMoreLink a:hover i, +.WhyGo-reasonShowMoreLink a:hover i { + transform: translateX(0.2rem); +} +.Solutions-headlineNotification { + color: #6e7072; + font-size: 0.75rem; + font-style: normal; + font-weight: 500; + line-height: 2.25rem; + margin: 1.5rem 0; +} +.Solutions-headline { + background-color: #fafafa; +} +.Solutions-headline h2 { + color: #202224; + font-size: 1.5rem; + font-style: normal; + font-weight: normal; + line-height: 2rem; + margin-bottom: 1rem; +} +@media only screen and (min-width: 66.75rem) { + .SolutionsHeroCarousel-slide { + align-items: center; + flex-direction: row-reverse; + justify-content: space-between; + } + .Solutions-headlineText { + width: 33%; + } + .Solutions-headlineImg { + height: 100%; + margin-bottom: 0; + width: 60%; + } + .Solutions-headlineImg img { + max-height: 100%; + position: absolute; + right: 0; + top: 50%; + transform: translate(0, -50%); + } +} +.SolutionsTabs-tabList { + margin-top: 4rem; + width: 100%; +} +.SolutionsTabs-tabList hr { + border: 0.0625rem solid #c6c8ca; + margin: -0.0625rem 0 2rem; +} +.SolutionsTabs-tab { + background-color: #fff; + border-style: none; + color: #202224; + cursor: pointer; + font-size: 1rem; + font-weight: 500; + line-height: 2.25rem; + margin-right: 1.625rem; + outline: none; + padding: 0.375rem 0; +} +.SolutionsTabs-tab:focus { + border-bottom: 0.25rem solid #c6c8ca; +} +.SolutionsTabs-tab:last-of-type { + margin-right: 0; +} +.SolutionsTabs-tab[aria-selected='true'] { + border-bottom: 0.25rem solid #007d9c; +} +@media only screen and (min-width: 48rem) { + .SolutionsTabs-tab { + font-size: 1.125rem; + margin-right: 4rem; + } +} +.Solutions-useCasesHeader h2, +.Solutions-caseStudiesHeader h2 { + letter-spacing: 0.125rem; +} +.Solutions-cardList, +.Solutions-caseStudyList { + display: grid; + grid-gap: 1.5rem; + grid-template-columns: repeat(1, 1fr); + list-style: none; + padding-left: 0; +} +.Solutions-cardList[hidden] { + display: none; +} +.Solutions-caseStudiesList { + margin: 0 0 1rem 0; +} +.Solutions-card { + background: #fff; + border: 0.0625rem solid #c6c8ca; + border-radius: 0.625rem; + box-sizing: border-box; + flex: 0 100%; +} +@media only screen and (min-width: 38rem) { + .Solutions-cardList { + grid-template-columns: repeat(2, 1fr); + } +} +@media only screen and (min-width: 57.7rem) { + .Solutions-card { + box-shadow: none; + flex: 0 48%; + } + .Solutions-card:hover { + box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); + transition: all 0.2s ease-in-out; + } + .Solutions-cardList { + grid-template-columns: repeat(3, 1fr); + } +} +@media only screen and (min-width: 62.5rem) { + .Solutions-card { + box-shadow: none; + flex: 0 30%; + } +} +.Solutions-useCaseLogo { + height: 5rem; + margin: 0 2rem; + width: 100%; +} +.Solutions-card a:link, +.Solutions-card a:visited { + color: #202224; + display: block; + text-decoration: none; +} +.Solutions-useCaseAction { + bottom: 1rem; + color: #007d9c; + font-size: 1rem; + font-weight: normal; + letter-spacing: 0.0063rem; + line-height: 1.5rem; + position: absolute; +} +.Solutions-useCaseAction { + align-items: center; + display: flex; +} +.Solutions-useCaseAction i { + margin-left: 0.5rem; +} +.Solutions-useCaseDescription { + color: #6e7072; + font-size: 1rem; + font-style: normal; + font-weight: normal; + letter-spacing: 0.0063rem; + line-height: 1.5rem; +} +.Solutions-useCaseTitle { + color: #202224; + font-size: 1.125rem; + font-weight: 500; + line-height: 1.5rem; +} +.Solutions-useCaseBody { + flex: 1; + justify-content: center; + margin-bottom: 2.5rem; +} + +.Solutions-useCaseLogo { + display: flex; + flex: 1; + justify-content: center; + margin: 0; +} + +.Solutions-useCaseLogo img { + align-self: center; + max-height: 4rem; + max-width: 11rem; +} +.Solutions-useCaseLink { + height: 100%; + padding: 2rem 2rem 3rem; + position: relative; +} +.Solutions-footer { + margin: 2rem 0 2.875rem; +} +.Solutions-footer p { + color: #202224; + font-size: 1.125rem; + font-weight: normal; + letter-spacing: 0.007rem; + line-height: 1.5rem; +} +.TestimonialsGo-quotes { + display: flex; + left: 0; + list-style: none; + margin: 0; + padding: 0; + position: relative; + top: 0; + transition: left 0.2s ease-out; + width: 625rem; +} +.TestimonialsGo-quoteGroup { + align-items: flex-start; + display: flex; + margin: 0 0; + max-width: 62.5rem; + padding: 3.75rem 2rem 2.25rem; + width: 90vw; +} +.TestimonialsGo-quoteSingleItem { + display: flex; + flex: 1; +} +.TestimonialsGo-quoteContainer { + display: inline-flex; + flex: 1; + flex-direction: column; + min-width: 0; +} +.TestimonialsGo-quoteSection { + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} +.TestimonialsGo-quoteSection p { + color: #202224; + font-size: 0.875rem; + letter-spacing: 0.0082rem; + line-height: 1.5rem; + text-align: center; +} +.TestimonialsGo-author { + color: #3e4042; + font-size: 0.8rem; + font-style: normal; + font-weight: normal; + line-height: 1.5rem; + text-align: right; + width: 100%; +} +.PullQuote-title, +.BackgroundQuote-title { + display: flex; + flex-wrap: wrap; + justify-content: flex-end; +} +.NoWrapSpan { + white-space: nowrap; +} +@media only screen and (min-width: 52rem) { + .TestimonialsGo-quote { + font-size: 1.3125rem; + } + .TestimonialsGo-author { + font-size: 1rem; + } + .TestimonialsGo-quoteSection p { + font-size: 1.3125rem; + letter-spacing: 0.0082rem; + line-height: 2.25rem; + } +} +.PullQuote { + color: #6e7072; + margin-bottom: 2rem; +} +.PullQuote-body { + margin: 1.5rem 0 1rem; +} +.PullQuote-link, +p.PullQuote-body, +p.BackgroundQuote-body { + color: inherit; +} +.PullQuote-author, +.BackgroundQuote-author { + display: flex; + flex-wrap: wrap; + font-style: normal; + font-weight: 500; + justify-content: flex-end; + margin-left: auto; + margin-top: 1rem; +} +.PullQuote-author { + font-size: 0.875rem; +} +.BackgroundQuote { + background-color: #007d9c; + color: #fff; + margin: 1.5rem auto; + padding: 2rem 1.5rem; +} +p.BackgroundQuote-body { + font-size: 1.3125rem; + line-height: 2.25rem; +} +.QuoteBlock { + border-bottom: 0.25rem solid #007d9c; + border-top: 0.25rem solid #007d9c; + display: block; + float: none; + margin-bottom: 1.5rem; + margin-left: 0; + margin-right: 0; + margin-top: 1.5rem; + padding-bottom: 0.5rem; + width: 100%; +} +@media only screen and (min-width: 48rem) { + .QuoteBlock { + float: right; + margin-top: 0; + width: 46%; + } + .PullQuote-body { + font-size: 1.125rem; + line-height: 1.75rem; + margin: 1.5rem 0 1rem; + } + .BackgroundQuote-body { + margin-top: 0; + } + .BackgroundQuote { + padding: 3rem 4rem 2rem; + } + .PullQuote-author { + font-size: 1rem; + } +} +.QuoteBlock-body { + color: #3e4042; + font-size: 1.125rem; + letter-spacing: 0.007rem; + line-height: 2rem; +} +.QuoteBlock-author { + color: #3e4042; + font-size: 1rem; + font-style: normal; + font-weight: 500; + line-height: 3rem; +} +.QuoteBlock-link { + color: #6e7072; +} +.LargeMedia { + align-items: flex-start; + display: flex; + padding: 2.125rem 0.5rem; +} +.LargeMedia + .LargeMedia { + border-top: 0.0625rem solid #dcdee0; +} +.LargeMedia-image { + height: 5rem; + margin-right: 1rem; + object-fit: contain; + width: 5rem; +} +.LargeMedia-body { + flex: 1; +} + +.SmallMedia-image { + height: 3rem; + margin-right: 1rem; + object-fit: contain; + width: 3rem; +} + +.XLargeMedia-image { + height: 8rem; + margin-right: 1rem; + object-fit: contain; + width: 8rem; +} + +@media only screen and (min-width: 48rem) { + .LargeMedia { + align-items: center; + } + .SmallMedia-image { + height: 9rem; + margin-right: 5.5rem; + width: 9rem; + } + .LargeMedia-image { + height: 12.5rem; + margin-right: 5.5rem; + width: 12.5rem; + } + .XLargeMedia-image { + height: 18rem; + margin-right: 1rem; + object-fit: contain; + width: 18rem; + } +} +.MediaList { + display: flex; + flex-wrap: wrap; + justify-content: space-around; + list-style: none; + padding: 0; +} +.MediaList-item { + flex: 0 1 14rem; + justify-content: space-around; + text-align: center; +} +.MediaList-itemImage { + height: 10rem; + object-fit: contain; + width: 10rem; +} +.MediaList-itemTitle { + color: #202224; +} +.MediaList-itemBody { + color: #555759; +} +@media only screen and (min-width: 48rem) { + .MediaList { + margin-left: -2rem; /* First item of each row should have no left gutter */ + } + .MediaList-item { + flex: 0 0 12rem; + margin-left: 2rem; /* Gutter between items */ + } +} +.MediaList-itemBox { + background-color: #f8f8f8; + box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); + flex: 0 1 33.125rem; + justify-content: space-around; + margin-top: 2rem; + padding: 1.5rem; +} +.MediaList-itemBoxHeader-top { + align-items: center; + flex-direction: column; + margin: auto; + text-align: center; + width: 10.75rem; +} +.MediaList-itemBoxHeader { + align-items: center; + display: flex; + flex-direction: column; + margin: auto; + text-align: center; + width: 10.75rem; +} +.MediaList-itemBoxImage { + height: 5.125rem; + object-fit: contain; + width: 5.125rem; +} +.MediaList-itemBox .MediaList-itemBoxTitle { + color: #202224; + font-size: 1.5rem; + font-weight: normal; + margin: 0.5rem 0 0 0; +} +.MediaList-itemBox .MediaList-itemBoxBody { + align-self: flex-end; + color: #555759; + flex: 1; +} +.MediaList-itemBox .MediaList-itemBoxBody-top { + align-self: flex-start; + color: #555759; + flex: 1; + margin: auto !important; +} +@media only screen and (min-width: 48rem) { + .MediaList-itemBoxHeader { + justify-content: flex-end; + margin: 0 1rem 1.5rem 0; + } + .MediaList-itemBox { + display: flex; + flex: 0 0 33.125rem; + margin: 2rem 0 0 2rem; /* Gutter between grid cells. */ + min-height: 15.0625rem; + } + .MediaList-itemBox .MediaList-itemBoxBody { + margin: 0 1.3rem 2rem 0; + } +} +.StarItem { + align-items: flex-start; + display: flex; +} +.StarItem-icon { + align-items: center; + background: linear-gradient(10.64deg, #007d9c 0%, #00a29c 100%); + border-radius: 50%; + display: flex; + height: 1.5rem; + justify-content: center; + margin: 1.1rem 1.25rem 0 0; + width: 1.5rem; +} +.StarItem-image { + height: 1.25rem; + object-fit: contain; + width: 1.25rem; +} +.StarItem-body { + flex: 1; +} +.StarItem-title { + margin: 1rem 0; +} + +.Right { + float: right; + margin-left: 1rem; +} +.Left { + float: left; + margin-right: 1rem; +} +.SearchForm { + align-items: center; + background-color: transparent; + border-radius: 0.25rem; + display: flex; + flex: 1; + font-size: 1rem; + height: 2rem; + margin: 0.6875rem 0; + max-width: 2rem; + transition: max-width 200ms; +} +.SearchForm--open { + background-color: #fff; + margin-left: 1.5rem; + max-width: 100%; +} +.SearchForm svg { + fill: #fff; +} +.SearchForm--open svg { + fill: #555759; + margin-right: 0.5rem; +} +.SearchForm-input { + height: 100%; + opacity: 0; + padding: 0; + transition: width 200ms, padding 200ms, opacity 200ms; + width: 0; +} +.SearchForm--open .SearchForm-input { + flex: 1; + opacity: 1; + padding: 0.5rem; + transition: width 200ms, padding 200ms; + width: 100%; +} +.SearchForm-input::placeholder { + color: #848688; +} +.SearchForm-input { + background-color: transparent; + border: none; + box-sizing: border-box; + font: inherit; + opacity: 0; + outline: none; +} +.SearchForm-submit { + background-color: transparent; + border: none; + box-sizing: border-box; + cursor: pointer; + display: flex; + outline: 0; + padding: 0; +} +.SearchForm svg { + box-sizing: border-box; + cursor: pointer; + margin-left: 0.5rem; + width: 1.4375rem; +} +@media only screen and (min-width: 32rem) { + .Header-rightContent { + width: 100%; + } + .SearchForm { + background-color: #fff; + margin: 0.6rem 1.4rem 0.6rem 0; + max-width: none; + } + .SearchForm-input { + opacity: 1; + padding: initial; + width: 100%; + } + .SearchForm svg { + fill: #555759; + margin-right: 0.5rem; + } +} +.Series-list { + list-style: none; + padding: 0; +} +.Series-listItem { + display: flex; +} +.Series-listItem a { + display: flex; + flex: 1; + padding: 1.25rem 0; +} +.Series-listItem + .Series-listItem { + border-top: 0.0625rem solid #dcdee0; +} +.Series-listItemIcon { + margin-right: 1rem; +} +.Series-listItemIcon img { + width: 4rem; +} +.Series-listItemText { + flex: 1; +} +.Series-listItemPrimary { + display: block; + font-size: 1.125rem; + margin: 0; +} +.Series-listItemSecondary { + color: #202224; + display: inline-block; + margin-bottom: 0; + text-decoration: none; +} +.UseCaseSubNav { + background-color: #fff; + box-shadow: 0 0.125rem 0.125rem rgba(171, 171, 171, 0.405239); + position: fixed; + width: 100%; + z-index: 10; +} +.UseCaseSubNav--default { + top: 3.5rem; +} +.UseCaseSubNav--lower { + top: calc(3.5rem + 9.75rem); +} +.UseCaseSubNav-menu { + background-color: #fff; + box-shadow: 0 0.125rem 0.125rem rgba(171, 171, 171, 0.405239); + max-height: 0; + overflow: hidden; + padding-left: 1rem; + position: absolute; + transition: max-height 100ms ease-in-out; + width: 100%; +} +.UseCaseSubNav-menuHeader { + align-items: center; + background: transparent; + border: none; + color: #555759; + cursor: pointer; + display: flex; + font-size: 0.875rem; + justify-content: space-between; + outline: none; + padding: 0.8125rem 1rem 0.8125rem 1.6875rem; + width: 100%; +} +.UseCaseSubNav-menuIcon { + pointer-events: none; + transition: transform 100ms ease-in-out; +} +.UseCaseSubNav-menuIcon--open { + transform: rotate(180deg); +} +.UseCaseSubNav-menu--open { + max-height: 25rem; + padding-bottom: 2rem; +} +.UseCase-content { + display: flex; + flex-direction: row; +} +.CaseStudy-content { + display: grid; + gap: 2rem; + grid-template-columns: 1fr; +} +.CaseStudy-contentBody img { + width: 100%; +} +.CaseStudy-contentBody hr { + border: 0.0625rem solid #c6c8ca; + margin: 2rem 0 2rem; +} +.CaseStudy-contentAside { + flex: 0 0 33.33%; + min-width: 18.75rem; +} +.UseCase-contentAside { + display: none; +} +.UseCase-content { + margin-top: 2rem; +} +.UseCase-contentBody { + flex: 0 0 100%; + margin-top: 1rem; + max-width: 47.8125rem; + width: 100%; +} +.UseCase-contentBody h2:first-of-type, +.UseCase-contentBody h3:first-of-type { + margin-top: 0; +} +.UseCase-contentBody h2, +.FeaturedUsers h2:first-of-type { + margin-bottom: 1.5rem; + margin-top: 3rem; +} +@media only screen and (min-width: 57.7rem) { + .CaseStudy-content { + grid-template-columns: 2fr 1fr; + } + .UseCase-contentAside { + display: block; + flex: 0 0 20%; + position: sticky; + } + .UseCaseSubNav { + display: none; + } + .UseCase-contentBody { + flex: 0 0 80%; + order: 1; + width: 80%; + } + .CaseStudy-contentAside { + order: 2; + } + .CaseStudy-contentBody { + order: 1; + } +} +.UseCaseSubNav-anchorLinks { + align-items: flex-start; + display: flex; + flex-direction: column; +} +.UseCaseSubNav-anchorLinks--sticky { + position: fixed; + top: 5.5rem; +} +a.UseCase-anchorLink { + background: transparent; + border: none; + color: #202224; + font-size: 1.125rem; + font-weight: 400; + line-height: 1.5rem; + margin-top: 1rem; + padding-left: 0.5rem; + position: relative; +} +a.UseCase-anchorLink:first-of-type { + margin-top: 1.5rem; +} +a.UseCase-anchorLink.selected { + font-weight: 500; +} +a.UseCase-anchorLink.selected::before { + background-color: #007d9c; + border-radius: 1rem; + content: ' '; + display: inline-block; + height: 0.3rem; + left: -0.5rem; + position: absolute; + top: 0.5rem; + width: 0.3rem; +} +.WhoUsesSubPage-hero--useCase { + margin-top: 2.625rem; +} +.WhoUsesSubPage-heroInner--caseStudy, +.WhoUsesSubPage-heroInner--useCase { + display: flex; + flex-direction: column; + justify-content: center; + margin-bottom: 1.5rem; + position: relative; +} +.WhoUsesSubPage-heroInner--useCase { + background-color: #fafafa; + padding-bottom: 2.5rem; + padding-top: 3.5rem; +} +.WhoUsesSubPage-heroInner--caseStudy > div { + justify-content: center; +} +.WhoUsesSubPage-heroContent--caseStudy { + display: flex; + flex-direction: column-reverse; + max-width: 75.75rem; + position: relative; + z-index: 1; +} +.WhoUsesSubPage-heroContent--useCase { + margin: auto; + max-width: 75.75rem; + width: 100%; +} +.WhoUsesSubPage-heroText--caseStudy, +.WhoUsesSubPage-heroText--useCase { + display: flex; + flex-direction: column; + justify-content: center; + width: 100%; +} +.WhoUsesSubPage-heroText--caseStudy { + padding: 2rem 1.5rem; +} +.WhoUsesSubPage-heroText--useCase { + padding: 0 1.5rem; +} +.WhoUsesSubPage-heroImg { + background: -webkit-linear-gradient(0deg, #fafafa 50vw, #bfeaf4 50vw); + display: flex; + max-width: 75.75rem; + padding-left: 1.5rem; + position: relative; + width: 100%; + z-index: 1; +} +.WhoUsesSubPage-heroImg img { + height: auto; + max-height: 10.625rem; + min-height: 8rem; + width: auto; +} +@media only screen and (min-width: 38rem) { + .Solutions-title h1, + .WhoUsesSubPage-heroInner--caseStudy h1, + .WhoUsesSubPage-heroInner--useCase h1 { + font-size: 2.25rem; + line-height: 3rem; + } + .WhoUsesSubPage-heroImg { + background: -webkit-linear-gradient(0deg, #fafafa 40vw, #bfeaf4 40vw); + } + .WhoUsesSubPage-heroImg img { + max-height: 15.625rem; + min-height: 10.625rem; + } +} +@media only screen and (min-width: 57.7rem) { + .WhoUsesSubPage-hero--useCase { + margin-top: 0; + } + .WhoUsesSubPage-heroInner--caseStudy { + background: -webkit-linear-gradient(0deg, #fafafa 70vw, #bfeaf4 70vw); + flex-direction: row; + } + .WhoUsesSubPage-heroContent--caseStudy { + align-items: center; + flex-direction: row; + } + .WhoUsesSubPage-heroImg { + background: transparent; + min-width: 37.75rem; + padding: 0; + width: 55%; + } + .WhoUsesSubPage-heroText--caseStudy { + width: 45%; + } + .WhoUsesSubPage-heroImg img { + max-height: none; + min-height: 18.75rem; + width: 100%; + } + .WhoUsesSubPage-heroInner--useCase h1 { + margin-top: 3rem; + } +} +.ToolsBlurbs { + display: grid; + gap: 2rem 3.4375rem; + grid-template-columns: 1fr; + margin-top: 1.5rem; +} +.ToolsBlurbs-blurb { + background-color: #fff; + border: 0.0625rem solid #dcdee0; + border-radius: 0.25rem; + padding: 1.5rem 1rem; +} +.ToolsBlurbs-blurbHeader { + align-items: center; + display: flex; +} +.ToolsBlurbs-blurbIcon { + height: 1.5rem; + margin-right: 1rem; + width: 1.5rem; +} +@media only screen and (min-width: 48rem) { + .ToolsBlurbs { + grid-template-columns: 1fr 1fr; + } +} +img.PullQuote-image { + width: 2.625rem; +} + +.Card { + background-color: #fff; + border: 0.0625rem solid #c6c8ca; + border-radius: 0.25rem; + height: 100%; +} + +.Card a, +.Card a:visited, +.Card a:hover { + text-decoration: none; +} + +.Card-inner { + display: flex; + flex-direction: column; + height: 100%; +} + +.Card-thumbnail { + background-position: center; + background-size: cover; + height: 9.5625rem; +} + +.Card-content { + display: flex; + flex: 1; + flex-direction: column; + padding: 1.5rem; +} + +.Card-contentTitle, +.Card-contentBody { + line-height: 1.5rem; +} + +.Card-contentTitle { + color: #202224; + font-size: 1.125rem; + font-weight: 500; +} + +.Card-contentBody { + color: #6e7072; + flex: auto; + font-size: 0.875rem; + margin-top: 1rem; +} + +.Card-contentCta { + align-items: center; + display: flex; +} + +.Card-contentCta span { + margin-right: 0.6875rem; +} + +.Card-selfPacedFooter { + display: flex; +} + +.Card-selfPacedCredits { + color: #6e7072; + flex: 1; + font-size: 0.75rem; +} + +.Card-selfPacedRating { + width: 5rem; +} + +.Card-starRating { + background-image: url('/images/learn/star-rating.png'); + background-position: left; + background-repeat: no-repeat; + height: 1rem; +} + +.Book a, +.Book a:visited, +.Book a:hover { + text-decoration: none; +} + +.Book-inner { + align-items: flex-start; + display: flex; + justify-content: space-between; +} + +.Book-thumbnail { + width: 6.625rem; +} + +.Book-thumbnail img { + width: 100%; +} + +.Book-content { + flex: 1; + margin-left: 1.6875rem; +} + +.Book-title { + color: #202224; + font-size: 1.125rem; + font-weight: 500; + line-height: 1.5rem; + margin: 0 0 0.5rem; +} + +.Book-description { + color: #6e7072; + font-size: 0.875rem; + line-height: 1.5rem; +} + +.Book-cta { + align-items: center; + display: flex; + height: 1.5rem; +} + +.Book-cta span { + margin-right: 0.6875rem; +} + +@media only screen and (min-width: 48rem) { + .Book-inner { + flex-direction: column; + } + + .Book-thumbnail { + width: 100%; + } + + .Book-content { + margin: 1rem 0 0; + } +} diff --git a/go.dev/testdata/golden/images/SCN_magnifying_glass_cloud_site.png b/go.dev/testdata/golden/images/SCN_magnifying_glass_cloud_site.png new file mode 100644 index 00000000..17c31360 Binary files /dev/null and b/go.dev/testdata/golden/images/SCN_magnifying_glass_cloud_site.png differ diff --git a/go.dev/testdata/golden/images/adobe-logo.png b/go.dev/testdata/golden/images/adobe-logo.png new file mode 100644 index 00000000..044c811b Binary files /dev/null and b/go.dev/testdata/golden/images/adobe-logo.png differ diff --git a/go.dev/testdata/golden/images/books/building-microservices-with-go.jpg b/go.dev/testdata/golden/images/books/building-microservices-with-go.jpg new file mode 100644 index 00000000..8891f281 Binary files /dev/null and b/go.dev/testdata/golden/images/books/building-microservices-with-go.jpg differ diff --git a/go.dev/testdata/golden/images/books/building-restful-web-services-with-go.jpg b/go.dev/testdata/golden/images/books/building-restful-web-services-with-go.jpg new file mode 100644 index 00000000..52e65dd2 Binary files /dev/null and b/go.dev/testdata/golden/images/books/building-restful-web-services-with-go.jpg differ diff --git a/go.dev/testdata/golden/images/books/go-in-action.jpg b/go.dev/testdata/golden/images/books/go-in-action.jpg new file mode 100644 index 00000000..41f613b0 Binary files /dev/null and b/go.dev/testdata/golden/images/books/go-in-action.jpg differ diff --git a/go.dev/testdata/golden/images/books/go-programming-for-network-operations.jpg b/go.dev/testdata/golden/images/books/go-programming-for-network-operations.jpg new file mode 100644 index 00000000..5c0e61aa Binary files /dev/null and b/go.dev/testdata/golden/images/books/go-programming-for-network-operations.jpg differ diff --git a/go.dev/testdata/golden/images/books/go-web-development-cookbook.jpg b/go.dev/testdata/golden/images/books/go-web-development-cookbook.jpg new file mode 100644 index 00000000..3243d62b Binary files /dev/null and b/go.dev/testdata/golden/images/books/go-web-development-cookbook.jpg differ diff --git a/go.dev/testdata/golden/images/books/go-web-programming.jpg b/go.dev/testdata/golden/images/books/go-web-programming.jpg new file mode 100644 index 00000000..af352b6c Binary files /dev/null and b/go.dev/testdata/golden/images/books/go-web-programming.jpg differ diff --git a/go.dev/testdata/golden/images/books/hands-on-software-architecture-with-golang.jpg b/go.dev/testdata/golden/images/books/hands-on-software-architecture-with-golang.jpg new file mode 100644 index 00000000..1b9d507e Binary files /dev/null and b/go.dev/testdata/golden/images/books/hands-on-software-architecture-with-golang.jpg differ diff --git a/go.dev/testdata/golden/images/books/mastering-go-web-services.jpg b/go.dev/testdata/golden/images/books/mastering-go-web-services.jpg new file mode 100644 index 00000000..2772ea58 Binary files /dev/null and b/go.dev/testdata/golden/images/books/mastering-go-web-services.jpg differ diff --git a/go.dev/testdata/golden/images/books/powerful-command-line-applications-in-go.jpg b/go.dev/testdata/golden/images/books/powerful-command-line-applications-in-go.jpg new file mode 100644 index 00000000..548e7925 Binary files /dev/null and b/go.dev/testdata/golden/images/books/powerful-command-line-applications-in-go.jpg differ diff --git a/go.dev/testdata/golden/images/books/web-development-with-go.jpg b/go.dev/testdata/golden/images/books/web-development-with-go.jpg new file mode 100644 index 00000000..a93db9f2 Binary files /dev/null and b/go.dev/testdata/golden/images/books/web-development-with-go.jpg differ diff --git a/go.dev/testdata/golden/images/close-24px.svg b/go.dev/testdata/golden/images/close-24px.svg new file mode 100644 index 00000000..dea86781 --- /dev/null +++ b/go.dev/testdata/golden/images/close-24px.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/companies-using-go-hero.svg b/go.dev/testdata/golden/images/companies-using-go-hero.svg new file mode 100644 index 00000000..94a9d871 --- /dev/null +++ b/go.dev/testdata/golden/images/companies-using-go-hero.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/go.dev/testdata/golden/images/device-information.png b/go.dev/testdata/golden/images/device-information.png new file mode 100644 index 00000000..d0a33311 Binary files /dev/null and b/go.dev/testdata/golden/images/device-information.png differ diff --git a/go.dev/testdata/golden/images/empty_case_study.png b/go.dev/testdata/golden/images/empty_case_study.png new file mode 100644 index 00000000..0b1fb454 Binary files /dev/null and b/go.dev/testdata/golden/images/empty_case_study.png differ diff --git a/go.dev/testdata/golden/images/empty_case_study_2.png b/go.dev/testdata/golden/images/empty_case_study_2.png new file mode 100644 index 00000000..290d9a48 Binary files /dev/null and b/go.dev/testdata/golden/images/empty_case_study_2.png differ diff --git a/go.dev/testdata/golden/images/go-logo-blue.svg b/go.dev/testdata/golden/images/go-logo-blue.svg new file mode 100644 index 00000000..da6ea83d --- /dev/null +++ b/go.dev/testdata/golden/images/go-logo-blue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/go-logo-white.svg b/go.dev/testdata/golden/images/go-logo-white.svg new file mode 100644 index 00000000..727a62ee --- /dev/null +++ b/go.dev/testdata/golden/images/go-logo-white.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/go_amex_case_study.png b/go.dev/testdata/golden/images/go_amex_case_study.png new file mode 100644 index 00000000..d6dba100 Binary files /dev/null and b/go.dev/testdata/golden/images/go_amex_case_study.png differ diff --git a/go.dev/testdata/golden/images/go_amex_case_study_logo.png b/go.dev/testdata/golden/images/go_amex_case_study_logo.png new file mode 100644 index 00000000..d2f6a223 Binary files /dev/null and b/go.dev/testdata/golden/images/go_amex_case_study_logo.png differ diff --git a/go.dev/testdata/golden/images/go_at&t_case_study.png b/go.dev/testdata/golden/images/go_at&t_case_study.png new file mode 100644 index 00000000..a115a3e3 Binary files /dev/null and b/go.dev/testdata/golden/images/go_at&t_case_study.png differ diff --git a/go.dev/testdata/golden/images/go_at_t_case_study_logo.png b/go.dev/testdata/golden/images/go_at_t_case_study_logo.png new file mode 100644 index 00000000..bb57455f Binary files /dev/null and b/go.dev/testdata/golden/images/go_at_t_case_study_logo.png differ diff --git a/go.dev/testdata/golden/images/go_chrome_case_study.png b/go.dev/testdata/golden/images/go_chrome_case_study.png new file mode 100644 index 00000000..4e22e431 Binary files /dev/null and b/go.dev/testdata/golden/images/go_chrome_case_study.png differ diff --git a/go.dev/testdata/golden/images/go_core_data_case_study.png b/go.dev/testdata/golden/images/go_core_data_case_study.png new file mode 100644 index 00000000..2da16d14 Binary files /dev/null and b/go.dev/testdata/golden/images/go_core_data_case_study.png differ diff --git a/go.dev/testdata/golden/images/go_firebase_case_study.png b/go.dev/testdata/golden/images/go_firebase_case_study.png new file mode 100644 index 00000000..5b35bfd2 Binary files /dev/null and b/go.dev/testdata/golden/images/go_firebase_case_study.png differ diff --git a/go.dev/testdata/golden/images/go_google_case_study_carousel.png b/go.dev/testdata/golden/images/go_google_case_study_carousel.png new file mode 100644 index 00000000..885c400f Binary files /dev/null and b/go.dev/testdata/golden/images/go_google_case_study_carousel.png differ diff --git a/go.dev/testdata/golden/images/go_mercadolibre_case_study.png b/go.dev/testdata/golden/images/go_mercadolibre_case_study.png new file mode 100644 index 00000000..07679222 Binary files /dev/null and b/go.dev/testdata/golden/images/go_mercadolibre_case_study.png differ diff --git a/go.dev/testdata/golden/images/go_mercadolibre_case_study_logo.png b/go.dev/testdata/golden/images/go_mercadolibre_case_study_logo.png new file mode 100644 index 00000000..822c6c39 Binary files /dev/null and b/go.dev/testdata/golden/images/go_mercadolibre_case_study_logo.png differ diff --git a/go.dev/testdata/golden/images/go_paypal_case_study.png b/go.dev/testdata/golden/images/go_paypal_case_study.png new file mode 100644 index 00000000..eb96d7df Binary files /dev/null and b/go.dev/testdata/golden/images/go_paypal_case_study.png differ diff --git a/go.dev/testdata/golden/images/go_paypal_case_study_logo.png b/go.dev/testdata/golden/images/go_paypal_case_study_logo.png new file mode 100644 index 00000000..b1dde6e7 Binary files /dev/null and b/go.dev/testdata/golden/images/go_paypal_case_study_logo.png differ diff --git a/go.dev/testdata/golden/images/go_sitereliability_case_study.png b/go.dev/testdata/golden/images/go_sitereliability_case_study.png new file mode 100644 index 00000000..51241c5d Binary files /dev/null and b/go.dev/testdata/golden/images/go_sitereliability_case_study.png differ diff --git a/go.dev/testdata/golden/images/google-grey.png b/go.dev/testdata/golden/images/google-grey.png new file mode 100644 index 00000000..36b90cc3 Binary files /dev/null and b/go.dev/testdata/golden/images/google-grey.png differ diff --git a/go.dev/testdata/golden/images/google-logo.png b/go.dev/testdata/golden/images/google-logo.png new file mode 100644 index 00000000..05764e7d Binary files /dev/null and b/go.dev/testdata/golden/images/google-logo.png differ diff --git a/go.dev/testdata/golden/images/google-logo.svg b/go.dev/testdata/golden/images/google-logo.svg new file mode 100644 index 00000000..796ed0c3 --- /dev/null +++ b/go.dev/testdata/golden/images/google-logo.svg @@ -0,0 +1,38 @@ + + + + + + + + diff --git a/go.dev/testdata/golden/images/google-white.png b/go.dev/testdata/golden/images/google-white.png new file mode 100644 index 00000000..c55ee301 Binary files /dev/null and b/go.dev/testdata/golden/images/google-white.png differ diff --git a/go.dev/testdata/golden/images/gopher-footer.jpg b/go.dev/testdata/golden/images/gopher-footer.jpg new file mode 100644 index 00000000..fafe1045 Binary files /dev/null and b/go.dev/testdata/golden/images/gopher-footer.jpg differ diff --git a/go.dev/testdata/golden/images/gophers/biplane.svg b/go.dev/testdata/golden/images/gophers/biplane.svg new file mode 100644 index 00000000..e5101401 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/biplane.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/blue.svg b/go.dev/testdata/golden/images/gophers/blue.svg new file mode 100644 index 00000000..55055400 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/blue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/factory.png b/go.dev/testdata/golden/images/gophers/factory.png new file mode 100644 index 00000000..d94dfb48 Binary files /dev/null and b/go.dev/testdata/golden/images/gophers/factory.png differ diff --git a/go.dev/testdata/golden/images/gophers/front.svg b/go.dev/testdata/golden/images/gophers/front.svg new file mode 100644 index 00000000..8d7b916e --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/front.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/graduate-colorized.svg b/go.dev/testdata/golden/images/gophers/graduate-colorized.svg new file mode 100644 index 00000000..2ad4a30e --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/graduate-colorized.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/graduate.svg b/go.dev/testdata/golden/images/gophers/graduate.svg new file mode 100644 index 00000000..3aed2ea4 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/graduate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/green.svg b/go.dev/testdata/golden/images/gophers/green.svg new file mode 100644 index 00000000..c1660ba7 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/green.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/grey.svg b/go.dev/testdata/golden/images/gophers/grey.svg new file mode 100644 index 00000000..d88756e3 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/happy.svg b/go.dev/testdata/golden/images/gophers/happy.svg new file mode 100644 index 00000000..91f670de --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/happy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/headlamp-colorized.svg b/go.dev/testdata/golden/images/gophers/headlamp-colorized.svg new file mode 100644 index 00000000..47b3de62 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/headlamp-colorized.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/headlamp.svg b/go.dev/testdata/golden/images/gophers/headlamp.svg new file mode 100644 index 00000000..3e815c9f --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/headlamp.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/ladder.svg b/go.dev/testdata/golden/images/gophers/ladder.svg new file mode 100644 index 00000000..be4d5d66 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/ladder.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/machine-colorized.svg b/go.dev/testdata/golden/images/gophers/machine-colorized.svg new file mode 100644 index 00000000..cb8b9831 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/machine-colorized.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/machine.svg b/go.dev/testdata/golden/images/gophers/machine.svg new file mode 100644 index 00000000..7fe82b75 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/machine.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/megaphone-gopher.svg b/go.dev/testdata/golden/images/gophers/megaphone-gopher.svg new file mode 100644 index 00000000..5f795968 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/megaphone-gopher.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/go.dev/testdata/golden/images/gophers/megaphone.svg b/go.dev/testdata/golden/images/gophers/megaphone.svg new file mode 100644 index 00000000..c018845d --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/megaphone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/motorcycle.svg b/go.dev/testdata/golden/images/gophers/motorcycle.svg new file mode 100644 index 00000000..e05346e4 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/motorcycle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/newscasters.png b/go.dev/testdata/golden/images/gophers/newscasters.png new file mode 100644 index 00000000..76a17398 Binary files /dev/null and b/go.dev/testdata/golden/images/gophers/newscasters.png differ diff --git a/go.dev/testdata/golden/images/gophers/peach.svg b/go.dev/testdata/golden/images/gophers/peach.svg new file mode 100644 index 00000000..a13a4d4e --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/peach.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/pilot-bust.svg b/go.dev/testdata/golden/images/gophers/pilot-bust.svg new file mode 100644 index 00000000..a654dc77 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/pilot-bust.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/pink.svg b/go.dev/testdata/golden/images/gophers/pink.svg new file mode 100644 index 00000000..51e456c6 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/pink.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/running.svg b/go.dev/testdata/golden/images/gophers/running.svg new file mode 100644 index 00000000..001245f3 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/running.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/shopping-cart.png b/go.dev/testdata/golden/images/gophers/shopping-cart.png new file mode 100644 index 00000000..de8e0f2f Binary files /dev/null and b/go.dev/testdata/golden/images/gophers/shopping-cart.png differ diff --git a/go.dev/testdata/golden/images/gophers/skateboarding.svg b/go.dev/testdata/golden/images/gophers/skateboarding.svg new file mode 100644 index 00000000..c281a39e --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/skateboarding.svg @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/go.dev/testdata/golden/images/gophers/slate.svg b/go.dev/testdata/golden/images/gophers/slate.svg new file mode 100644 index 00000000..4930804d --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/slate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/violet.svg b/go.dev/testdata/golden/images/gophers/violet.svg new file mode 100644 index 00000000..33e8bdc5 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/violet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/wrench.svg b/go.dev/testdata/golden/images/gophers/wrench.svg new file mode 100644 index 00000000..fc5789b1 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/wrench.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/gophers/yellow.svg b/go.dev/testdata/golden/images/gophers/yellow.svg new file mode 100644 index 00000000..5ecf2f27 --- /dev/null +++ b/go.dev/testdata/golden/images/gophers/yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/icons/arrow-forward.svg b/go.dev/testdata/golden/images/icons/arrow-forward.svg new file mode 100644 index 00000000..25d69789 --- /dev/null +++ b/go.dev/testdata/golden/images/icons/arrow-forward.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/go.dev/testdata/golden/images/icons/chevron-down.svg b/go.dev/testdata/golden/images/icons/chevron-down.svg new file mode 100644 index 00000000..8662fb7d --- /dev/null +++ b/go.dev/testdata/golden/images/icons/chevron-down.svg @@ -0,0 +1,3 @@ + + + diff --git a/go.dev/testdata/golden/images/icons/code.svg b/go.dev/testdata/golden/images/icons/code.svg new file mode 100644 index 00000000..1cdcc64b --- /dev/null +++ b/go.dev/testdata/golden/images/icons/code.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/go.dev/testdata/golden/images/icons/command-folder.svg b/go.dev/testdata/golden/images/icons/command-folder.svg new file mode 100644 index 00000000..78c35585 --- /dev/null +++ b/go.dev/testdata/golden/images/icons/command-folder.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/go.dev/testdata/golden/images/icons/gear.svg b/go.dev/testdata/golden/images/icons/gear.svg new file mode 100644 index 00000000..a509f45f --- /dev/null +++ b/go.dev/testdata/golden/images/icons/gear.svg @@ -0,0 +1,14 @@ + + + + + diff --git a/go.dev/testdata/golden/images/icons/package.svg b/go.dev/testdata/golden/images/icons/package.svg new file mode 100644 index 00000000..087fa092 --- /dev/null +++ b/go.dev/testdata/golden/images/icons/package.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/go.dev/testdata/golden/images/icons/sphere.svg b/go.dev/testdata/golden/images/icons/sphere.svg new file mode 100644 index 00000000..91c18b74 --- /dev/null +++ b/go.dev/testdata/golden/images/icons/sphere.svg @@ -0,0 +1,3 @@ + + + diff --git a/go.dev/testdata/golden/images/learn/clis.png b/go.dev/testdata/golden/images/learn/clis.png new file mode 100644 index 00000000..267ff73f Binary files /dev/null and b/go.dev/testdata/golden/images/learn/clis.png differ diff --git a/go.dev/testdata/golden/images/learn/codecademy.png b/go.dev/testdata/golden/images/learn/codecademy.png new file mode 100644 index 00000000..8de4dbfd Binary files /dev/null and b/go.dev/testdata/golden/images/learn/codecademy.png differ diff --git a/go.dev/testdata/golden/images/learn/codelabs.png b/go.dev/testdata/golden/images/learn/codelabs.png new file mode 100644 index 00000000..c8dabae2 Binary files /dev/null and b/go.dev/testdata/golden/images/learn/codelabs.png differ diff --git a/go.dev/testdata/golden/images/learn/codelabs_2.png b/go.dev/testdata/golden/images/learn/codelabs_2.png new file mode 100644 index 00000000..7dd71cba Binary files /dev/null and b/go.dev/testdata/golden/images/learn/codelabs_2.png differ diff --git a/go.dev/testdata/golden/images/learn/commandline.svg b/go.dev/testdata/golden/images/learn/commandline.svg new file mode 100644 index 00000000..fd2dcb68 --- /dev/null +++ b/go.dev/testdata/golden/images/learn/commandline.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/learn/concurrency-in-go.png b/go.dev/testdata/golden/images/learn/concurrency-in-go.png new file mode 100644 index 00000000..d2c140c6 Binary files /dev/null and b/go.dev/testdata/golden/images/learn/concurrency-in-go.png differ diff --git a/go.dev/testdata/golden/images/learn/coursera.png b/go.dev/testdata/golden/images/learn/coursera.png new file mode 100644 index 00000000..c22729d6 Binary files /dev/null and b/go.dev/testdata/golden/images/learn/coursera.png differ diff --git a/go.dev/testdata/golden/images/learn/earth.png b/go.dev/testdata/golden/images/learn/earth.png new file mode 100644 index 00000000..c39758e8 Binary files /dev/null and b/go.dev/testdata/golden/images/learn/earth.png differ diff --git a/go.dev/testdata/golden/images/learn/edureka.png b/go.dev/testdata/golden/images/learn/edureka.png new file mode 100644 index 00000000..a047f5ed Binary files /dev/null and b/go.dev/testdata/golden/images/learn/edureka.png differ diff --git a/go.dev/testdata/golden/images/learn/exercism.png b/go.dev/testdata/golden/images/learn/exercism.png new file mode 100644 index 00000000..a2fd1c33 Binary files /dev/null and b/go.dev/testdata/golden/images/learn/exercism.png differ diff --git a/go.dev/testdata/golden/images/learn/get-programming-with-go.jpeg b/go.dev/testdata/golden/images/learn/get-programming-with-go.jpeg new file mode 100644 index 00000000..c73d3e2e Binary files /dev/null and b/go.dev/testdata/golden/images/learn/get-programming-with-go.jpeg differ diff --git a/go.dev/testdata/golden/images/learn/go-programming-blueprints.png b/go.dev/testdata/golden/images/learn/go-programming-blueprints.png new file mode 100644 index 00000000..7ad68383 Binary files /dev/null and b/go.dev/testdata/golden/images/learn/go-programming-blueprints.png differ diff --git a/go.dev/testdata/golden/images/learn/go-programming-language-book.png b/go.dev/testdata/golden/images/learn/go-programming-language-book.png new file mode 100644 index 00000000..1f5bd3a5 Binary files /dev/null and b/go.dev/testdata/golden/images/learn/go-programming-language-book.png differ diff --git a/go.dev/testdata/golden/images/learn/go_cdk_logo.png b/go.dev/testdata/golden/images/learn/go_cdk_logo.png new file mode 100644 index 00000000..96155ec7 Binary files /dev/null and b/go.dev/testdata/golden/images/learn/go_cdk_logo.png differ diff --git a/go.dev/testdata/golden/images/learn/gobyexample.png b/go.dev/testdata/golden/images/learn/gobyexample.png new file mode 100644 index 00000000..d4f2538f Binary files /dev/null and b/go.dev/testdata/golden/images/learn/gobyexample.png differ diff --git a/go.dev/testdata/golden/images/learn/gohelloworld.png b/go.dev/testdata/golden/images/learn/gohelloworld.png new file mode 100644 index 00000000..df131fef Binary files /dev/null and b/go.dev/testdata/golden/images/learn/gohelloworld.png differ diff --git a/go.dev/testdata/golden/images/learn/gophercises.png b/go.dev/testdata/golden/images/learn/gophercises.png new file mode 100644 index 00000000..5adb4760 Binary files /dev/null and b/go.dev/testdata/golden/images/learn/gophercises.png differ diff --git a/go.dev/testdata/golden/images/learn/helloworld.png b/go.dev/testdata/golden/images/learn/helloworld.png new file mode 100644 index 00000000..05fd362d Binary files /dev/null and b/go.dev/testdata/golden/images/learn/helloworld.png differ diff --git a/go.dev/testdata/golden/images/learn/install.png b/go.dev/testdata/golden/images/learn/install.png new file mode 100644 index 00000000..600cb2f5 Binary files /dev/null and b/go.dev/testdata/golden/images/learn/install.png differ diff --git a/go.dev/testdata/golden/images/learn/introducing-go-book.png b/go.dev/testdata/golden/images/learn/introducing-go-book.png new file mode 100644 index 00000000..a24626db Binary files /dev/null and b/go.dev/testdata/golden/images/learn/introducing-go-book.png differ diff --git a/go.dev/testdata/golden/images/learn/qwiklabs.png b/go.dev/testdata/golden/images/learn/qwiklabs.png new file mode 100644 index 00000000..dce02305 Binary files /dev/null and b/go.dev/testdata/golden/images/learn/qwiklabs.png differ diff --git a/go.dev/testdata/golden/images/learn/star-rating.png b/go.dev/testdata/golden/images/learn/star-rating.png new file mode 100644 index 00000000..4cd252b6 Binary files /dev/null and b/go.dev/testdata/golden/images/learn/star-rating.png differ diff --git a/go.dev/testdata/golden/images/learn/tour.png b/go.dev/testdata/golden/images/learn/tour.png new file mode 100644 index 00000000..912f445c Binary files /dev/null and b/go.dev/testdata/golden/images/learn/tour.png differ diff --git a/go.dev/testdata/golden/images/learn/web-dev.png b/go.dev/testdata/golden/images/learn/web-dev.png new file mode 100644 index 00000000..989357aa Binary files /dev/null and b/go.dev/testdata/golden/images/learn/web-dev.png differ diff --git a/go.dev/testdata/golden/images/logos/american-express.png b/go.dev/testdata/golden/images/logos/american-express.png new file mode 100644 index 00000000..242d9934 Binary files /dev/null and b/go.dev/testdata/golden/images/logos/american-express.png differ diff --git a/go.dev/testdata/golden/images/logos/american-express.svg b/go.dev/testdata/golden/images/logos/american-express.svg new file mode 100644 index 00000000..fd3a5284 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/american-express.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/amex-logo.png b/go.dev/testdata/golden/images/logos/amex-logo.png new file mode 100644 index 00000000..26080b0c Binary files /dev/null and b/go.dev/testdata/golden/images/logos/amex-logo.png differ diff --git a/go.dev/testdata/golden/images/logos/amex.svg b/go.dev/testdata/golden/images/logos/amex.svg new file mode 100644 index 00000000..3f902cb3 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/amex.svg @@ -0,0 +1,34 @@ + + +Amercian_express + + + + + diff --git a/go.dev/testdata/golden/images/logos/armut.png b/go.dev/testdata/golden/images/logos/armut.png new file mode 100644 index 00000000..83cc4570 Binary files /dev/null and b/go.dev/testdata/golden/images/logos/armut.png differ diff --git a/go.dev/testdata/golden/images/logos/caddy.svg b/go.dev/testdata/golden/images/logos/caddy.svg new file mode 100644 index 00000000..d9b8a67c --- /dev/null +++ b/go.dev/testdata/golden/images/logos/caddy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/capital-one.svg b/go.dev/testdata/golden/images/logos/capital-one.svg new file mode 100644 index 00000000..af936036 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/capital-one.svg @@ -0,0 +1,41 @@ + + +captial-one + + + + diff --git a/go.dev/testdata/golden/images/logos/chrome.svg b/go.dev/testdata/golden/images/logos/chrome.svg new file mode 100644 index 00000000..3a2a5a96 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/chrome.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/cloudflare-icon.svg b/go.dev/testdata/golden/images/logos/cloudflare-icon.svg new file mode 100644 index 00000000..8ad9cd68 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/cloudflare-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/cloudflare.png b/go.dev/testdata/golden/images/logos/cloudflare.png new file mode 100644 index 00000000..8cd4914c Binary files /dev/null and b/go.dev/testdata/golden/images/logos/cloudflare.png differ diff --git a/go.dev/testdata/golden/images/logos/cloudflare.svg b/go.dev/testdata/golden/images/logos/cloudflare.svg new file mode 100644 index 00000000..04648af6 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/cloudflare.svg @@ -0,0 +1,33 @@ + + + + + + + + + diff --git a/go.dev/testdata/golden/images/logos/cockroach.svg b/go.dev/testdata/golden/images/logos/cockroach.svg new file mode 100644 index 00000000..0954963d --- /dev/null +++ b/go.dev/testdata/golden/images/logos/cockroach.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/comcast.svg b/go.dev/testdata/golden/images/logos/comcast.svg new file mode 100644 index 00000000..f8ce7a1e --- /dev/null +++ b/go.dev/testdata/golden/images/logos/comcast.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/go.dev/testdata/golden/images/logos/curve.png b/go.dev/testdata/golden/images/logos/curve.png new file mode 100644 index 00000000..8cfb6188 Binary files /dev/null and b/go.dev/testdata/golden/images/logos/curve.png differ diff --git a/go.dev/testdata/golden/images/logos/curve.svg b/go.dev/testdata/golden/images/logos/curve.svg new file mode 100644 index 00000000..01fc55b7 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/curve.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/go.dev/testdata/golden/images/logos/docker.svg b/go.dev/testdata/golden/images/logos/docker.svg new file mode 100644 index 00000000..42426899 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/docker.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/drone.svg b/go.dev/testdata/golden/images/logos/drone.svg new file mode 100644 index 00000000..179e6f83 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/drone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/dropbox-icon.svg b/go.dev/testdata/golden/images/logos/dropbox-icon.svg new file mode 100644 index 00000000..135a7944 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/dropbox-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/dropbox.png b/go.dev/testdata/golden/images/logos/dropbox.png new file mode 100644 index 00000000..d17804a9 Binary files /dev/null and b/go.dev/testdata/golden/images/logos/dropbox.png differ diff --git a/go.dev/testdata/golden/images/logos/dropbox.svg b/go.dev/testdata/golden/images/logos/dropbox.svg new file mode 100644 index 00000000..ec633031 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/dropbox.svg @@ -0,0 +1 @@ +Dropbox \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/economist.svg b/go.dev/testdata/golden/images/logos/economist.svg new file mode 100644 index 00000000..666cef85 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/economist.svg @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/go.dev/testdata/golden/images/logos/etcd.svg b/go.dev/testdata/golden/images/logos/etcd.svg new file mode 100644 index 00000000..4f38f913 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/etcd.svg @@ -0,0 +1 @@ +etcd diff --git a/go.dev/testdata/golden/images/logos/facebook.png b/go.dev/testdata/golden/images/logos/facebook.png new file mode 100644 index 00000000..59362688 Binary files /dev/null and b/go.dev/testdata/golden/images/logos/facebook.png differ diff --git a/go.dev/testdata/golden/images/logos/firebase.svg b/go.dev/testdata/golden/images/logos/firebase.svg new file mode 100644 index 00000000..421d452a --- /dev/null +++ b/go.dev/testdata/golden/images/logos/firebase.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/github.svg b/go.dev/testdata/golden/images/logos/github.svg new file mode 100644 index 00000000..977cf9d7 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/github.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/go.dev/testdata/golden/images/logos/gokit.png b/go.dev/testdata/golden/images/logos/gokit.png new file mode 100644 index 00000000..4c47041f Binary files /dev/null and b/go.dev/testdata/golden/images/logos/gokit.png differ diff --git a/go.dev/testdata/golden/images/logos/google-cloud.png b/go.dev/testdata/golden/images/logos/google-cloud.png new file mode 100644 index 00000000..80a47820 Binary files /dev/null and b/go.dev/testdata/golden/images/logos/google-cloud.png differ diff --git a/go.dev/testdata/golden/images/logos/google-cloud.svg b/go.dev/testdata/golden/images/logos/google-cloud.svg new file mode 100644 index 00000000..49cd9f56 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/google-cloud.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/google-fourcolor.svg b/go.dev/testdata/golden/images/logos/google-fourcolor.svg new file mode 100644 index 00000000..95f5e7d6 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/google-fourcolor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/google-g.svg b/go.dev/testdata/golden/images/logos/google-g.svg new file mode 100644 index 00000000..9cdb8e44 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/google-g.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/google.svg b/go.dev/testdata/golden/images/logos/google.svg new file mode 100644 index 00000000..3b2e94bd --- /dev/null +++ b/go.dev/testdata/golden/images/logos/google.svg @@ -0,0 +1,26 @@ + + + + + + + + + + diff --git a/go.dev/testdata/golden/images/logos/govuk.svg b/go.dev/testdata/golden/images/logos/govuk.svg new file mode 100644 index 00000000..2814f3da --- /dev/null +++ b/go.dev/testdata/golden/images/logos/govuk.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/grail.png b/go.dev/testdata/golden/images/logos/grail.png new file mode 100644 index 00000000..026099c2 Binary files /dev/null and b/go.dev/testdata/golden/images/logos/grail.png differ diff --git a/go.dev/testdata/golden/images/logos/grail.svg b/go.dev/testdata/golden/images/logos/grail.svg new file mode 100644 index 00000000..5a3bd62c --- /dev/null +++ b/go.dev/testdata/golden/images/logos/grail.svg @@ -0,0 +1,18 @@ + + + + + + diff --git a/go.dev/testdata/golden/images/logos/hugo.svg b/go.dev/testdata/golden/images/logos/hugo.svg new file mode 100644 index 00000000..8a1a9bbc --- /dev/null +++ b/go.dev/testdata/golden/images/logos/hugo.svg @@ -0,0 +1,13 @@ + + + + Slice 1 + Created with Sketch. + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/ibm.svg b/go.dev/testdata/golden/images/logos/ibm.svg new file mode 100644 index 00000000..ad0cb64b --- /dev/null +++ b/go.dev/testdata/golden/images/logos/ibm.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/kubernetes.svg b/go.dev/testdata/golden/images/logos/kubernetes.svg new file mode 100644 index 00000000..7d21699c --- /dev/null +++ b/go.dev/testdata/golden/images/logos/kubernetes.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/lets-encrypt-icon.svg b/go.dev/testdata/golden/images/logos/lets-encrypt-icon.svg new file mode 100644 index 00000000..6fc1ff96 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/lets-encrypt-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/lets-encrypt.svg b/go.dev/testdata/golden/images/logos/lets-encrypt.svg new file mode 100644 index 00000000..c54550e1 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/lets-encrypt.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/mattermost.png b/go.dev/testdata/golden/images/logos/mattermost.png new file mode 100644 index 00000000..3a8116cf Binary files /dev/null and b/go.dev/testdata/golden/images/logos/mattermost.png differ diff --git a/go.dev/testdata/golden/images/logos/medium.svg b/go.dev/testdata/golden/images/logos/medium.svg new file mode 100644 index 00000000..76f49a3d --- /dev/null +++ b/go.dev/testdata/golden/images/logos/medium.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/mercado-libre.png b/go.dev/testdata/golden/images/logos/mercado-libre.png new file mode 100644 index 00000000..93657b31 Binary files /dev/null and b/go.dev/testdata/golden/images/logos/mercado-libre.png differ diff --git a/go.dev/testdata/golden/images/logos/mercadoLibre.svg b/go.dev/testdata/golden/images/logos/mercadoLibre.svg new file mode 100644 index 00000000..24964f4c --- /dev/null +++ b/go.dev/testdata/golden/images/logos/mercadoLibre.svg @@ -0,0 +1,95 @@ + + + +mercadoLibre + + + + + + + + + + + + + + + + + + + + diff --git a/go.dev/testdata/golden/images/logos/microsoft.png b/go.dev/testdata/golden/images/logos/microsoft.png new file mode 100644 index 00000000..5ff7c6b1 Binary files /dev/null and b/go.dev/testdata/golden/images/logos/microsoft.png differ diff --git a/go.dev/testdata/golden/images/logos/microsoft.svg b/go.dev/testdata/golden/images/logos/microsoft.svg new file mode 100644 index 00000000..28ec5f11 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/microsoft.svg @@ -0,0 +1,160 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/go.dev/testdata/golden/images/logos/mongodb.svg b/go.dev/testdata/golden/images/logos/mongodb.svg new file mode 100644 index 00000000..e4fe5c64 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/mongodb.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/netflix.svg b/go.dev/testdata/golden/images/logos/netflix.svg new file mode 100644 index 00000000..75f2a204 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/netflix.svg @@ -0,0 +1 @@ +netfix \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/paypal.svg b/go.dev/testdata/golden/images/logos/paypal.svg new file mode 100644 index 00000000..6528aee8 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/paypal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/prometheus.svg b/go.dev/testdata/golden/images/logos/prometheus.svg new file mode 100644 index 00000000..5c51f66d --- /dev/null +++ b/go.dev/testdata/golden/images/logos/prometheus.svg @@ -0,0 +1,50 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/riotgames.png b/go.dev/testdata/golden/images/logos/riotgames.png new file mode 100644 index 00000000..facb585f Binary files /dev/null and b/go.dev/testdata/golden/images/logos/riotgames.png differ diff --git a/go.dev/testdata/golden/images/logos/salesforce.svg b/go.dev/testdata/golden/images/logos/salesforce.svg new file mode 100644 index 00000000..a2469a8e --- /dev/null +++ b/go.dev/testdata/golden/images/logos/salesforce.svg @@ -0,0 +1,62 @@ + + + +salesforce + + + + + + + + + + + + diff --git a/go.dev/testdata/golden/images/logos/sitereliability.svg b/go.dev/testdata/golden/images/logos/sitereliability.svg new file mode 100644 index 00000000..c549d69a --- /dev/null +++ b/go.dev/testdata/golden/images/logos/sitereliability.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/stripe.svg b/go.dev/testdata/golden/images/logos/stripe.svg new file mode 100644 index 00000000..cfb5c250 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/stripe.svg @@ -0,0 +1,121 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/go.dev/testdata/golden/images/logos/target.svg b/go.dev/testdata/golden/images/logos/target.svg new file mode 100644 index 00000000..05974a05 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/target.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/terraform-icon.svg b/go.dev/testdata/golden/images/logos/terraform-icon.svg new file mode 100644 index 00000000..0627ba16 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/terraform-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/terraform.png b/go.dev/testdata/golden/images/logos/terraform.png new file mode 100644 index 00000000..56e77473 Binary files /dev/null and b/go.dev/testdata/golden/images/logos/terraform.png differ diff --git a/go.dev/testdata/golden/images/logos/the-new-york-times-icon.svg b/go.dev/testdata/golden/images/logos/the-new-york-times-icon.svg new file mode 100644 index 00000000..289ebd78 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/the-new-york-times-icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/twitch.svg b/go.dev/testdata/golden/images/logos/twitch.svg new file mode 100644 index 00000000..d6842340 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/twitch.svg @@ -0,0 +1,24 @@ + + + +twitch + + + + + + + + + diff --git a/go.dev/testdata/golden/images/logos/twitter.svg b/go.dev/testdata/golden/images/logos/twitter.svg new file mode 100644 index 00000000..8c27bd2d --- /dev/null +++ b/go.dev/testdata/golden/images/logos/twitter.svg @@ -0,0 +1,12 @@ + + + +twitter + + diff --git a/go.dev/testdata/golden/images/logos/uber-app-icon.svg b/go.dev/testdata/golden/images/logos/uber-app-icon.svg new file mode 100644 index 00000000..ca116d23 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/uber-app-icon.svg @@ -0,0 +1,14 @@ + + + + uber_rides_api_icon + Created with Sketch. + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/logos/uber.svg b/go.dev/testdata/golden/images/logos/uber.svg new file mode 100644 index 00000000..4dfeea13 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/uber.svg @@ -0,0 +1,23 @@ + + + +uber + + + + + diff --git a/go.dev/testdata/golden/images/logos/vitess.png b/go.dev/testdata/golden/images/logos/vitess.png new file mode 100644 index 00000000..7de16d2b Binary files /dev/null and b/go.dev/testdata/golden/images/logos/vitess.png differ diff --git a/go.dev/testdata/golden/images/logos/wildlife.svg b/go.dev/testdata/golden/images/logos/wildlife.svg new file mode 100644 index 00000000..39d18703 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/wildlife.svg @@ -0,0 +1,14 @@ + + + + diff --git a/go.dev/testdata/golden/images/logos/youtube.svg b/go.dev/testdata/golden/images/logos/youtube.svg new file mode 100644 index 00000000..aee9af34 --- /dev/null +++ b/go.dev/testdata/golden/images/logos/youtube.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/images/meetup.svg b/go.dev/testdata/golden/images/meetup.svg new file mode 100644 index 00000000..98af2916 --- /dev/null +++ b/go.dev/testdata/golden/images/meetup.svg @@ -0,0 +1,47 @@ + + + + diff --git a/go.dev/testdata/golden/images/menu-24px-white.svg b/go.dev/testdata/golden/images/menu-24px-white.svg new file mode 100644 index 00000000..b7e5807b --- /dev/null +++ b/go.dev/testdata/golden/images/menu-24px-white.svg @@ -0,0 +1 @@ + diff --git a/go.dev/testdata/golden/images/menu-24px.svg b/go.dev/testdata/golden/images/menu-24px.svg new file mode 100644 index 00000000..14f99cd1 --- /dev/null +++ b/go.dev/testdata/golden/images/menu-24px.svg @@ -0,0 +1 @@ + diff --git a/go.dev/testdata/golden/images/quote.svg b/go.dev/testdata/golden/images/quote.svg new file mode 100644 index 00000000..1b5a8122 --- /dev/null +++ b/go.dev/testdata/golden/images/quote.svg @@ -0,0 +1,3 @@ + + + diff --git a/go.dev/testdata/golden/images/sap-logo.png b/go.dev/testdata/golden/images/sap-logo.png new file mode 100644 index 00000000..df5ce9a1 Binary files /dev/null and b/go.dev/testdata/golden/images/sap-logo.png differ diff --git a/go.dev/testdata/golden/images/star-24px.svg b/go.dev/testdata/golden/images/star-24px.svg new file mode 100644 index 00000000..ead6a268 --- /dev/null +++ b/go.dev/testdata/golden/images/star-24px.svg @@ -0,0 +1 @@ + diff --git a/go.dev/testdata/golden/images/walmart-logo.png b/go.dev/testdata/golden/images/walmart-logo.png new file mode 100644 index 00000000..16358bd3 Binary files /dev/null and b/go.dev/testdata/golden/images/walmart-logo.png differ diff --git a/go.dev/testdata/golden/index.html b/go.dev/testdata/golden/index.html new file mode 100644 index 00000000..0c6d9772 --- /dev/null +++ b/go.dev/testdata/golden/index.html @@ -0,0 +1,1558 @@ + + + + + + + + + + + + + + + + + + +go.dev + + + + + + + + +
    +
    +
    +
    +

    Build fast, reliable, and efficient software at scale

    +
      +
    • + + + + Go is an open source programming language supported by Google +
    • +
    • + + + + Easy to learn and get started with +
    • +
    • + + + + Built-in concurrency and a robust standard library +
    • +
    • + + + + Growing ecosystem of partners, communities, and tools +
    • +
    +
    +
    + +
    +

    + Download packages for + Windows 64-bit, + macOS, + Linux, and + more +

    +

    + The go command by default downloads and authenticates + modules using the Go module mirror and Go checksum database run by + Google. Learn more. +

    +
    +
    +
    + Go Gopher climbing a ladder. +
    +
    +
    +
    + +
    +
    +

    Companies using Go

    +

    Organizations in every industry use Go to power their software and services + + View all stories + +

    +
    +
    + +
    +
    +
    +
    +
    +
    +
      + +
    • +
      +
      +

      “At the time, no single team member knew Go, but +within a month, everyone was writing in Go and we were +building out the endpoints. It was the flexibility, how easy it was to use, +and the really cool concept behind Go (how Go handles native concurrency, +garbage collection, and of course safety+speed.) that helped engage us +during the build. Also, who can beat that cute mascot!”

      +
      — Jaime Enrique Garcia Lopez, + Senior Software Development Manager + at Capital One +
      +
      +
      +
    • + +
    • +
      +
      +

      "A small language that compiles fast makes for a happy developer. +The Go language is small, compiles really fast, and as a result it lets your +mind focus on the actual problem and less on the tool you are using to solve +it. Code, test, debug cycles are so quick that you forget you are not +working with an interpreted language. Looking at our code, you see +less boilerplate and more business logic."

      +
      — Clayton Coleman, + Lead Engineer, Open Shift + at RedHat +
      +
      +
      +
    • + +
    • +
      +
      +

      Go has excellent characteristics for scalability and services +written using it typically have very small memory footprints. +Because code is compiled into a single static binary, services can also be +containerised with ease, making it much simpler to build and deploy. These +attributes make Go an ideal choice for companies building +microservices, as you can easily deploy into a highly available and +scalable environment such as Kubernetes.”

      +
      — Matt Boyle, + Lead Software Engineer + at Curve +
      +
      +
      +
    • + +
    • +
      +
      +

      "In our tightly managed environments where we run Go code, +we have seen a CPU reduction of approximately 10% +with cleaner and maintainable code."

      +
      — Bala Natarajan, + Sr. Director of Engineering, Developer Experience + at PayPal +
      +
      +
      +
    • + +
    • +
      +
      +

      "Tooling has always been a problem with our legacy code base... but we have + found that Go has excellent tooling, plus built-in testing, benchmarking, + and profiling frameworks. It is easy to write efficient and resilient + applications. After working on Go, most of our developers don't want + to go back to other languages."

      +
      — Benjamin Cane, + Vice President and Principal Engineer + at American Express +
      +
      +
      +
    • + +
    • +
      +
      +

      "...when a programming language is designed for exactly the environment most + of us use right now—scalable, cloud-based servers that are optimized for + performance—a lot can go right."

      +
      — John Biggs and Ben Popper, + + at Stack Overflow +
      +
      +
      +
    • + +
    +
    + + +
    +
    +
    + +
    +
    +
    +

    What’s possible with Go

    +

    + Use Go for a variety of software development purposes +

    +
    + +
    +
    +
    + +
    +
    +
    +
    +

    Get started with Go

    +

    + Explore a wealth of learning resources, including guided journeys, courses, books, and more. +

    + +
    +
    + +
      +
    • + In-Person Trainings +
    • + +
    • + + Ardan Labs + +
      + Offering customized on-site live training classes. +
      +
    • + +
    • + + Gopher Guides + +
      + Customized In-person, remote, and online training classes. Training for Developers by Developers. +
      +
    • + +
    • + + Boss Sauce Creative + +
      + Personalized or track-based Go training for teams. +
      +
    • + +
    • + + Shiju Varghese + +
      + On-site classroom training on Go and consulting on distributed systems architectures, in India. +
      +
    • + +
    +
    +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/index.xml b/go.dev/testdata/golden/index.xml new file mode 100644 index 00000000..b113f790 --- /dev/null +++ b/go.dev/testdata/golden/index.xml @@ -0,0 +1,304 @@ + + + + go.dev + https://go.dev/ + Recent content on go.dev + Hugo -- gohugo.io + en + Mon, 01 Jun 2020 00:00:00 +0000 + + + + + + PayPal Taps Go to Modernize and Scale + https://go.dev/solutions/paypal/ + Mon, 01 Jun 2020 00:00:00 +0000 + + https://go.dev/solutions/paypal/ + Since our NoSQL and DB proxy used quite a bit of system details in a multi-threaded mode, the code got complex managing the different conditions, given that Go provides channels and routines to deal with complexity, we were able to structure the code to meet our requirements. &mdash; Bala Natarajan ,&nbsp; Sr. Director of Engineering,&nbsp;Developer Experience &nbsp;at PayPal New code infrastructure built on Go PayPal was created to democratize financial services and empower people and businesses to join and thrive in the global economy. + + + + American Express Uses Go for Payments & Rewards + https://go.dev/solutions/americanexpress/ + Thu, 19 Dec 2019 00:00:00 +0000 + + https://go.dev/solutions/americanexpress/ + What makes Go different from other programming languages is cognitive load. You can do more with less code, which makes it easier to reason about and understand the code that you do end up writing. +The majority of Go code ends up looking quite similar, so, even if you’re working with a completely new codebase, you can get up and running pretty quickly. + &mdash; Glen Balliet ,&nbsp; Engineering Director of loyalty platforms &nbsp;at American Express Go Improves Microservices and Speeds Productivity Founded in 1850, American Express is a globally integrated payments company offering charge and credit card products, merchant acquisition and processing services, network services, and travel-related services. + + + + MercadoLibre Grows with Go + https://go.dev/solutions/mercadolibre/ + Sun, 10 Nov 2019 16:26:31 -0400 + + https://go.dev/solutions/mercadolibre/ + I think that the tour of Go is by far the best introduction to a language that I’ve seen, It’s really simple and it gives you a fair overview of probably 80 percent of the language. When we want to get developers to learn Go, and to get to production fast, we tell them to start with the tour of Go. &mdash; Eric Kohan ,&nbsp; Software Engineering Manager &nbsp;at MercadoLibre Go helps integrated ecosystem attract developers and scale eCommerce MercadoLibre, Inc. + + + + Copyright + https://go.dev/copyright/ + Tue, 05 Nov 2019 15:50:08 -0500 + + https://go.dev/copyright/ + Except as noted, the contents of this site are licensed under the Creative Commons Attribution 3.0 License, and code is licensed under a BSD license. + + + + Terms of Service + https://go.dev/tos/ + Tue, 05 Nov 2019 15:47:16 -0500 + + https://go.dev/tos/ + The Go website (the &ldquo;Website&rdquo;) is hosted by Google. By using and/or visiting the Website, you consent to be bound by Google&rsquo;s general Terms of Service and Google&rsquo;s general Privacy Policy. + + + + Go for Cloud & Network Services + https://go.dev/solutions/cloud/ + Fri, 04 Oct 2019 15:26:31 -0400 + + https://go.dev/solutions/cloud/ + Overview Go helps enterprises build and scale cloud computing systems As applications and processing move to the cloud, concurrency becomes a very big issue. Cloud computing systems, by their very nature, share and scale resources. Coordinating access to shared resources is an issue that impacts every application processing in the cloud, and requires programming languages “explicitly geared to develop highly reliable concurrent applications.” + Go makes it very easy to scale as a company. + + + + Command-line Interfaces (CLIs) + https://go.dev/solutions/clis/ + Fri, 04 Oct 2019 15:26:31 -0400 + + https://go.dev/solutions/clis/ + Overview CLI developers prefer Go for portability, performance, and ease of creation Command line interfaces (CLIs), unlike graphical user interfaces (GUIs), are text-only. Cloud and infrastructure applications are primarily CLI-based due to their easy automation and remote capabilities. +Key benefits Leverage fast compile times to build programs that start quickly and run on any system Developers of CLIs find Go to be ideal for designing their applications. Go compiles very quickly into a single binary, works across platforms with a consistent style, and brings a strong development community. + + + + Go for Web Development + https://go.dev/solutions/webdev/ + Fri, 04 Oct 2019 15:26:31 -0400 + + https://go.dev/solutions/webdev/ + Overview Go delivers speed, security, and developer-friendly tools for Web Applications Go is designed to enable developers to rapidly develop scalable and secure web applications. Go ships with an easy to use, secure and performant web server and includes it own web templating library. Go has excellent support for all of the latest technologies from HTTP/2, to databases like MySQL, MongoDB and ElasticSearch, to the latest encryption standards including TLS 1. + + + + Development Operations & Site reliability Engineering + https://go.dev/solutions/devops/ + Thu, 03 Oct 2019 17:16:43 -0400 + + https://go.dev/solutions/devops/ + Overview Go helps enterprises automate and scale Development Operations (DevOps) teams help engineering organizations automate tasks and improve their continuous integration and continuous delivery and deployment (CI/CD) process. DevOps can topple developmental silos and implement tooling and automation to enhance software development, deployment, and support. +Site Reliability Engineering (SRE) was born at Google to make the company’s “large-scale sites more reliable, efficient, and scalable,”writes Silvia Fressard, an independent DevOps consultant. + + + + About + https://go.dev/about/ + Tue, 25 Jun 2019 17:51:23 -0400 + + https://go.dev/about/ + Go.dev is a companion website to golang.org. Golang.org is the home of the open source project and distribution, while go.dev is the hub for Go users providing centralized and curated resources from across the Go ecosystem. +Go.dev provides: + Centralized information for Go packages and modules published on index.golang.org. Essential learning resources Critical use cases &amp; case studies Go.dev is currently in MVP status. We&rsquo;re proud of what we&rsquo;ve built and excited to share it with the community. + + + + Actuating Google Production: How Google’s Site Reliability Engineering Team Uses Go + https://go.dev/solutions/google/sitereliability/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/google/sitereliability/ + Google runs a small number of very large services. Those services are powered by a global infrastructure covering everything a developer needs: storage systems, load balancers, network, logging, monitoring, and much more. Nevertheless, it is not a static system—it cannot be. Architecture evolves, new products and ideas are created, new versions must be rolled out, configs pushed, database schema updated, and more. We end up deploying changes to our systems dozens of times per second. + + + + + https://go.dev/solutions/grail/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/grail/ + + + + + + https://go.dev/solutions/capital-one/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/capital-one/ + + + + + Chrome Content Optimization Service Runs on Go + https://go.dev/solutions/google/chrome/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/google/chrome/ + When the product Chrome comes to mind, you probably think solely of the user-installed browser. But behind the scenes, Chrome has an extensive fleet of backends. Among these is the Chrome Optimization Guide service. This service forms an important basis for Chrome&rsquo;s user experience strategy, operating in the critical path for users, and is implemented in Go. +The Chrome Optimization Guide service is designed to bring the power of Google to Chrome by providing hints to the installed browser about what optimizations may be performed on a page load, as well as when they can be applied most effectively. + + + + + https://go.dev/solutions/cockroachlabs/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/cockroachlabs/ + + + + + Dropbox - Open sourcing our Go libraries + https://go.dev/solutions/dropbox/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/dropbox/ + + + + + + https://go.dev/solutions/cloudflare/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/cloudflare/ + + + + + + https://go.dev/solutions/armut/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/armut/ + + + + + + https://go.dev/solutions/curve/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/curve/ + + + + + + https://go.dev/solutions/facebook/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/facebook/ + + + + + How Google's Core Data Solutions Team Uses Go + https://go.dev/solutions/google/coredata/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/google/coredata/ + Google&rsquo;s mission is “to organize the world&rsquo;s information and make it universally accessible and useful.” One of the teams responsible for organizing that information is Google’s Core Data Solutions team. The team, among other things, maintains services to index web pages across the globe. These web indexing services help support products like Google Search by keeping search results updated and comprehensive, and they’re written in Go. +In 2015, to keep up with Google’s scale, our team needed to rewrite our indexing stack from a single monolithic binary written in C++ to multiple components in a microservices architecture. + + + + + https://go.dev/solutions/microsoft/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/microsoft/ + + + + + How the Firebase Hosting Team Scaled With Go + https://go.dev/solutions/google/firebase/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/google/firebase/ + The Firebase Hosting team provides static web hosting services for Google Cloud customers. They provide a static web host that sits behind a global content delivery network, and offer users tools that are easy to use. The team also develops features that range from uploading site files to registering domains to tracking usage. +Before joining Google, Firebase Hosting’s tech stack was written in Node.js. The team started to use Go when they needed to interoperate with several other Google services. + + + + + https://go.dev/solutions/wildlifestudios/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/wildlifestudios/ + + + + + + https://go.dev/solutions/netflix/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/netflix/ + + + + + + https://go.dev/solutions/riotgames/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/riotgames/ + + + + + + https://go.dev/solutions/salesforce/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/salesforce/ + + + + + + https://go.dev/solutions/target/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/target/ + + + + + + https://go.dev/solutions/twitch/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/twitch/ + + + + + Twitter - 5 billion sessions a day in realtime + https://go.dev/solutions/twitter/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/twitter/ + + + + + Uber - GPU-power analytics engine in Go + https://go.dev/solutions/uber/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/uber/ + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/js/carousels.js b/go.dev/testdata/golden/js/carousels.js new file mode 100644 index 00000000..c2d5d9fa --- /dev/null +++ b/go.dev/testdata/golden/js/carousels.js @@ -0,0 +1,183 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/** + * Handles Carousel logic. Hides right/left buttons if user is at the end of the + * list of slides. Transitions the movement with CSS, and blocks slide changes + * during the transitions with `allowShift`. + */ +(() => { + 'use strict'; + + /** TODO: refactor to slide container using transformX instead of left, + * in order to leverage GPU rendering + */ + + function initCarousel(container, prev, next, breakpoints) { + const slides = Array.from(container.children); + let posInitial; + const slidesCount = container.children.length; + let distanceToMove = Math.floor( + container.children[0].getBoundingClientRect().width + ); + let index = 0; + let allowShift = true; + let groupCountAdjustment = getGroupCountAdjustment(); + + adjustTabbableSlides(breakpoints); + + // Click events. + prev.addEventListener('click', () => { + shiftSlide(-1); + }); + next.addEventListener('click', () => { + shiftSlide(1); + }); + + // Transition events. + container.addEventListener('transitionend', handleTransitionEnd); + + window.addEventListener( + 'resize', + debounce(() => { + // the next 3 lines reinitializes the slide container node + container.style.display = 'none'; + container.offsetHeight; + container.style.display = 'flex'; + + groupCountAdjustment = getGroupCountAdjustment(); + distanceToMove = Math.floor( + container.children[0].getBoundingClientRect().width + ); + container.style.left = -(distanceToMove * index) + 'px'; + }) + ); + + function shiftSlide(dir, action) { + container.classList.add('shifting'); + if (allowShift) { + if (!action) { + posInitial = container.offsetLeft; + } + if (dir === 1) { + prev.removeAttribute('hidden'); + container.style.left = posInitial - distanceToMove + 'px'; + index++; + } else if (dir === -1) { + next.removeAttribute('hidden'); + container.style.left = posInitial + distanceToMove + 'px'; + index--; + } else { + container.style.left = posInitial + 'px'; + } + if (index === 0) { + prev.setAttribute('hidden', true); + } else if (index === slidesCount - 1 - groupCountAdjustment) { + next.setAttribute('hidden', true); + } + } + allowShift = false; + adjustTabbableSlides(breakpoints); + } + + /** + * Only allow visible slides to be tabbable + */ + function adjustTabbableSlides(breakpoints) { + let count = 1; + if (breakpoints) { + for (const bp of breakpoints) { + if (window.innerWidth > bp.px) { + count = bp.groupCount; + } + } + } + slides.forEach((slide, i) => { + const links = slide.querySelectorAll('a'); + if (i >= index && i < index + count) { + links.forEach(link => (link.tabIndex = 0)); + } else { + links.forEach(link => (link.tabIndex = -1)); + } + }); + } + + function handleTransitionEnd() { + container.classList.remove('shifting'); + allowShift = true; + } + + function getGroupCountAdjustment() { + let groupCountAdjustment = 0; + + if (breakpoints) { + for (const bp of breakpoints) { + if (window.innerWidth > bp.px) { + groupCountAdjustment = bp.groupCount - 1; + } + } + } + return groupCountAdjustment; + } + } + + // Build quotes carousel. + const quotesSliderContainer = document.querySelector( + '.js-testimonialsGoQuotes' + ); + const quotesPrev = document.querySelector('.js-testimonialsPrev'); + const quotesNext = document.querySelector('.js-testimonialsNext'); + // Build events carousel. + const eventsSliderContainer = document.querySelector( + '.js-goCarouselEventsSlides' + ); + const eventsPrev = document.querySelector('.js-eventsCarouselPrev'); + const eventsNext = document.querySelector('.js-eventsCarouselNext'); + + // Build Solutions hero carousel. + const solutionsCarouselSliderContainer = document.querySelector( + '.js-solutionsHeroCarouselSlides' + ); + const solutionsCarouselPrev = document.querySelector( + '.js-solutionsHeroCarouselPrev' + ); + const solutionsCarouselNext = document.querySelector( + '.js-solutionsHeroCarouselNext' + ); + + if (quotesSliderContainer) { + initCarousel(quotesSliderContainer, quotesPrev, quotesNext); + } + if (eventsSliderContainer) { + const breakpoints = [ + {px: 768, groupCount: 2}, + {px: 1068, groupCount: 3}, + ]; + initCarousel(eventsSliderContainer, eventsPrev, eventsNext, breakpoints); + } + if (solutionsCarouselSliderContainer) { + initCarousel( + solutionsCarouselSliderContainer, + solutionsCarouselPrev, + solutionsCarouselNext + ); + } +})(); + +/** + * Debounce functions for better performance + * (c) 2018 Chris Ferdinandi, MIT License, https://gomakethings.com + * @param {Function} fn The function to debounce + */ +function debounce(fn) { + let timeout; + return (...args) => { + if (timeout) { + window.cancelAnimationFrame(timeout); + } + timeout = window.requestAnimationFrame(function () { + fn(args); + }); + }; +} diff --git a/go.dev/testdata/golden/js/hats.js b/go.dev/testdata/golden/js/hats.js new file mode 100644 index 00000000..d4ac8242 --- /dev/null +++ b/go.dev/testdata/golden/js/hats.js @@ -0,0 +1,74 @@ +function requestHaTs(cookieName, triggerId, bucketSample, promptSample) { + var inBucket; + + var cookies = decodeURIComponent(document.cookie).split(';'); + + for (let i = 0; i < cookies.length; i++) { + var c = cookies[i]; + + while (c.charAt(0) == ' ') c = c.substring(1); + + if (c.indexOf(cookieName + '=') == 0) + inBucket = c.substring((cookieName + '=').length, c.length); + } + + if (typeof inBucket === 'undefined') { + inBucket = String(Math.random() < bucketSample); + document.cookie = + cookieName + '=' + inBucket + '; path=/; max-age=2592000;'; + } + + if (inBucket === 'true') { + var shouldPrompt = Math.random() < promptSample; + if (shouldPrompt) { + document.cookie = cookieName + '=false ; path=/; max-age=2592000;'; + + var tag = document.createElement('script'); + tag.src = + 'https://www.gstatic.com/feedback/js/help/prod/service/lazy.min.js'; + tag.type = 'text/javascript'; + document.head.appendChild(tag); + + tag.onload = function () { + var helpApi = window.help.service.Lazy.create(0, { + apiKey: 'AIzaSyDfBPfajByU2G6RAjUf5sjkMSSLNTj7MMc', + locale: 'en-US', + }); + + helpApi.requestSurvey({ + triggerId: triggerId, + callback: function (requestSurveyCallbackParam) { + if (!requestSurveyCallbackParam.surveyData) { + return; + } + helpApi.presentSurvey({ + surveyData: requestSurveyCallbackParam.surveyData, + colorScheme: 1, // light + customZIndex: 10000, + }); + }, + }); + }; + } + } +} + +(function () { + // HaTS - go.dev + requestHaTs('HaTS_BKT', 'RLVVv5Lf10njVvnD1rP0QUpmtosS', 0.4, 0.5); + + // All download links on the go.dev homepage may trigger a survey. + [ + document.querySelector('.js-downloadBtn'), + document.querySelector('.js-downloadWin'), + document.querySelector('.js-downloadMac'), + document.querySelector('.js-downloadLinux'), + ].forEach(function (el) { + if (el) { + el.addEventListener('click', () => { + // HaTS - Core Go distribution + requestHaTs('HaTS_BKT_DIST', 'dz6fkRxyz0njVvnD1rP0QxCXzhSX', 0.1, 1); + }); + } + }); +})(); diff --git a/go.dev/testdata/golden/js/misc.js b/go.dev/testdata/golden/js/misc.js new file mode 100644 index 00000000..c4455c89 --- /dev/null +++ b/go.dev/testdata/golden/js/misc.js @@ -0,0 +1,187 @@ +// 'More projects' button on use case pages +(() => { + const button = document.querySelector('.js-moreProjectsBtn'); + if (!button) return; + const hiddenProjects = document.querySelectorAll('.js-featuredUsersRow[hidden]'); + button.addEventListener('click', () => { + button.setAttribute('hidden', true); + hiddenProjects.forEach(project => { + project.removeAttribute('hidden'); + }); + }); +})(); + +/* Header tags generated with markdown - inner span needed for correct scroll + position */ +(() => { + const headingHashes = Array.from(document.querySelectorAll('h2[id]')); + headingHashes.forEach(h2 => { + const text = h2.textContent; + const id = h2.id; + h2.id = id + '-h2'; + h2.textContent = ''; + const span = document.createElement('span'); + span.textContent = text; + span.id = id; + h2.appendChild(span); + }); +})(); + +// Use case pages section navigation +(() => { + const stickyNav = document.querySelector('.js-useCaseStickyNav'); + if (stickyNav) { + const linkData = { + 'overview': 'Overview', + 'key-benefits': 'Key Benefits', + 'use-case': 'Use Case', + 'featured-users': 'Featured Users', + 'get-started': 'Get Started', + }; + const container = document.querySelector('.js-useCaseSubnav'); + const subNavAnchorLinks = document.querySelector('.js-useCaseSubnavLinks'); + const siteHeader = document.querySelector('.js-siteHeader'); + const header = document.querySelector('.js-useCaseSubnavHeader'); + const icon = document.querySelector('.js-useCaseSubnavMenuIcon'); + const menu = document.querySelector('.js-useCaseSubnavMenu'); + const contentBody = document.querySelector('.js-useCaseContentBody'); + const headerHeightPx = 56; + const sectionHeadings = Array.from( + document.querySelectorAll('.sectionHeading') + ).map(h => h.firstChild); + let distanceFromTop = + window.pageYOffset + + contentBody.getBoundingClientRect().top - + headerHeightPx; + if (!header || !menu) return; + container.addEventListener('click', handleClick); + container.addEventListener('keydown', handleKeydown); + changeScrollPosition(); + + function handleClick(event) { + if (event.target === header) { + toggleMenu(); + } else { + closeMenu(); + } + } + + function handleKeydown(event) { + if (event.key === 'Enter') { + closeMenu(); + } else { + openMenu(); + } + } + + function openMenu() { + menu.classList.add('UseCaseSubNav-menu--open'); + icon.classList.add('UseCaseSubNav-menuIcon--open'); + } + + function closeMenu() { + menu.classList.remove('UseCaseSubNav-menu--open'); + icon.classList.remove('UseCaseSubNav-menuIcon--open'); + } + + function toggleMenu() { + menu.classList.toggle('UseCaseSubNav-menu--open'); + icon.classList.toggle('UseCaseSubNav-menuIcon--open'); + } + + sectionHeadings.forEach(heading => { + let a = document.createElement('a'); + a.classList.add('UseCase-anchorLink', 'anchor-link'); + a.href = `${window.location.pathname}#${heading.id}`; + a.textContent = linkData[heading.id]; + stickyNav.appendChild(a); + a = a.cloneNode(); + a.textContent = linkData[heading.id]; + subNavAnchorLinks.appendChild(a); + }); + + // Selected section styles + const anchorLinks = document.querySelectorAll('.anchor-link'); + anchorLinks.forEach(link => { + link.addEventListener('click', () => { + document + .querySelectorAll('.anchor-link') + .forEach(el => el.classList.remove('selected')); + link.classList.add('selected'); + }); + }); + + window.addEventListener('scroll', () => { + // delay in case the user clicked the anchor link and we are autoscrolling + setTimeout(setSelectedAnchor, 500); + }); + + function setSelectedAnchor() { + for (heading of sectionHeadings) { + const {offsetTop} = heading; + if (offsetTop > window.scrollY) { + anchorLinks.forEach(link => { + const anchorId = link.href.slice(link.href.indexOf('#') + 1); + if (anchorId === heading.id) { + link.classList.add('selected'); + } else { + link.classList.remove('selected'); + } + }); + break; + } + } + } + + /* sticky nav logic -- uses content for y position because reloading page + when not scrolled to the top creates bug if using current y position of + sticky nav */ + window.addEventListener('scroll', setStickyNav); + + window.addEventListener('resize', () => { + distanceFromTop = + window.pageYOffset + + contentBody.getBoundingClientRect().top - + headerHeightPx; + + changeScrollPosition() + }); + + /** + * Changes scroll position according to the size of the header and menu + * Also changes according to the user's browser + */ + function changeScrollPosition() { + const SUPPORTS_SCROLL_BEHAVIOR = document.body.style.scrollBehavior !== undefined; + const WINDOW_WIDTH_BREAKPOINT_PX = 923; + let scrollPosition = headerHeightPx; + + if (SUPPORTS_SCROLL_BEHAVIOR) { + if (window.innerWidth < WINDOW_WIDTH_BREAKPOINT_PX) { + scrollPosition += header.clientHeight; + } + } else { + if (window.innerWidth >= WINDOW_WIDTH_BREAKPOINT_PX) { + scrollPosition = siteHeader.clientHeight + } else { + scrollPosition = siteHeader.clientHeight + header.clientHeight; + } + } + + sectionHeadings.forEach((sectionHeading) => { + sectionHeading.setAttribute('style', ` + margin-bottom: -${scrollPosition}px; + padding-top: ${scrollPosition}px; + `) + }); + } + + function setStickyNav() { + if (window.scrollY > distanceFromTop) { + stickyNav.classList.add('UseCaseSubNav-anchorLinks--sticky'); + } else { + stickyNav.classList.remove('UseCaseSubNav-anchorLinks--sticky'); + } + } + } +})(); diff --git a/go.dev/testdata/golden/js/searchBox.js b/go.dev/testdata/golden/js/searchBox.js new file mode 100644 index 00000000..b6e64b61 --- /dev/null +++ b/go.dev/testdata/golden/js/searchBox.js @@ -0,0 +1,64 @@ +(() => { + 'use strict'; + const BREAKPOINT = 512; + const logo = document.querySelector('.js-headerLogo'); + const form = document.querySelector('.js-searchForm'); + const button = document.querySelector('.js-searchFormSubmit'); + const input = form.querySelector('input'); + + renderForm(); + + window.addEventListener('resize', renderForm); + + function renderForm() { + if (window.innerWidth > BREAKPOINT) { + logo.classList.remove('Header-logo--hidden'); + form.classList.remove('SearchForm--open'); + input.removeEventListener('focus', showSearchBox); + input.removeEventListener('keypress', handleKeypress); + input.removeEventListener('focusout', hideSearchBox); + } else { + button.addEventListener('click', handleSearchClick); + input.addEventListener('focus', showSearchBox); + input.addEventListener('keypress', handleKeypress); + input.addEventListener('focusout', hideSearchBox); + } + } + + /** + * Submits form if Enter key is pressed + * @param {KeyboardEvent} e + */ + function handleKeypress(e) { + if (e.key === 'Enter') form.submit(); + } + + /** + * Shows the search box when it receives focus (expands it from + * just the spyglass if we're on mobile). + */ + function showSearchBox() { + logo.classList.add('Header-logo--hidden'); + form.classList.add('SearchForm--open'); + } + + /** + * Hides the search box (shrinks to just the spyglass icon). + */ + function hideSearchBox() { + logo.classList.remove('Header-logo--hidden'); + form.classList.remove('SearchForm--open'); + } + + /** + * Expands the searchbox so input is visible and gives + * the input focus. + * @param {MouseEvent} e + */ + function handleSearchClick(e) { + e.preventDefault(); + + showSearchBox(); + input.focus(); + } +})(); diff --git a/go.dev/testdata/golden/js/site.js b/go.dev/testdata/golden/js/site.js new file mode 100644 index 00000000..23e4480c --- /dev/null +++ b/go.dev/testdata/golden/js/site.js @@ -0,0 +1,183 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/** + * A bit of navigation related code for handling dismissible elements. + */ +(() => { + 'use strict'; + + function registerHeaderListeners() { + const header = document.querySelector('.js-header'); + const menuButtons = document.querySelectorAll('.js-headerMenuButton'); + menuButtons.forEach(button => { + button.addEventListener('click', e => { + e.preventDefault(); + header.classList.toggle('is-active'); + button.setAttribute( + 'aria-expanded', + header.classList.contains('is-active') + ); + }); + }); + + const scrim = document.querySelector('.js-scrim'); + scrim.addEventListener('click', e => { + e.preventDefault(); + header.classList.remove('is-active'); + menuButtons.forEach(button => { + button.setAttribute( + 'aria-expanded', + header.classList.contains('is-active') + ); + }); + }); + } + + function registerSolutionsTabs() { + // Handle tab navigation on Solutions page. + const tabList = document.querySelector('.js-solutionsTabs'); + + if (tabList) { + const tabs = tabList.querySelectorAll('[role="tab"]'); + let tabFocus = getTabFocus(); + + changeTabs({ target: tabs[tabFocus] }) + + tabs.forEach(tab => { + tab.addEventListener('click', changeTabs); + }); + + // Enable arrow navigation between tabs in the tab list + tabList.addEventListener('keydown', e => { + // Move right + if (e.keyCode === 39 || e.keyCode === 37) { + tabs[tabFocus].setAttribute('tabindex', -1); + if (e.keyCode === 39) { + tabFocus++; + // If we're at the end, go to the start + if (tabFocus >= tabs.length) { + tabFocus = 0; + } + // Move left + } else if (e.keyCode === 37) { + tabFocus--; + // If we're at the start, move to the end + if (tabFocus < 0) { + tabFocus = tabs.length - 1; + } + } + tabs[tabFocus].setAttribute('tabindex', 0); + tabs[tabFocus].focus(); + setTabFocus(tabs[tabFocus].id); + } + }); + + function getTabFocus() { + const hash = window.location.hash; + + switch (hash) { + case '#use-cases': + return 1; + case '#case-studies': + default: + return 0; + } + } + + function setTabFocus(id) { + switch (id) { + case 'btn-tech': + tabFocus = 1; + window.location.hash = '#use-cases'; + break; + case 'btn-companies': + default: + window.location.hash = '#case-studies'; + tabFocus = 0; + } + } + + function changeTabs(e) { + const target = e.target; + const parent = target.parentNode; + const grandparent = parent.parentNode; + + // Remove all current selected tabs + parent + .querySelectorAll('[aria-selected="true"]') + .forEach(t => t.setAttribute('aria-selected', false)); + + // Set this tab as selected + target.setAttribute('aria-selected', true); + setTabFocus(target.id) + + // Hide all tab panels + grandparent + .querySelectorAll('[role="tabpanel"]') + .forEach(panel => panel.setAttribute('hidden', true)); + + // Show the selected panel + grandparent.parentNode + .querySelector(`#${target.getAttribute('aria-controls')}`) + .removeAttribute('hidden'); + } + } + } + + /** + * Attempts to detect user's operating system and sets the download + * links accordingly + */ + async function setDownloadLinks() { + const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0; + const versionElement = document.querySelector('.js-latestGoVersion'); + if (versionElement) { + const downloadBtn = document.querySelector('.js-downloadBtn'); + const goVersionEl = document.querySelector('.js-goVersion'); + const anchorTagWindows = document.querySelector('.js-downloadWin'); + const anchorTagMac = document.querySelector('.js-downloadMac'); + const anchorTagLinux = document.querySelector('.js-downloadLinux'); + const version = await getLatestVersion(); + + const macDownloadUrl = `https://dl.google.com/go/${version}.darwin-amd64.pkg`; + const windowsDownloadUrl = `https://dl.google.com/go/${version}.windows-amd64.msi`; + const linuxDownloadUrl = `https://dl.google.com/go/${version}.linux-amd64.tar.gz`; + goVersionEl.textContent = `\u00a0(${version.replace('go', '')})`; + + anchorTagWindows.href = windowsDownloadUrl; + anchorTagMac.href = macDownloadUrl; + anchorTagLinux.href = linuxDownloadUrl; + downloadBtn.href = isMac ? macDownloadUrl : windowsDownloadUrl; + } + } + + /** + * Retrieves list of Go versions & returns the latest + */ + async function getLatestVersion() { + let version = 'go1.15'; // fallback version if fetch fails + try { + const versionData = await ( + await fetch('https://golang.org/dl/?mode=json') + ).json(); + if (!versionData.length) { + return version; + } + versionData.sort((v1, v2) => { + return v2.version - v1.version; + }); + version = versionData[0].version; + } catch (err) { + console.error(err); + } + return version; + } + + window.addEventListener('DOMContentLoaded', () => { + registerHeaderListeners(); + registerSolutionsTabs(); + setDownloadLinks(); + }); +})(); diff --git a/go.dev/testdata/golden/learn/index.html b/go.dev/testdata/golden/learn/index.html new file mode 100644 index 00000000..d5d1d6b8 --- /dev/null +++ b/go.dev/testdata/golden/learn/index.html @@ -0,0 +1,1265 @@ + + + + + + + + + + + + + + + + + +Getting Started - go.dev + + + + + + + + +
    +
    +
    +
    +
    + + +

    Install the latest version of Go

    +

    + Install the latest version of Go. For instructions to download and install + the Go compilers, tools, and libraries, + + view the install documentation. + +

    + +

    + Download packages for + Windows 64-bit, + macOS, + Linux, and + more. +

    +
    +
    + Go Gopher riding a motorcycle +
    +
    +
    +
      + +
    • +
      +
      + +
      +
      Documentation
      +

      Everything there is to know about Go. Get started on a new project or brush up for your existing Go code.

      + +
      +
      +
      + +
    • + +
    • +
      +
      + +
      +
      Tour of Go
      +

      An interactive introduction to Go in three sections. Each section concludes with a few exercises so you can practice what you've learned.

      + +
      +
      +
      + +
    • + +
    • +
      +
      + +
      +
      Playground
      +

      The Playground allows anyone with a web browser to write Go code that we immediately compile, link, and run on our servers.

      + +
      +
      +
      + +
    • + +
    +
    +
    +
    + +
    +

    Learning Resources

    +
    + +
    +
    +
    +

    Guided learning journeys

    +
    +
    +
      + +
    • +
      +
      + +
      + +
      +
      Web Dev
      +

      Go Web Examples provides easy to understand code snippets on how to use Go for web development.

      + +
      +
      +
      + +
    • + +
    • +
      +
      + +
      + +
      +
      CLIs
      +

      This workshop will walk you through building a CLI app with Go, introducing you to basic Go principles and CLI frameworks along the way.

      + +
      +
      +
      + +
    • + +
    • +
      +
      + +
      + +
      +
      New to coding?
      +

      Get started with this introductory course covering basic programming principles and Go fundamentals.

      + +
      +
      +
      + +
    • + +
    • +
      +
      + +
      + +
      +
      Go by example
      +

      Go by Example is a hands-on introduction to Go using annotated example programs. It’s a great starting point to use when tackling any Go project.

      + +
      +
      +
      + +
    • + +
    +
    +
    +
    + +
    +
    +
    +

    Online learning

    +
    +
    +
      + +
    • +
      +
      + +
      + +
      +
      Codecademy
      +

      This course covers setting up a Go environment, the fundamentals of Go, and will walk you through building a few sample projects.

      + +
      +
      +
      + +
    • + +
    • +
      +
      + +
      + +
      +
      Exercism.io
      +

      Tackle community-sourced Go challenges in this interactive course, working with other participants and mentors along the way.

      + +
      +
      +
      + +
    • + +
    • +
      +
      + +
      + +
      +
      Google Developers Codelabs
      +

      Get started with a free codelab that walks you through using Go to build and publish a Google Cloud Function.

      + +
      +
      +
      + +
    • + +
    • +
      +
      + +
      + +
      +
      Gophercises
      +

      Build your confidence in using Go with this course, where you’ll build roughly twenty different Go applications.

      + +
      +
      +
      + +
    • + +
    +
    +
    +
    + +
    + +
    + + + +
    +
    +
    +

    In-person training

    +
    +
    +
      + +
    • +

      + Ardan Labs +

      +

      Offering customized on-site live training classes.

      +
    • + +
    • +

      + Gopher Guides +

      +

      Customized In-person, remote, and online training classes. Training for Developers by Developers.

      +
    • + +
    • +

      + Boss Sauce Creative +

      +

      Personalized or track-based Go training for teams.

      +
    • + +
    • +

      + Shiju Varghese +

      +

      On-site classroom training on Go and consulting on distributed systems architectures, in India.

      +
    • + +
    +
    +
    +
    + +
    +
    +
    +

    Meetups

    +

    + View more events > +

    +
    +
      + +
    • +
      + + Utah Golang User Group (Reserve Mike Campbell) group photo + +
      +
      +
      +

      Nov 3, 2020 · Lehi, UT USA

      +
      +
      +

      + Utah Golang User Group (Reserve Mike Campbell) +

      +

      Join us on Slack!
      +The Utah Go User Group (#UTGO) is a community of people interested in software development and Google's Go programming language (Golang). Everyone is welcome.  We currently meet in Lehi. To discuss and vote on topic ideas, go to https://github.com/forgeutah/utah-go
      +

      +
      +
      + +
      +
      +
    • + +
    • +
      + + Book Club > Get Programming With Go group photo + +
      +
      +
      +

      Oct 7, 2020 · Eugene, OR USA

      +
      +
      +

      + Book Club > Get Programming With Go +

      +

      All Gophers and curious software professionals are welcome to come discuss Go and related topics.
      +Go is a Google-funded language for massively-scalable distributed systems that is statically typed and compiled. It has quickly stabilized and is running head-to-head with C++, Java, C#, etc. (The Computer Language Benchmarks Game - Go). However, a larger-than-expected portion of new Gophers is made up of dynamic/interpreted language users who tend to be seeking relief from the cruft in their current languages and/or a more clear future within the horizontally-growing landscape of modern computing.
      +If you're building web apps, designing APIs, thrive on scalability, or you're simply curious about this fun new(ish) language, let's meetup.
      +• More resources are available at www.euggo.org

      +
      +
      + +
      +
      +
    • + +
    • +
      + + Women Who Go Book club - chapter 2.1: The Parser part 2 group photo + +
      +
      +
      +

      Oct 7, 2020 · Berlin, Germany

      +
      +
      +

      + Women Who Go Book club - chapter 2.1: The Parser part 2 +

      +

      Join us on Slack: https://wwgberlin.herokuapp.com/ 
      +Follow us on Twitter: @WWGBerlin
      +Go (also known as Golang) is a great programming language to learn and develop in. We built this meetup to offer a better entry point to women who are interested in Go. We also want to provide a space for networking, learning and finding mentors. This group shall bring us together so we can continue to grow in Go.
      +You can become a WWG mentee if:
      +1. You identify as female, publicly or privately 
      +2. You have some interest in Go
      +Supporters of Women Who Go are welcome to join, especially as mentors. For the Go Study Groups, the mentee/learners spots will be given to women.
      +Feel free to check out our learning resources: https://github.com/wwgberlin/GoStudyGroup 
      Feel free to contribute to our resources by adding Go Tutorials to it!
      +For companies who want to host and sponsor Women Who Go Berlin: Please send us a msg through meetup or Twitter: @WWGBerlin

      +
      +
      + +
      +
      +
    • + +
    +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/learn/index.xml b/go.dev/testdata/golden/learn/index.xml new file mode 100644 index 00000000..149442ad --- /dev/null +++ b/go.dev/testdata/golden/learn/index.xml @@ -0,0 +1,14 @@ + + + + Getting Started on go.dev + https://go.dev/learn/ + Recent content in Getting Started on go.dev + Hugo -- gohugo.io + en + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/robots.txt b/go.dev/testdata/golden/robots.txt new file mode 100644 index 00000000..c2a49f4f --- /dev/null +++ b/go.dev/testdata/golden/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Allow: / diff --git a/go.dev/testdata/golden/series/case-studies/index.html b/go.dev/testdata/golden/series/case-studies/index.html new file mode 100644 index 00000000..0a86882d --- /dev/null +++ b/go.dev/testdata/golden/series/case-studies/index.html @@ -0,0 +1,540 @@ + + + + + + + + + + + + + + + + + +Case Studies - go.dev + + + + + + + + +
    +

    Case Studies

    + +
    +
    + + + diff --git a/go.dev/testdata/golden/series/case-studies/index.xml b/go.dev/testdata/golden/series/case-studies/index.xml new file mode 100644 index 00000000..807851d9 --- /dev/null +++ b/go.dev/testdata/golden/series/case-studies/index.xml @@ -0,0 +1,236 @@ + + + + Case Studies on go.dev + https://go.dev/series/case-studies/ + Recent content in Case Studies on go.dev + Hugo -- gohugo.io + en + Mon, 01 Jun 2020 00:00:00 +0000 + + + + + + PayPal Taps Go to Modernize and Scale + https://go.dev/solutions/paypal/ + Mon, 01 Jun 2020 00:00:00 +0000 + + https://go.dev/solutions/paypal/ + Since our NoSQL and DB proxy used quite a bit of system details in a multi-threaded mode, the code got complex managing the different conditions, given that Go provides channels and routines to deal with complexity, we were able to structure the code to meet our requirements. &mdash; Bala Natarajan ,&nbsp; Sr. Director of Engineering,&nbsp;Developer Experience &nbsp;at PayPal New code infrastructure built on Go PayPal was created to democratize financial services and empower people and businesses to join and thrive in the global economy. + + + + American Express Uses Go for Payments & Rewards + https://go.dev/solutions/americanexpress/ + Thu, 19 Dec 2019 00:00:00 +0000 + + https://go.dev/solutions/americanexpress/ + What makes Go different from other programming languages is cognitive load. You can do more with less code, which makes it easier to reason about and understand the code that you do end up writing. +The majority of Go code ends up looking quite similar, so, even if you’re working with a completely new codebase, you can get up and running pretty quickly. + &mdash; Glen Balliet ,&nbsp; Engineering Director of loyalty platforms &nbsp;at American Express Go Improves Microservices and Speeds Productivity Founded in 1850, American Express is a globally integrated payments company offering charge and credit card products, merchant acquisition and processing services, network services, and travel-related services. + + + + MercadoLibre Grows with Go + https://go.dev/solutions/mercadolibre/ + Sun, 10 Nov 2019 16:26:31 -0400 + + https://go.dev/solutions/mercadolibre/ + I think that the tour of Go is by far the best introduction to a language that I’ve seen, It’s really simple and it gives you a fair overview of probably 80 percent of the language. When we want to get developers to learn Go, and to get to production fast, we tell them to start with the tour of Go. &mdash; Eric Kohan ,&nbsp; Software Engineering Manager &nbsp;at MercadoLibre Go helps integrated ecosystem attract developers and scale eCommerce MercadoLibre, Inc. + + + + Actuating Google Production: How Google’s Site Reliability Engineering Team Uses Go + https://go.dev/solutions/google/sitereliability/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/google/sitereliability/ + Google runs a small number of very large services. Those services are powered by a global infrastructure covering everything a developer needs: storage systems, load balancers, network, logging, monitoring, and much more. Nevertheless, it is not a static system—it cannot be. Architecture evolves, new products and ideas are created, new versions must be rolled out, configs pushed, database schema updated, and more. We end up deploying changes to our systems dozens of times per second. + + + + + https://go.dev/solutions/grail/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/grail/ + + + + + + https://go.dev/solutions/capital-one/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/capital-one/ + + + + + Chrome Content Optimization Service Runs on Go + https://go.dev/solutions/google/chrome/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/google/chrome/ + When the product Chrome comes to mind, you probably think solely of the user-installed browser. But behind the scenes, Chrome has an extensive fleet of backends. Among these is the Chrome Optimization Guide service. This service forms an important basis for Chrome&rsquo;s user experience strategy, operating in the critical path for users, and is implemented in Go. +The Chrome Optimization Guide service is designed to bring the power of Google to Chrome by providing hints to the installed browser about what optimizations may be performed on a page load, as well as when they can be applied most effectively. + + + + + https://go.dev/solutions/cockroachlabs/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/cockroachlabs/ + + + + + Dropbox - Open sourcing our Go libraries + https://go.dev/solutions/dropbox/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/dropbox/ + + + + + + https://go.dev/solutions/cloudflare/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/cloudflare/ + + + + + + https://go.dev/solutions/armut/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/armut/ + + + + + + https://go.dev/solutions/curve/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/curve/ + + + + + + https://go.dev/solutions/facebook/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/facebook/ + + + + + How Google's Core Data Solutions Team Uses Go + https://go.dev/solutions/google/coredata/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/google/coredata/ + Google&rsquo;s mission is “to organize the world&rsquo;s information and make it universally accessible and useful.” One of the teams responsible for organizing that information is Google’s Core Data Solutions team. The team, among other things, maintains services to index web pages across the globe. These web indexing services help support products like Google Search by keeping search results updated and comprehensive, and they’re written in Go. +In 2015, to keep up with Google’s scale, our team needed to rewrite our indexing stack from a single monolithic binary written in C++ to multiple components in a microservices architecture. + + + + + https://go.dev/solutions/microsoft/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/microsoft/ + + + + + How the Firebase Hosting Team Scaled With Go + https://go.dev/solutions/google/firebase/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/google/firebase/ + The Firebase Hosting team provides static web hosting services for Google Cloud customers. They provide a static web host that sits behind a global content delivery network, and offer users tools that are easy to use. The team also develops features that range from uploading site files to registering domains to tracking usage. +Before joining Google, Firebase Hosting’s tech stack was written in Node.js. The team started to use Go when they needed to interoperate with several other Google services. + + + + + https://go.dev/solutions/wildlifestudios/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/wildlifestudios/ + + + + + + https://go.dev/solutions/netflix/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/netflix/ + + + + + + https://go.dev/solutions/riotgames/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/riotgames/ + + + + + + https://go.dev/solutions/salesforce/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/salesforce/ + + + + + + https://go.dev/solutions/target/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/target/ + + + + + + https://go.dev/solutions/twitch/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/twitch/ + + + + + Twitter - 5 billion sessions a day in realtime + https://go.dev/solutions/twitter/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/twitter/ + + + + + Uber - GPU-power analytics engine in Go + https://go.dev/solutions/uber/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/uber/ + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/series/index.html b/go.dev/testdata/golden/series/index.html new file mode 100644 index 00000000..db85ac47 --- /dev/null +++ b/go.dev/testdata/golden/series/index.html @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + + + + +Series - go.dev + + + + + + + + +
    +

    Series

    + +
    +
    + + + diff --git a/go.dev/testdata/golden/series/index.xml b/go.dev/testdata/golden/series/index.xml new file mode 100644 index 00000000..bf0327a8 --- /dev/null +++ b/go.dev/testdata/golden/series/index.xml @@ -0,0 +1,33 @@ + + + + Series on go.dev + https://go.dev/series/ + Recent content in Series on go.dev + Hugo -- gohugo.io + en + Mon, 01 Jun 2020 00:00:00 +0000 + + + + + + Case Studies + https://go.dev/series/case-studies/ + Mon, 01 Jun 2020 00:00:00 +0000 + + https://go.dev/series/case-studies/ + + + + + Use Cases + https://go.dev/series/use-cases/ + Fri, 04 Oct 2019 15:26:31 -0400 + + https://go.dev/series/use-cases/ + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/series/use-cases/index.html b/go.dev/testdata/golden/series/use-cases/index.html new file mode 100644 index 00000000..d43418fd --- /dev/null +++ b/go.dev/testdata/golden/series/use-cases/index.html @@ -0,0 +1,350 @@ + + + + + + + + + + + + + + + + + +Use Cases - go.dev + + + + + + + + +
    +
    + + + diff --git a/go.dev/testdata/golden/series/use-cases/index.xml b/go.dev/testdata/golden/series/use-cases/index.xml new file mode 100644 index 00000000..b601e762 --- /dev/null +++ b/go.dev/testdata/golden/series/use-cases/index.xml @@ -0,0 +1,54 @@ + + + + Use Cases on go.dev + https://go.dev/series/use-cases/ + Recent content in Use Cases on go.dev + Hugo -- gohugo.io + en + Fri, 04 Oct 2019 15:26:31 -0400 + + + + + + Go for Cloud & Network Services + https://go.dev/solutions/cloud/ + Fri, 04 Oct 2019 15:26:31 -0400 + + https://go.dev/solutions/cloud/ + Overview Go helps enterprises build and scale cloud computing systems As applications and processing move to the cloud, concurrency becomes a very big issue. Cloud computing systems, by their very nature, share and scale resources. Coordinating access to shared resources is an issue that impacts every application processing in the cloud, and requires programming languages “explicitly geared to develop highly reliable concurrent applications.” + Go makes it very easy to scale as a company. + + + + Command-line Interfaces (CLIs) + https://go.dev/solutions/clis/ + Fri, 04 Oct 2019 15:26:31 -0400 + + https://go.dev/solutions/clis/ + Overview CLI developers prefer Go for portability, performance, and ease of creation Command line interfaces (CLIs), unlike graphical user interfaces (GUIs), are text-only. Cloud and infrastructure applications are primarily CLI-based due to their easy automation and remote capabilities. +Key benefits Leverage fast compile times to build programs that start quickly and run on any system Developers of CLIs find Go to be ideal for designing their applications. Go compiles very quickly into a single binary, works across platforms with a consistent style, and brings a strong development community. + + + + Go for Web Development + https://go.dev/solutions/webdev/ + Fri, 04 Oct 2019 15:26:31 -0400 + + https://go.dev/solutions/webdev/ + Overview Go delivers speed, security, and developer-friendly tools for Web Applications Go is designed to enable developers to rapidly develop scalable and secure web applications. Go ships with an easy to use, secure and performant web server and includes it own web templating library. Go has excellent support for all of the latest technologies from HTTP/2, to databases like MySQL, MongoDB and ElasticSearch, to the latest encryption standards including TLS 1. + + + + Development Operations & Site reliability Engineering + https://go.dev/solutions/devops/ + Thu, 03 Oct 2019 17:16:43 -0400 + + https://go.dev/solutions/devops/ + Overview Go helps enterprises automate and scale Development Operations (DevOps) teams help engineering organizations automate tasks and improve their continuous integration and continuous delivery and deployment (CI/CD) process. DevOps can topple developmental silos and implement tooling and automation to enhance software development, deployment, and support. +Site Reliability Engineering (SRE) was born at Google to make the company’s “large-scale sites more reliable, efficient, and scalable,”writes Silvia Fressard, an independent DevOps consultant. + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/sitemap.xml b/go.dev/testdata/golden/sitemap.xml new file mode 100644 index 00000000..c69bd2dd --- /dev/null +++ b/go.dev/testdata/golden/sitemap.xml @@ -0,0 +1,90 @@ + + + + https://go.dev/solutions/google/ + 2020-08-27T00:00:00+00:00 + + + https://go.dev/series/case-studies/ + 2020-06-01T00:00:00+00:00 + + + https://go.dev/ + 2020-06-01T00:00:00+00:00 + + + https://go.dev/solutions/paypal/ + 2020-06-01T00:00:00+00:00 + + + https://go.dev/series/ + 2020-06-01T00:00:00+00:00 + + + https://go.dev/solutions/ + 2020-06-01T00:00:00+00:00 + + + https://go.dev/solutions/americanexpress/ + 2019-12-19T00:00:00+00:00 + + + https://go.dev/solutions/mercadolibre/ + 2019-11-10T16:26:31-04:00 + + + https://go.dev/copyright/ + 2019-11-05T15:50:08-05:00 + + + https://go.dev/tos/ + 2019-11-05T15:47:16-05:00 + + + https://go.dev/solutions/cloud/ + 2019-10-04T15:26:31-04:00 + + + https://go.dev/solutions/clis/ + 2019-10-04T15:26:31-04:00 + + + https://go.dev/series/use-cases/ + 2019-10-04T15:26:31-04:00 + + + https://go.dev/solutions/webdev/ + 2019-10-04T15:26:31-04:00 + + + https://go.dev/solutions/devops/ + 2019-10-03T17:16:43-04:00 + + + https://go.dev/about/ + 2019-06-25T17:51:23-04:00 + + + https://go.dev/solutions/google/sitereliability/ + + + https://go.dev/categories/ + + + https://go.dev/solutions/google/chrome/ + + + https://go.dev/learn/ + + + https://go.dev/solutions/google/coredata/ + + + https://go.dev/solutions/google/firebase/ + + + https://go.dev/tags/ + + + diff --git a/go.dev/testdata/golden/solutions/americanexpress/amex-logo.png b/go.dev/testdata/golden/solutions/americanexpress/amex-logo.png new file mode 100644 index 00000000..298ccf6e Binary files /dev/null and b/go.dev/testdata/golden/solutions/americanexpress/amex-logo.png differ diff --git a/go.dev/testdata/golden/solutions/americanexpress/index.html b/go.dev/testdata/golden/solutions/americanexpress/index.html new file mode 100644 index 00000000..039f8b1f --- /dev/null +++ b/go.dev/testdata/golden/solutions/americanexpress/index.html @@ -0,0 +1,477 @@ + + + + + + + + + + + + + + + + + +American Express Uses Go for Payments & Rewards - go.dev + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    American Express Uses Go for Payments & Rewards

    + + + + +
    + +
    + American Express +
    + +
    +
    + +
    +
    + +
    +
    + + +
    +
    + Quotation mark. +
    +

    +

    What makes Go different from other programming languages is cognitive load. You can do more with less code, which makes it easier to reason about and understand the code that you do end up writing.

    + +

    The majority of Go code ends up looking quite similar, so, even if you’re working with a completely new codebase, you can get up and running pretty quickly.

    + +

    +
    + + — Glen Balliet + ,  + Engineering Director of loyalty platforms +  at American Express +
    +
    + +

    Go Improves Microservices and Speeds Productivity

    + +

    Founded in 1850, American Express is a globally integrated payments company offering charge and credit card products, merchant acquisition and processing services, network services, and travel-related services.

    + +

    American Express’ payment processing systems have been developed over its long history and have been updated across multiple architectural evolutions. Foremost in any update, payment processing needs to be fast, especially at very large transaction volumes, with resilience built across systems that must all be compliant with security and regulatory standards. With Go, American Express gains the speed and scalability it needs for both its payment and rewards networks.

    + +

    Modernizing American Express systems

    + +

    American Express understands that the programming language landscape is changing drastically. The company’s existing systems were purpose-built for high concurrency and low latency, but knowing that those systems would be re-platformed in the near future. The payments platform team decided to take the time to identify what languages were ideal for American Express’ evolving needs.

    + +

    The payments and rewards platform teams at American Express were among the first to start evaluating Go. These teams were focused on microservices, transaction routing, and load-balancing use cases, and they needed to modernize their architecture. Many American Express developers were familiar with the language’s capabilities and wanted to pilot Go for their high concurrency and low latency applications (such as custom transactional load balancers). With this goal in mind, the teams began lobbying senior leadership to deploy Go on the American Express payment platform.

    + +

    “We wanted to find the optimal language for writing fast and efficient applications for payment processing,” says Benjamin Cane, vice president and principal engineer at American Express. “To do so, we started an internal programming language showdown with the goal of seeing which language best fit our design and performance needs.”

    + +

    Comparing languages

    + +

    For their assessment, Cane’s team chose to build a microservice in four different programming languages. They then compared the four languages for speed/performance, tooling, testing, and ease of development.

    + +

    For the service, they decided on an ISO8583 to JSON converter. ISO8583 is an international standard for financial transactions, and it’s commonly used within American Express’ payment network. For the programming languages, they chose to compare C++, Go, Java and Node.js. With the exception of Go, all of these languages were already in use within American Express.

    + +

    From a speed perspective, Go achieved the second-best performance at 140,000 requests per second. Go showed that it excels when used for backend microservices.

    + +

    While Go may not have been the fastest language tested, its powerful tooling helped bolster its overall results. Go’s built-in testing framework, profiling capabilities, and benchmarking tools impressed the team. “It is easy to write effective tests in Go,” says Cane. “The benchmarking and profiling features make it simple to tune our application. Coupled with its fast build times, Go makes it easy to write well-tested and optimized code.”

    + +

    Ultimately, Go was selected by the team as the preferred language for building high-performance microservices. The tooling, testing frameworks, performance, and language simplicity were all key contributors.

    + +

    Go for infrastructure

    + +

    “Many of our services are running in Docker containers within our Kubernetes-based internal cloud platform” says Cane. Kubernetes is an open-source container-orchestration system written in Go. It provides clusters of hosts to run container based workloads, most notably Docker containers. Docker is a software product, also written in Go, that uses operating system level virtualization to provide portable software runtimes called containers.

    + +

    American Express also collects application metrics via Prometheus, an open-source monitoring and alerting toolkit written in Go. Prometheus collects and aggregates real-time events and metrics for monitoring and alerts.

    + +

    This triumvirate of Go solutions—Kubernetes, Docker, and Prometheus—has helped modernize American Express infrastructure.

    + +

    Improving performance with Go

    + +

    Today, scores of developers are programming with Go at American Express, with most working on platforms designed for high availability and performance.

    + +

    “Tooling has always been a critical area of need for our legacy code base,” says Cane. “We have found that Go has excellent tooling, plus built-in testing, benchmarking, and profiling frameworks. It is easy to write efficient and resilient applications.”

    + +
    +

    + “After working on Go, most of our developers don’t want to go back to other languages.” +

    +
    + — Benjamin Cane + ,  + Vice President and Principal Engineer +  at American Express +
    +
    + + +

    American Express is just beginning to see the benefits of Go. For example, Go was designed from the ground up with concurrency in mind – using lightweight “goroutines” rather than heavier-weight operating system threads – making it practical to create hundreds of thousands of goroutines in the same address space. Using goroutines, American Express has seen improved performance numbers in its real-time transaction processing.

    + +

    Go’s garbage collection is also a major improvement over other languages, both in terms of performance and ease of development. “We saw far better results of garbage collection in Go than we did in other languages, and garbage collection for real time transaction processing is a big deal.” says Cane. “Tuning garbage collection in other languages can be very complicated. With Go you don’t tune anything.”

    + +

    To learn more, read “Choosing Go at American Express” which goes into more depth about American Express’ Go adoption.

    + +

    Getting your enterprise started with Go

    + +

    Just as American Express is using Go to modernize its payment and rewards networks, dozens of other large enterprises are adopting Go as well.

    + +

    There are over one million developers using Go worldwide—spanning banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as PayPal, Mercado Libre, Capital One, Dropbox, IBM, Mercado Libre, Monzo, New York Times, Salesforce, Square, Target, Twitch, Uber, and of course Google.

    + +

    To learn more about how Go can help your enterprise build reliable, scalable software as it does at American Express, visit go.dev today.

    + +
    +
    +
    + + American Express +

    + About American Express +

    + +

    Go provides American Express with the speed and scalability it needs for both its payment and rewards networks.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/armut/index.html b/go.dev/testdata/golden/solutions/armut/index.html new file mode 100644 index 00000000..ec46e8db --- /dev/null +++ b/go.dev/testdata/golden/solutions/armut/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    + + +
    + +
    + Armut +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Armut +

    + About Armut +

    + +

    Learn about how Armut Labs reduced resource consumption and API response time after moving from C# and .net core to Go.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/capital-one/index.html b/go.dev/testdata/golden/solutions/capital-one/index.html new file mode 100644 index 00000000..f3d01848 --- /dev/null +++ b/go.dev/testdata/golden/solutions/capital-one/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    + + +
    + +
    + Capital One +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Capital One +

    + About Capital One +

    + +

    At the time, no single team member knew Go, but within a month, everyone was writing in Go and we were building out the endpoints. It was the flexibility, how easy it was to use, and the really cool concept behind Go (how Go handles native concurrency, garbage collection, and of course safety+speed.) that helped engage us during the build. Also, who can beat that cute mascot!

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/capital-one/logo.svg b/go.dev/testdata/golden/solutions/capital-one/logo.svg new file mode 100644 index 00000000..5c3fdda2 --- /dev/null +++ b/go.dev/testdata/golden/solutions/capital-one/logo.svg @@ -0,0 +1,2 @@ + +image/svg+xml diff --git a/go.dev/testdata/golden/solutions/chrome/index.html b/go.dev/testdata/golden/solutions/chrome/index.html new file mode 100644 index 00000000..c47b5ac5 --- /dev/null +++ b/go.dev/testdata/golden/solutions/chrome/index.html @@ -0,0 +1 @@ +https://go.dev/solutions/google/chrome/ diff --git a/go.dev/testdata/golden/solutions/clis/CLI-green.svg b/go.dev/testdata/golden/solutions/clis/CLI-green.svg new file mode 100644 index 00000000..01fed5b7 --- /dev/null +++ b/go.dev/testdata/golden/solutions/clis/CLI-green.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/clis/cli-white.svg b/go.dev/testdata/golden/solutions/clis/cli-white.svg new file mode 100644 index 00000000..a08127d7 --- /dev/null +++ b/go.dev/testdata/golden/solutions/clis/cli-white.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/clis/index.html b/go.dev/testdata/golden/solutions/clis/index.html new file mode 100644 index 00000000..cda49c85 --- /dev/null +++ b/go.dev/testdata/golden/solutions/clis/index.html @@ -0,0 +1,784 @@ + + + + + + + + + + + + + + + + + +Command-line Interfaces (CLIs) - go.dev + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    Command-line Interfaces (CLIs)

    + + + + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + + +

    Overview

    + +

    CLI developers prefer Go for portability, performance, and ease of creation

    + +

    Command line interfaces (CLIs), unlike graphical user interfaces (GUIs), are text-only. Cloud and infrastructure applications are primarily CLI-based due to their easy automation and remote capabilities.

    + +

    Key benefits

    + +

    Leverage fast compile times to build programs that start quickly and run on any system

    + +

    Developers of CLIs find Go to be ideal for designing their applications. Go compiles very quickly into a single binary, works across platforms with a consistent style, and brings a strong development community. From a single Windows or Mac laptop, developers can build a Go program for every one of the dozens of architectures and operating systems Go supports in a matter of seconds, no complicated build farms are needed. No other compiled language can be built as portably or quickly. Go applications are built into a single self contained binary making installing Go applications trivial.

    + +

    Specifically, programs written in Go run on any system without requiring any existing libraries, runtimes, or dependencies. And programs written in Go have an immediate startup time—similar to C or C++ but unobtainable with other programming languages.

    + +

    Use Case

    + +

    Use Go for building elegant CLIs

    + + +
    +

    + “I was tasked with building our CLI tool and found two really great projects, Cobra and Viper, which make building CLI’s easy. Individually they are very powerful, very flexible and very good at what they do. But together they will help you show your next CLI who is boss!” +

    +
    + — Steve Domino + ,  + senior engineer and architect at Strala +
    +
    + +
    + + + +
    +

    + “Cobra is a great product to write small tools or even large ones. It’s more of a framework than a library, because when you call the binary that would create a skeleton, then you would be adding code in between.”” +

    +
    + — Francesc Campoy + ,  + VP of product at DGraph Labs and producer of Just For Func videos +
    +
    + +
    + + +

    When developing CLIs in Go, two tools are widely used: Cobra & Viper.

    + +

    +Cobra is both a library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go. Cobra powers most of the popular Go applications including CoreOS, Delve, Docker, Dropbox, Git Lfs, Hugo, Kubernetes, and many more. With integrated command help, autocomplete and documentation “[it] makes documenting each command really simple,” says Alex Ellis, founder of OpenFaaS.

    + +

    +Viper is a complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats. Cobra and Viper are designed to work together.

    + +

    Viper supports nested structures in the configuration, allowing CLI developers to manage the configuration for multiple parts of a large application. Viper also provides all of the tooling need to easily build twelve factor apps.

    + +

    “If you don’t want to pollute your command line, or if you’re working with sensitive data which you don’t want to show up in the history, it’s a good idea to work with environment variables. To do this, you can use Viper,” suggests Geudens.

    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CustomerBrief introductionProjects using go
    + Comcast + + Comcast + Comcast uses Go for a CLI client used to publish and subscribe to it’s high-traffic sites. The company also supports an open source client library which is written in Go - designed for working with Apache Pulsar. + + +
    + GitHub + + GitHub + GitHub uses Go for a command-line tool that makes it easier to work with GitHub, wrapping git in order to extend it with extra features and commands. + + +
    + Hugo + + Hugo + Hugo is one of the most popular Go CLI applications powering thousands of sites, including this one. One reason for it’s popularity is it’s ease of install thanks to Go. Hugo author Bjørn Erik Pedersen writes “The single binary takes most of the pain out of installation and upgrades.” + + +
    + + + + + +
    + +

    Get Started

    + +

    Go books for creating CLIs

    + +

    + +

    + + + +
    + +
      + +
    • + spf13/cobra +

      A library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go

      +
    • + +
    • + spf13/viper +

      A complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats

      +
    • + +
    • + urfave/cli +

      A minimal framework for creating and organizing command line Go applications

      +
    • + +
    • + delve +

      A simple and powerful tool built for programmers used to using a source-level debugger in a compiled language

      +
    • + +
    • + chzyer/readline +

      A pure Golang implementation that provides most features in GNU Readline (under MIT license)

      +
    • + +
    • + dixonwille/wmenu +

      An easy-to-use menu structure for CLI applications that prompts users to make choices

      +
    • + +
    • + spf13/pflag +

      A drop-in replacement for Go’s flag package, implementing POSIX/GNU-style flags

      +
    • + +
    • + golang/glog +

      Leveled execution logs for Go

      +
    • + +
    • + go-prompt +

      A library for building powerful interactive prompts, making it easier to build cross-platform command line tools using Go.

      +
    • + +
    + View More +
    +

    + +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/cloud/cloud-green.svg b/go.dev/testdata/golden/solutions/cloud/cloud-green.svg new file mode 100644 index 00000000..b143a1db --- /dev/null +++ b/go.dev/testdata/golden/solutions/cloud/cloud-green.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/cloud/cloud-white.svg b/go.dev/testdata/golden/solutions/cloud/cloud-white.svg new file mode 100644 index 00000000..6dfc4f27 --- /dev/null +++ b/go.dev/testdata/golden/solutions/cloud/cloud-white.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/cloud/index.html b/go.dev/testdata/golden/solutions/cloud/index.html new file mode 100644 index 00000000..871adfb3 --- /dev/null +++ b/go.dev/testdata/golden/solutions/cloud/index.html @@ -0,0 +1,898 @@ + + + + + + + + + + + + + + + + + +Go for Cloud & Network Services - go.dev + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    Go for Cloud & Network Services

    + + + + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + + +

    Overview

    + + + +
    +

    Go helps enterprises build and scale cloud computing systems

    + +

    As applications and processing move to the cloud, concurrency becomes a very big issue. Cloud computing systems, by their very nature, share and scale resources. Coordinating access to shared resources is an issue that impacts every application processing in the cloud, and requires programming languages “explicitly geared to develop highly reliable concurrent applications.”

    + +
    + + +
    +

    + Go makes it very easy to scale as a company. This is very important because, as our engineering team grows, each service can be managed by a different unit. +

    + +
    + + +

    Key Benefits

    + +

    Address tradeoff between development cycle time and server performance

    + +

    Go was created to address exactly these concurrency needs for scaled applications, microservices, and cloud development. In fact, over 75 percent of projects in the Cloud Native Computing Foundation are written in Go.

    + +

    Go helps reduce the need to make this tradeoff, with its fast build times that enable iterative development, lower memory and CPU utilization. Servers built with Go experience instant start up times and are cheaper to run in pay-as-you-go and serverless deployments.

    + +

    Address challenges with the modern cloud, delivering standard idiomatic APIs

    + +

    Go addresses many challenges developers face with the modern cloud, delivering standard idiomatic APIs, and built in concurrency to take advantage of multicore processors. Go’s low-latency and “no knob” tuning make Go a great balance between performance and productivity - granting engineering teams the power to choose and the power to move.

    + +

    Use Case

    + +

    Use Go for Cloud Computing

    + +

    Go’s strengths shine when it comes to building services. Its speed and built-in support for concurrency results in fast and efficient services, while static typing, robust tooling, and emphasis on simplicity and readability help build reliable and maintainable code.

    + +

    Go has a strong ecosystem supporting service development. The standard library includes packages for common needs like HTTP servers and clients, JSON/XML parsing, SQL databases, and a range of security/encryption functionality, while the Go runtime includes tools for race detection, benchmarking/profiling, code generation, and static code analysis.

    + +

    The major Cloud providers (GCP, AWS, Azure) have Go APIs for their services, and popular open source libraries provide support for API tooling (Swagger), transport (protocol buffers, gRPC), monitoring (OpenCensus), Object-Relational Mapping (gORM), and authentication (JWT). The open source community has also provided several service frameworks, including Go Kit, Go Micro, and Gizmo, which can be a great way to get started quickly.

    + +

    Go tools for Cloud Computing

    + + + +
    + +
    + + Docker + Docker + + +

    + Docker is a platform-as-a-service that delivers software in containers. Containers bundle software, libraries, and config files, are hosted by a Docker Engine, and are run by a single operating-system kernel (utilizing less system resources than virtual machines). +

    + +

    + Cloud developers use Docker to manage their Go code and support multiple platforms, as Docker supports the development workflow and deployment process. +

    + +
    + +
    + + Kubernetes + Kubernetes + + +

    + Kubernetes is an open-source container-orchestration system, written in Go, for automating web app deployment. Web apps are often built using containers (as noted above) packaged with their dependencies and configurations. Kubernetes helps deploying and managing those containers at scale. Cloud programmers use Kubernetes to build, deliver, and scale containerized apps quickly—managing the growing complexity via APIs that controls how the containers will run. +

    + +
    + +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CustomerBrief introductionProjects using go
    + Google + + Google + Google Cloud uses Go across its ecosystem of products and tools, including Kubernetes, gVisor, Knative, Istio, and Anthos. Go is fully supported on Google Cloud across all APIs and runtimes. + + +
    + Capital One + + Capital One + Capital One uses Go to power the Credit Offers API, a critical service. The engineering team is also building their serverless architecture with Go, citing Go’s speed and simplicity, and mentioning that “[they] didn’t want to go serverless without Go.” + + +
    + Dropbox + + Dropbox + Dropbox was built on Python, but in 2013 decided to migrate their performance-critical packends to Go. Today, most of the company’s infrastructure is written in Go. + + +
    + + + + + +
    + +

    Get Started

    + +

    Go books for cloud computing

    + +

    + +

    + + + +
    + +
      + +
    • + Buffalo +

      A framework for rapid web development in Go, curating Go and JS libraries together.

      +
    • + +
    • + Echo +

      A high performance, extensible, and minimalist Go web framework

      +
    • + +
    • + Flamingo +

      A fast open-source framework based on Go with clean and scalable architecture

      +
    • + +
    • + Gin +

      A web framework written in Go, with a martini-like API.

      +
    • + +
    • + Gorilla +

      A web toolkit for the Go programming language.

      +
    • + +
    + View More +
    + +
    + +
      + +
    • + julienschmidt/httprouter +

      A lightweight high performance HTTP request router

      +
    • + +
    • + gorilla/mux +

      A powerful HTTP router and URL matcher for building Go web servers with 🦍

      +
    • + +
    • + Chi +

      A lightweight, idiomatic and composable router for building Go HTTP services.

      +
    • + +
    • + net/http +

      A standard library HTTP package

      +
    • + +
    + View More +
    + +
    + +
      + +
    • + html/template +

      A standard library HTML template engine

      +
    • + +
    • + flosch/pongo2 +

      A Django-syntax like templating-language

      +
    • + +
    + View More +
    + +
    + +
      + +
    • + database/sql +

      A standard library interface with driver support for MySQL, Postgres, Oracle, MS SQL, BigQuery and most SQL databases

      +
    • + +
    • + mongo-driver/mongo +

      The MongoDB supported driver for Go

      +
    • + +
    • + olivere/elastic +

      A Elasticsearch client for Go

      +
    • + +
    • + GORM +

      An ORM library for Go

      +
    • + +
    • + Bleve +

      Full-text search and indexing for Go

      +
    • + +
    • + CockroachDB +

      An evolution of the database—architected for the cloud to deliver resilient, consistent, distributed SQL at scale

      +
    • + +
    + View More +
    + +
    + + + View More +
    + +
    + +
      + +
    • + gopherjs +

      A compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers.

      +
    • + +
    + View More +
    +

    + +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/cloudflare/index.html b/go.dev/testdata/golden/solutions/cloudflare/index.html new file mode 100644 index 00000000..2b150274 --- /dev/null +++ b/go.dev/testdata/golden/solutions/cloudflare/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    + + +
    + +
    + Cloudflare +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Cloudflare +

    + About Cloudflare +

    + +

    Cloudflare speeds up and protects millions of websites, APIs, SaaS services, and other properties connected to the Internet. “Go is at the heart of CloudFlare’s services including handling compression for high-latency HTTP connections, our entire DNS infrastructure, SSL, load testing and more.”

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/cloudflare/logo.png b/go.dev/testdata/golden/solutions/cloudflare/logo.png new file mode 100644 index 00000000..90388fca Binary files /dev/null and b/go.dev/testdata/golden/solutions/cloudflare/logo.png differ diff --git a/go.dev/testdata/golden/solutions/cockroachlabs/index.html b/go.dev/testdata/golden/solutions/cockroachlabs/index.html new file mode 100644 index 00000000..9602fb39 --- /dev/null +++ b/go.dev/testdata/golden/solutions/cockroachlabs/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    + + +
    + +
    + Cockroach Labs +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Cockroach Labs +

    + About Cockroach Labs +

    + +

    Go’s performance benefits, garbage collection, and low barrier to entry made it a great fit for CockroachDB.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/cockroachlabs/logo.png b/go.dev/testdata/golden/solutions/cockroachlabs/logo.png new file mode 100644 index 00000000..98ec96aa Binary files /dev/null and b/go.dev/testdata/golden/solutions/cockroachlabs/logo.png differ diff --git a/go.dev/testdata/golden/solutions/coredata/index.html b/go.dev/testdata/golden/solutions/coredata/index.html new file mode 100644 index 00000000..9ada6414 --- /dev/null +++ b/go.dev/testdata/golden/solutions/coredata/index.html @@ -0,0 +1 @@ +https://go.dev/solutions/google/coredata/ diff --git a/go.dev/testdata/golden/solutions/curve/index.html b/go.dev/testdata/golden/solutions/curve/index.html new file mode 100644 index 00000000..62656ef3 --- /dev/null +++ b/go.dev/testdata/golden/solutions/curve/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    + + +
    + +
    + Curve +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Curve +

    + About Curve +

    + +

    Curve shares how Go’s efficiency, standard library, and thriving community help them move banking to the cloud.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/curve/logo.png b/go.dev/testdata/golden/solutions/curve/logo.png new file mode 100644 index 00000000..194f220d Binary files /dev/null and b/go.dev/testdata/golden/solutions/curve/logo.png differ diff --git a/go.dev/testdata/golden/solutions/devops/index.html b/go.dev/testdata/golden/solutions/devops/index.html new file mode 100644 index 00000000..45377af5 --- /dev/null +++ b/go.dev/testdata/golden/solutions/devops/index.html @@ -0,0 +1,796 @@ + + + + + + + + + + + + + + + + + +Development Operations & Site reliability Engineering - go.dev + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    Development Operations & Site reliability Engineering

    + + + + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + + +

    Overview

    + +

    Go helps enterprises automate and scale

    + +

    Development Operations (DevOps) teams help engineering organizations automate tasks and improve their continuous +integration and continuous delivery and deployment (CI/CD) process. DevOps can topple developmental silos and implement +tooling and automation to enhance software development, deployment, and support.

    + +

    Site Reliability Engineering (SRE) was born at Google to make the company’s “large-scale sites more reliable, efficient, +and scalable,” writes Silvia Fressard, an +independent DevOps consultant. “And the practices they developed responded so well to Google’s needs that other big tech +companies, such as Amazon and Netflix, also adopted them.” SRE requires a mix of development and operations skills, and +“empowers software developers to own the ongoing daily operation +of their applications in production.”

    + +

    Go serves both siblings, DevOps and SRE, from its fast build times and lean syntax to its security and reliability support. Go’s concurrency and networking features also make it ideal for tools that manage cloud deployment—readily supporting automation while +scaling for speed and code maintainability as development infrastructure grows over time.

    + +

    DevOps/SRE teams write software ranging from small scripts, to command-line interfaces (CLI), to complex automation and services, and Go’s feature set has benefits for every situation.

    + +

    Key Benefits

    + +

    Easily build small scripts with Go’s robust standard library and static typing

    + +

    Go’s fast build and startup times. Go’s extensive standard library—including packages for +common needs like HTTP, file I/O, time, regular expressions, exec, and JSON/CSV formats—lets DevOps/SREs get right into their business logic. Plus, Go’s static type system and explicit error handling make even small scripts more robust.

    + +

    Quickly deploy CLIs with Go’s fast build times

    + +

    Every site reliability engineer has written “one-time use” scripts that turned into CLIs used by dozens of other engineers every day. And small deployment automation scripts turn into rollout management services. With Go, DevOps/SREs are in a great position to be successful when software scope inevitably creeps. Starting with Go puts you in a great position to be successful when that happens.

    + +

    Scale and maintain larger applications with Go’s low memory footprint and doc generator

    + +

    Go’s garbage collector means DevOps/SRE teams don’t have to worry about memory management. And Go’s automatic documentation generator (godoc) makes code self-documenting–lowering maintenance overhead and establishing best practices from the get-go.

    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CustomerBrief introductionProjects using go
    + Docker + + Docker + Docker is a software-as-a-service (SaaS) product, written in Go, that DevOps/SRE teams leverage to “drive secure automation and deployment at massive scale,” supporting their CI/CD efforts. + + +
    + Drone + + Drone + Drone is a Continuous Delivery system built on container technology, written in Go, that uses a simple YAML configuration file, a superset of docker-compose, to define and execute Pipelines inside Docker containers. + + +
    + etcd + + etcd + etcd is a strongly consistent, distributed key-value store that provides a reliable way to store data that needs to be accessed by a distributed system or cluster of machines, and it's written in Go. + + +
    + + + + + +
    + +

    Get Started

    + +

    Go books on DevOps & SRE

    + +

    + +

    + + + +
    + + + View More +
    + +
    + +
      + +
    • + spf13/cobra +

      A library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go

      +
    • + +
    • + spf13/viper +

      A complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats

      +
    • + +
    • + urfave/cli +

      A minimal framework for creating and organizing command line Go applications

      +
    • + +
    + View More +
    + +
    + + + View More +
    +

    + +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/devops/ops-green.svg b/go.dev/testdata/golden/solutions/devops/ops-green.svg new file mode 100644 index 00000000..d84348eb --- /dev/null +++ b/go.dev/testdata/golden/solutions/devops/ops-green.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/devops/ops-white.svg b/go.dev/testdata/golden/solutions/devops/ops-white.svg new file mode 100644 index 00000000..c98d8737 --- /dev/null +++ b/go.dev/testdata/golden/solutions/devops/ops-white.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/dropbox/index.html b/go.dev/testdata/golden/solutions/dropbox/index.html new file mode 100644 index 00000000..a0a07f86 --- /dev/null +++ b/go.dev/testdata/golden/solutions/dropbox/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + +Dropbox - Open sourcing our Go libraries - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    Dropbox - Open sourcing our Go libraries

    + + +
    + +
    + Dropbox +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Dropbox +

    + About Dropbox +

    + +

    About a year ago, we decided to migrate our performance-critical backends from Python to Go to leverage better concurrency support and faster execution speed. … At this point, we have successfully moved major parts of our infrastructure to Go.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/dropbox/logo.svg b/go.dev/testdata/golden/solutions/dropbox/logo.svg new file mode 100644 index 00000000..f129a229 --- /dev/null +++ b/go.dev/testdata/golden/solutions/dropbox/logo.svg @@ -0,0 +1,9 @@ + + + + diff --git a/go.dev/testdata/golden/solutions/facebook/index.html b/go.dev/testdata/golden/solutions/facebook/index.html new file mode 100644 index 00000000..7e7062b5 --- /dev/null +++ b/go.dev/testdata/golden/solutions/facebook/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    + + +
    + +
    + Facebook +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Facebook +

    + About Facebook +

    + +

    Learn about a Facebook engineering team’s decision to write a new entity framework (ORM) in Go.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/firebase/index.html b/go.dev/testdata/golden/solutions/firebase/index.html new file mode 100644 index 00000000..c6f0e52b --- /dev/null +++ b/go.dev/testdata/golden/solutions/firebase/index.html @@ -0,0 +1 @@ +https://go.dev/solutions/google/firebase/ diff --git a/go.dev/testdata/golden/solutions/google/chrome/index.html b/go.dev/testdata/golden/solutions/google/chrome/index.html new file mode 100644 index 00000000..b4cfd626 --- /dev/null +++ b/go.dev/testdata/golden/solutions/google/chrome/index.html @@ -0,0 +1,459 @@ + + + + + + + + + + + + + + + + + +Chrome Content Optimization Service Runs on Go - go.dev + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    Chrome Content Optimization Service Runs on Go

    + + +
    + +
    + Chrome +
    + +
    +
    + +
    +
    + +
    +
    +

    When the product Chrome comes to mind, you probably think solely of the +user-installed browser. But behind the scenes, Chrome has an extensive fleet of +backends. Among these is the Chrome Optimization Guide service. This service +forms an important basis for Chrome’s user experience strategy, operating in the +critical path for users, and is implemented in Go.

    + +

    The Chrome Optimization Guide service is designed to bring the power of Google +to Chrome by providing hints to the installed browser about what optimizations +may be performed on a page load, as well as when they can be applied most +effectively. It comprises a conjunction of real-time servers and batch logs +analysis.

    + +

    All Lite mode users of Chrome receive data via the service through the following +mechanisms: a data blob push that provides hints for well-known sites in their +geography, a check-in to Google servers to retrieve hints for hosts that the +specific user visits often, and on demand for page loads for which a hint is not +already on the device. Were the Chrome Optimization Guide service to suddenly +disappear, users might notice a dramatic change in the speed of their page loads +and the amount of data consumed while browsing the web.

    + +
    +

    + “Given that Go was a success for us, we plan to continue to use +it where appropriate” +

    +
    + — Sophie Chang + ,  + Software Engineer +
    +
    + + +

    When the Chrome engineering team started building the service, only a few +members had comfort with Go. Most of the team was more familiar with C++, but +they found the complex boilerplate required to stand up a C++ server to be too +much. The team shared that “[they] were pretty motivated to learn Go due to its +simplicity, fast ramp-up, and ecosystem.” and that “[their] sense of adventure +was rewarded.” Millions of users rely on this service to make their Chrome +experience better, and choosing Go was no small decision. After their experience +so far, the team also shared that “given that Go was a success for us, we plan +to continue to use it where appropriate.”

    + +

    In addition to the Chrome Optimization Guide team, engineering teams across +Google have adopted Go in their development process. Read about how the Core +Data Solutions and Firebase +Hosting teams use Go to build fast, reliable, +and efficient software at scale.

    + +

    Editorial note: The Go team would like to thank Sophie Chang for her +contributions to this story.

    + +
    +
    +
    + + Chrome +

    + About Chrome +

    + +

    Google Chrome is a more simple, secure, and faster web browser than ever, +with Google’s smarts built-in.

    + +

    In this case study, the Chrome Optimization Guide +team shared how they experimented with Go, ramped up quickly, and their plans to +use Go going forward.

    +

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/google/coredata/index.html b/go.dev/testdata/golden/solutions/google/coredata/index.html new file mode 100644 index 00000000..86b3dc3f --- /dev/null +++ b/go.dev/testdata/golden/solutions/google/coredata/index.html @@ -0,0 +1,487 @@ + + + + + + + + + + + + + + + + + +How Google's Core Data Solutions Team Uses Go - go.dev + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    How Google's Core Data Solutions Team Uses Go

    + + + + +
    + +
    + Core Data +
    + +
    +
    + +
    +
    + +
    +
    +

    Google’s mission is “to organize the world’s information and make it universally +accessible and useful.” One of the teams responsible for organizing that +information is Google’s Core Data Solutions team. The team, among other things, +maintains services to index web pages across the globe. These web indexing +services help support products like Google Search by keeping search results +updated and comprehensive, and they’re written in Go.

    + +

    In 2015, to keep up with Google’s scale, our team needed to rewrite our indexing +stack from a single monolithic binary written in C++ to multiple components in a +microservices architecture. We decided to rewrite many indexing services in Go, +which we now use to power the majority of our architecture.

    + +
    +

    + “Go’s built-in concurrency is a natural fit because engineers on the team are +encouraged to use concurrency and parallel algorithms.” +

    +
    + — Minjae Hwang + ,  + Software Engineer +
    +
    + + +

    When choosing a language, our team found that several of Go’s features made it +particularly suitable. For instance, Go’s built-in concurrency is a natural fit +because engineers on the team are encouraged to use concurrency and parallel +algorithms. Engineers have also found that “Go code is more natural,” allowing +them to spend their time focusing on business logic and analysis rather than on +managing memory and optimizing performance.

    + +

    Writing code is much simpler when writing in Go, as it helps lessen cognitive +burden during the development process. For example, when working with C++, +sophisticated IDEs might, “show that the source code has no compile error when +there actually is one” whereas “in Go, [the code] will always compile when [the +IDE] says the code has no compile error,” said MinJae Hwang, a software engineer +on the Core Data Solutions team. Reducing small friction points along the +development process, such as shortening the cycle of fixing compile errors, +helped our team ship faster during the original rewrite, and has helped keep our +maintenance costs low.

    + +

    “When I’m in C++ and I want to use more packages, I have to write pieces such as +headers. When I’m writing in Go, built-in tools allow me to use packages more +easily. My development velocity is much faster,” Hwang also shared.

    + +

    With simple language syntax and support of Go tools, several members of our team +find it much easier to write in Go code. We’ve also found that Go does a really +good job of static type checking and that certain Go fundamentals, such as the +godoc command, have helped the team build a more disciplined culture around +writing documentation.

    + +
    +

    + “…Google’s web indexing was re-architected within a year. More impressively, +most developers on the team were rewriting in Go while also learning it.” +

    +
    + — Prasanna Meda + ,  + Software Engineer +
    +
    + + +

    Working on a product used so heavily around the world is no small task and our +team’s decision to use Go wasn’t a simple one, but doing so helped us move +faster. As a result, Google’s web indexing was re-architected within a year. +More impressively, most developers on the team were rewriting in Go while also +learning it.

    + +

    In addition to the Core Data Solutions team, engineering teams across Google +have adopted Go in their development process. Read about how the +Chrome and Firebase +Hosting teams use Go to build fast, reliable, and +efficient software at scale.

    + +
    +
    +
    + + Core Data +

    + About Core Data +

    + +

    Google is a technology company whose mission is to organize the world’s +information and make it universally accessible and useful.

    + +

    In this case study, Google’s Core Data Solutions team shares their journey +with Go, including their decision to rewrite web indexing services in Go, +taking advantage of Go’s built-in concurrency, and observing how Go helps to +improve the development process.

    +

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/google/firebase/index.html b/go.dev/testdata/golden/solutions/google/firebase/index.html new file mode 100644 index 00000000..aefbc053 --- /dev/null +++ b/go.dev/testdata/golden/solutions/google/firebase/index.html @@ -0,0 +1,474 @@ + + + + + + + + + + + + + + + + + +How the Firebase Hosting Team Scaled With Go - go.dev + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    How the Firebase Hosting Team Scaled With Go

    + + +
    + +
    + Firebase +
    + +
    +
    + +
    +
    + +
    +
    +

    The Firebase Hosting team provides static web hosting services for Google Cloud +customers. They provide a static web host that sits behind a global content +delivery network, and offer users tools that are easy to use. The team also +develops features that range from uploading site files to registering domains to +tracking usage.

    + +

    Before joining Google, Firebase Hosting’s tech stack was written in Node.js. The +team started to use Go when they needed to interoperate with several other +Google services. They decided to use Go to help them scale easily and +efficiently, knowing that “concurrency would continue to be a big need.” They +“were confident Go would be more performant,” and “liked that Go is more terse” +than other languages they were considering, said Michael Bleigh, a software +engineer on the team.

    + +

    Starting with one small service written in Go, the team migrated their entire +backend in a series of moves. The team progressively identified large features +they wanted to implement and, in the process, rewrote them in Go and moved to +Google Cloud and Google’s internal cluster management system. Now the Firebase +Hosting team has replaced 100% of backend Node.js code with Go.

    + +

    The team’s experience writing in Go began with one engineer. “Through +peer-to-peer learning and Go being generally easy to get started with, everyone +on the team now has Go dev experience,” said Bleigh. They’ve found that while a +majority of people who are new to the team haven’t had any experience with Go, +“most of them are productive within a couple weeks.”

    + +

    “Using Go, it’s easy to see how the code is organized and what the code does,” +said Bleigh, speaking for the team. “Go is generally very readable and +understandable. The language’s error handling, receivers, and interfaces are all +easy to understand due to the idioms in the language.”

    + +

    Concurrency continues to be a focus for the team as they scale. Robert Rossney, +a software engineer, shared that “Go makes it very easy to put all of the hard +concurrency stuff in one place, and everywhere else it’s abstracted.” Rossney +also spoke to the benefits of using a language built with concurrency in mind, +saying that “there are also a lot of ways to do concurrency in Go. We’ve had to +learn when each route is best, how to determine when a problem is a concurrency +problem, how to debug–but that comes out of the fact that you actually can write +these patterns in Go code.”

    + +
    +

    + “Generally speaking, there’s not a time on the team where we’re feeling +frustrated with Go, it just kind of gets out of the way and lets you do work.” +

    +
    + — Robert Rossney + ,  + Software Engineer +
    +
    + + +

    Hundreds of thousands of customers host their websites with Firebase Hosting, +which means Go code is used to serve billions of requests per day. “Our customer +base and traffic have doubled multiple times since migrating to Go without ever +requiring fine-tuned optimizations” shared Bleigh. With Go, the team has seen +performance improvements both in the software and on the team, with excellent +productivity gains. “Generally speaking,” Rossney mentioned, “…there’s not a +time on the team where we’re feeling frustrated with Go, it just kind of gets +out of the way and lets you do work.”

    + +

    In addition to the Firebase Hosting team, engineering teams across Google have +adopted Go in their development process. Read about how the Core Data +Solutions and Chrome +teams use Go to build fast, reliable, and efficient software at scale.

    + +
    +
    +
    + + Firebase +

    + About Firebase +

    + +

    Firebase is Google’s mobile platform that helps you quickly develop high-quality +apps and grow your business.

    + +

    The Firebase Hosting team shared their journey with Go, including their +backend migration from Node.js, the ease of onboarding new Go developers, and +how Go has helped them scale.

    +

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/google/index.html b/go.dev/testdata/golden/solutions/google/index.html new file mode 100644 index 00000000..c019cc94 --- /dev/null +++ b/go.dev/testdata/golden/solutions/google/index.html @@ -0,0 +1,462 @@ + + + + + + + + + + + + + + + + + +Using Go at Google - go.dev + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    Using Go at Google

    + + + + +
    + +
    + Google +
    + +
    +
    + +
    +
    + +
    +
    + + +
    +
    + Quotation mark. +
    +

    +

    Go started in September 2007 when Robert Griesemer, Ken Thompson, and I began +discussing a new language to address the engineering challenges we and our +colleagues at Google were facing in our daily work.

    + +

    When we first released Go to the public in November 2009, we didn’t know if the +language would be widely adopted or if it might influence future languages. +Looking back from 2020, Go has succeeded in both ways: it is widely used both +inside and outside Google, and its approaches to network concurrency and +software engineering have had a noticeable effect on other languages and their +tools.

    + +

    Go has turned out to have a much broader reach than we had ever expected. Its +growth in the industry has been phenomenal, and it has powered many projects at +Google.

    + +

    +
    + + — Rob Pike +
    +
    + +

    The following stories are a small sample of the many ways that Go is used at Google.

    + +

    How Google’s Core Data Solutions Team Uses Go

    + +

    Google’s mission is “to organize the world’s information and make it universally +accessible and useful.” One of the teams responsible for organizing that +information is Google’s Core Data Solutions team. The team, among other things, +maintains services to index web pages across the globe. These web indexing +services help support products like Google Search by keeping search results +updated and comprehensive, and they’re written in Go.

    + +

    Learn more

    + +
    + +

    Chrome Content Optimization Service Runs on Go

    + +

    When the product Chrome comes to mind, you probably think solely of the user-installed browser. But behind the scenes, Chrome has an extensive fleet of backends. Among these is the Chrome Optimization Guide service. This service forms an important basis for Chrome’s user experience strategy, operating in the critical path for users, and is implemented in Go.

    + +

    Learn more

    + +
    + +

    How the Firebase Hosting Team Scaled With Go

    + +

    The Firebase Hosting team provides static web hosting services for Google Cloud customers. They provide a static web host that sits behind a global content delivery network, and offer users tools that are easy to use. The team also develops features that range from uploading site files to registering domains to tracking usage.

    + +

    Learn more

    + +
    + +

    Actuating Google Production: How Google’s Site Reliability Engineering Team Uses Go

    + +

    Google runs a small number of very large services. Those services are powered by a global infrastructure covering everything one needs: storage systems, load balancers, network, logging, monitoring, and many more. Nevertheless, it is not a static system - it cannot be. Architecture evolves, new products and ideas are created, new versions must be rolled out, configs pushed, database schema updated, and more. We end up deploying changes to our systems dozens of times per second.

    + +

    Learn more

    + +
    +
    +
    + + Google +

    + About Google +

    + +

    Google is a technology company whose mission is to organize the world’s +information and make it universally accessible and useful.

    + +

    Go was created at Google in 2007 to improve programming productivity in an +era of multi-core networked machines and large codebases. Today, over 10 +years since its public announcement in 2009, Go’s use inside Google has grown +tremendously.

    +

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/google/index.xml b/go.dev/testdata/golden/solutions/google/index.xml new file mode 100644 index 00000000..67cfd778 --- /dev/null +++ b/go.dev/testdata/golden/solutions/google/index.xml @@ -0,0 +1,54 @@ + + + + Using Go at Google on go.dev + https://go.dev/solutions/google/ + Recent content in Using Go at Google on go.dev + Hugo -- gohugo.io + en + Thu, 27 Aug 2020 00:00:00 +0000 + + + + + + Actuating Google Production: How Google’s Site Reliability Engineering Team Uses Go + https://go.dev/solutions/google/sitereliability/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/google/sitereliability/ + Google runs a small number of very large services. Those services are powered by a global infrastructure covering everything a developer needs: storage systems, load balancers, network, logging, monitoring, and much more. Nevertheless, it is not a static system—it cannot be. Architecture evolves, new products and ideas are created, new versions must be rolled out, configs pushed, database schema updated, and more. We end up deploying changes to our systems dozens of times per second. + + + + Chrome Content Optimization Service Runs on Go + https://go.dev/solutions/google/chrome/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/google/chrome/ + When the product Chrome comes to mind, you probably think solely of the user-installed browser. But behind the scenes, Chrome has an extensive fleet of backends. Among these is the Chrome Optimization Guide service. This service forms an important basis for Chrome&rsquo;s user experience strategy, operating in the critical path for users, and is implemented in Go. +The Chrome Optimization Guide service is designed to bring the power of Google to Chrome by providing hints to the installed browser about what optimizations may be performed on a page load, as well as when they can be applied most effectively. + + + + How Google's Core Data Solutions Team Uses Go + https://go.dev/solutions/google/coredata/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/google/coredata/ + Google&rsquo;s mission is “to organize the world&rsquo;s information and make it universally accessible and useful.” One of the teams responsible for organizing that information is Google’s Core Data Solutions team. The team, among other things, maintains services to index web pages across the globe. These web indexing services help support products like Google Search by keeping search results updated and comprehensive, and they’re written in Go. +In 2015, to keep up with Google’s scale, our team needed to rewrite our indexing stack from a single monolithic binary written in C++ to multiple components in a microservices architecture. + + + + How the Firebase Hosting Team Scaled With Go + https://go.dev/solutions/google/firebase/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/google/firebase/ + The Firebase Hosting team provides static web hosting services for Google Cloud customers. They provide a static web host that sits behind a global content delivery network, and offer users tools that are easy to use. The team also develops features that range from uploading site files to registering domains to tracking usage. +Before joining Google, Firebase Hosting’s tech stack was written in Node.js. The team started to use Go when they needed to interoperate with several other Google services. + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/google/sitereliability/index.html b/go.dev/testdata/golden/solutions/google/sitereliability/index.html new file mode 100644 index 00000000..0fea3bb8 --- /dev/null +++ b/go.dev/testdata/golden/solutions/google/sitereliability/index.html @@ -0,0 +1,510 @@ + + + + + + + + + + + + + + + + + +Actuating Google Production: How Google’s Site Reliability Engineering Team Uses Go - go.dev + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    Actuating Google Production: How Google’s Site Reliability Engineering Team Uses Go

    + + + + +
    + +
    + Google Site Reliability Engineering (SRE) +
    + +
    +
    + +
    +
    + +
    +
    +

    Google runs a small number of very large services. Those services are powered +by a global infrastructure covering everything a developer needs: storage +systems, load balancers, network, logging, monitoring, and much more. +Nevertheless, it is not a static system—it cannot be. Architecture evolves, +new products and ideas are created, new versions must be rolled out, configs +pushed, database schema updated, and more. We end up deploying changes to our +systems dozens of times per second.

    + +

    Because of this scale and critical need for reliability, Google pioneered Site +Reliability Engineering (SRE), a role that many other companies have since adopted. +“SRE is what you get when you treat operations as if it’s a software problem. +Our mission is to protect, provide for, and progress the software and systems +behind all of Google’s public services with an ever-watchful eye on their +availability, latency, performance, and capacity.” +- Site Reliability Engineering (SRE).

    + +
    +

    + “Go promised a sweet spot between performance and readability that neither of +the other languages [Python and C++] were able to offer.” +

    +
    + + +

    In 2013-2014, Google’s SRE team realized that our approach to production +management was not cutting it anymore in many ways. We had advanced far beyond +shell scripts, but our scale had so many moving pieces and complexities that a +new approach was needed. We determined that we needed to move toward a +declarative model of our production, called “Prodspec”, driving a dedicated +control plane, called “Annealing”.

    + +

    When we started those projects, Go was just becoming a viable option for +critical services at Google. Most engineers were more familiar with Python +and C++, either of which would have been valid choices. Nevertheless, Go +captured our interest. The appeal of novelty was certainly a factor of +course. But, more importantly, Go promised a sweet spot between performance +and readability that neither of the other languages were able to offer. We +started a small experiment with Go for some initial parts of Annealing and +Prodspec. As the projects progressed, those initial parts written in Go found +themselves at the core. We were happy with Go—its simplicity grew on us, the +performance was there, and concurrency primitives would have been hard to +replace.

    + +
    +

    + “Now the majority of Google production is managed and maintained by our systems +written in Go.” +

    +
    + + +

    At no point was there ever a mandate or requirement to use Go, but we had no +desire to return to Python or C++. Go grew organically in Annealing and +Prodspec. It was the right choice, and thus is now our language of choice. +Now the majority of Google production is managed and maintained by our systems +written in Go.

    + +

    The power of having a simple language in those projects is hard to overstate. +There have been cases where some feature was indeed missing, such as the +ability to enforce in the code that some complex structure should not be +mutated. But for each one of those cases, there have undoubtedly been tens or +hundred of cases where the simplicity helped.

    + +
    +

    + “Go’s simplicity means that the code is easy to follow, whether it is to spot +bugs during review or when trying to determine exactly what happened during a +service disruption.” +

    +
    + + +

    For example, Annealing impacts a wide variety of teams and services meaning +that we relied heavily on contributions across the company. The simplicity of +Go made it possible for people outside our team to see why some part or another +was not working for them, and often provide fixes or features themselves. This +allowed us to quickly grow.

    + +

    Prodspec and Annealing are in charge of some quite critical components. Go’s +simplicity means that the code is easy to follow, whether it is to spot bugs +during review or when trying to determine exactly what happened during a +service disruption.

    + +

    Go performance and concurrency support have also been key for our work. As our +model of production is declarative, we tend to manipulate a lot of structured +data, which describes what production is and what it should be. We have large +services so the data can grow large, often making purely sequential processing +not efficient enough.

    + +

    We are manipulating this data in many ways and many places. It is not a matter +of having a smart person come up with a parallel version of our algorithm. It +is a matter of casual parallelism, finding the next bottleneck and +parallelising that code section. And Go enables exactly that.

    + +

    As a result of our success with Go, we now use Go for every new development for +Prodspec and Annealing.

    + +

    In addition to the Site Reliability Engineering team, engineering teams across +Google have adopted Go in their development process. Read about how the +Core Data Solutions, +Firebase Hosting, and +Chrome teams use Go to build fast, reliable, +and efficient software at scale.

    + +
    +
    +
    + + Google Site Reliability Engineering (SRE) +

    + About Google Site Reliability Engineering (SRE) +

    + +

    Google’s Site Reliability Engineering team has a mission to protect, provide for, and progress the software and systems behind all of Google’s public services — Google Search, Ads, Gmail, Android, YouTube, and App Engine, to name just a few — with an ever-watchful eye on their availability, latency, performance, and capacity.

    + +

    They shared their experience building core production management systems with Go, coming from experience with Python and C++.

    +

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/grail/index.html b/go.dev/testdata/golden/solutions/grail/index.html new file mode 100644 index 00000000..296b820b --- /dev/null +++ b/go.dev/testdata/golden/solutions/grail/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    + + +
    + +
    + GRAIL +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + GRAIL +

    + About GRAIL +

    + +

    At GRAIL, we use the Go programming language for most of our bioinformatics, data processing, and machine learning tasks. Go’s simplicity makes it easy for newcomers to learn; its transparent runtime semantics makes it easy to reason about performance; and its ability to control data layout and allocation makes it possible to write highly performant data processing code.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/grail/logo.png b/go.dev/testdata/golden/solutions/grail/logo.png new file mode 100644 index 00000000..2dd9c59e Binary files /dev/null and b/go.dev/testdata/golden/solutions/grail/logo.png differ diff --git a/go.dev/testdata/golden/solutions/index.html b/go.dev/testdata/golden/solutions/index.html new file mode 100644 index 00000000..3e22483b --- /dev/null +++ b/go.dev/testdata/golden/solutions/index.html @@ -0,0 +1,1166 @@ + + + + + + + + + + + + + + + + + +Why Go - go.dev + + + + + + + + +
    +
    + +
    +
    +
    +
    + + +
    +
    + + + +
    +
    + +
    + + + diff --git a/go.dev/testdata/golden/solutions/index.xml b/go.dev/testdata/golden/solutions/index.xml new file mode 100644 index 00000000..fbfccfa7 --- /dev/null +++ b/go.dev/testdata/golden/solutions/index.xml @@ -0,0 +1,236 @@ + + + + Why Go on go.dev + https://go.dev/solutions/ + Recent content in Why Go on go.dev + Hugo -- gohugo.io + en + Mon, 01 Jun 2020 00:00:00 +0000 + + + + + + PayPal Taps Go to Modernize and Scale + https://go.dev/solutions/paypal/ + Mon, 01 Jun 2020 00:00:00 +0000 + + https://go.dev/solutions/paypal/ + Since our NoSQL and DB proxy used quite a bit of system details in a multi-threaded mode, the code got complex managing the different conditions, given that Go provides channels and routines to deal with complexity, we were able to structure the code to meet our requirements. &mdash; Bala Natarajan ,&nbsp; Sr. Director of Engineering,&nbsp;Developer Experience &nbsp;at PayPal New code infrastructure built on Go PayPal was created to democratize financial services and empower people and businesses to join and thrive in the global economy. + + + + American Express Uses Go for Payments & Rewards + https://go.dev/solutions/americanexpress/ + Thu, 19 Dec 2019 00:00:00 +0000 + + https://go.dev/solutions/americanexpress/ + What makes Go different from other programming languages is cognitive load. You can do more with less code, which makes it easier to reason about and understand the code that you do end up writing. +The majority of Go code ends up looking quite similar, so, even if you’re working with a completely new codebase, you can get up and running pretty quickly. + &mdash; Glen Balliet ,&nbsp; Engineering Director of loyalty platforms &nbsp;at American Express Go Improves Microservices and Speeds Productivity Founded in 1850, American Express is a globally integrated payments company offering charge and credit card products, merchant acquisition and processing services, network services, and travel-related services. + + + + MercadoLibre Grows with Go + https://go.dev/solutions/mercadolibre/ + Sun, 10 Nov 2019 16:26:31 -0400 + + https://go.dev/solutions/mercadolibre/ + I think that the tour of Go is by far the best introduction to a language that I’ve seen, It’s really simple and it gives you a fair overview of probably 80 percent of the language. When we want to get developers to learn Go, and to get to production fast, we tell them to start with the tour of Go. &mdash; Eric Kohan ,&nbsp; Software Engineering Manager &nbsp;at MercadoLibre Go helps integrated ecosystem attract developers and scale eCommerce MercadoLibre, Inc. + + + + Go for Cloud & Network Services + https://go.dev/solutions/cloud/ + Fri, 04 Oct 2019 15:26:31 -0400 + + https://go.dev/solutions/cloud/ + Overview Go helps enterprises build and scale cloud computing systems As applications and processing move to the cloud, concurrency becomes a very big issue. Cloud computing systems, by their very nature, share and scale resources. Coordinating access to shared resources is an issue that impacts every application processing in the cloud, and requires programming languages “explicitly geared to develop highly reliable concurrent applications.” + Go makes it very easy to scale as a company. + + + + Command-line Interfaces (CLIs) + https://go.dev/solutions/clis/ + Fri, 04 Oct 2019 15:26:31 -0400 + + https://go.dev/solutions/clis/ + Overview CLI developers prefer Go for portability, performance, and ease of creation Command line interfaces (CLIs), unlike graphical user interfaces (GUIs), are text-only. Cloud and infrastructure applications are primarily CLI-based due to their easy automation and remote capabilities. +Key benefits Leverage fast compile times to build programs that start quickly and run on any system Developers of CLIs find Go to be ideal for designing their applications. Go compiles very quickly into a single binary, works across platforms with a consistent style, and brings a strong development community. + + + + Go for Web Development + https://go.dev/solutions/webdev/ + Fri, 04 Oct 2019 15:26:31 -0400 + + https://go.dev/solutions/webdev/ + Overview Go delivers speed, security, and developer-friendly tools for Web Applications Go is designed to enable developers to rapidly develop scalable and secure web applications. Go ships with an easy to use, secure and performant web server and includes it own web templating library. Go has excellent support for all of the latest technologies from HTTP/2, to databases like MySQL, MongoDB and ElasticSearch, to the latest encryption standards including TLS 1. + + + + Development Operations & Site reliability Engineering + https://go.dev/solutions/devops/ + Thu, 03 Oct 2019 17:16:43 -0400 + + https://go.dev/solutions/devops/ + Overview Go helps enterprises automate and scale Development Operations (DevOps) teams help engineering organizations automate tasks and improve their continuous integration and continuous delivery and deployment (CI/CD) process. DevOps can topple developmental silos and implement tooling and automation to enhance software development, deployment, and support. +Site Reliability Engineering (SRE) was born at Google to make the company’s “large-scale sites more reliable, efficient, and scalable,”writes Silvia Fressard, an independent DevOps consultant. + + + + + https://go.dev/solutions/grail/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/grail/ + + + + + + https://go.dev/solutions/capital-one/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/capital-one/ + + + + + + https://go.dev/solutions/cockroachlabs/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/cockroachlabs/ + + + + + Dropbox - Open sourcing our Go libraries + https://go.dev/solutions/dropbox/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/dropbox/ + + + + + + https://go.dev/solutions/cloudflare/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/cloudflare/ + + + + + + https://go.dev/solutions/armut/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/armut/ + + + + + + https://go.dev/solutions/curve/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/curve/ + + + + + + https://go.dev/solutions/facebook/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/facebook/ + + + + + + https://go.dev/solutions/microsoft/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/microsoft/ + + + + + + https://go.dev/solutions/wildlifestudios/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/wildlifestudios/ + + + + + + https://go.dev/solutions/netflix/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/netflix/ + + + + + + https://go.dev/solutions/riotgames/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/riotgames/ + + + + + + https://go.dev/solutions/salesforce/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/salesforce/ + + + + + + https://go.dev/solutions/target/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/target/ + + + + + + https://go.dev/solutions/twitch/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/twitch/ + + + + + Twitter - 5 billion sessions a day in realtime + https://go.dev/solutions/twitter/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/twitter/ + + + + + Uber - GPU-power analytics engine in Go + https://go.dev/solutions/uber/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://go.dev/solutions/uber/ + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/mercadolibre/index.html b/go.dev/testdata/golden/solutions/mercadolibre/index.html new file mode 100644 index 00000000..b415bde9 --- /dev/null +++ b/go.dev/testdata/golden/solutions/mercadolibre/index.html @@ -0,0 +1,571 @@ + + + + + + + + + + + + + + + + + +MercadoLibre Grows with Go - go.dev + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    MercadoLibre Grows with Go

    + + + + +
    + +
    + MercadoLibre +
    + +
    +
    + +
    +
    + +
    +
    + + +
    +
    + Quotation mark. +
    +

    + I think that the tour of Go is by far the best introduction to a language that I’ve seen, It’s really simple and it gives you a fair overview of probably 80 percent of the language. When we want to get developers to learn Go, and to get to production fast, we tell them to start with the tour of Go. +

    +
    + + — Eric Kohan + ,  + Software Engineering Manager +  at MercadoLibre +
    +
    + +

    Go helps integrated ecosystem attract developers and scale eCommerce

    + +

    MercadoLibre, Inc. hosts the largest online commerce ecosystem in Latin America and is present in 18 countries. Founded +in 1999 and headquartered in Argentina, the company has turned to Go to help it scale and modernize its ecosystem. Go +provides clean, efficient code that readily scales as MercadoLibre’s online commerce grows, and increases developer +productivity by allowing their engineers to serve their ever-increasing audience while writing less code.

    + +

    MercadoLibre taps Go for scale

    + +

    Back in 2015, there was a growing sense within MercadoLibre that their existing API framework, on Groovy and Grails, was +reaching its limits and the company needed a different platform to continue scaling. MercadoLibre’s platform was (and +continues) to expand exponentially, which created a lot of extra work for its developers: Both Groovy and Grails require +a lot of decisions from developers and Groovy is a dynamic programming language. This was not a good combination for +quickly scaling growth, as MercadoLibre needed very experienced developers in this very resource intensive environment +to develop and tune to achieve desired performance. Test execution times were slow, and build and deploy times were +slow. Thus, the need for code efficiency and scalability became as important as the need for speed in code development.

    + +

    Go improves system efficiency

    + +

    As one example of Go’s contributions to network efficiency, the core API team builds and maintains the largest APIs at +the center of the company’s microservices solutions. This team creates user APIs, which in turn are used by the +MercadoLibre Marketplace, by the MercadoPago FinTech platform, by MercadoLibre’s shipping and logistics solutions, and +other hosted solutions. With the high service levels demanded by these solutions—the average user API has between eight +and ten million requests per minute—the team employs Go to serve them at less than ten milliseconds per request.

    + +

    The API team also deploys Docker containers—a software-as-a-service (SaaS) product, also written in Go—to virtualize +their development and readily deploy their microservices via the Docker Engine. This system supports larger, +mission-critical APIs that handle more than 20 million requests per minute in Go.

    + +

    One API made important use of Go’s concurrency primitives to efficiently multiplex IDs from several services. The team +was able to accomplish this with just a few lines of Go code, and the success of this API convinced the core API team to +migrate more and more microservices to Go. The end result for MercadoLibre has been improved cost-efficiencies and +system response times.

    + +

    Go for scalability

    + +

    Historically, much of the company’s stack was based on Grails and Groovy backed by relational databases. However this +big framework with multiple layers was soon found encountering scalability issues.

    + +

    Converting that legacy architecture to Go as a new, very thin framework for building APIs streamlined those intermediate +layers and yielded great performance benefits. For example, one large Go service is now able to run 70,000 requests +per machine with just 20 MB of RAM.

    + +
    +

    + “Go was just marvelous for us. It’s very powerful +and very easy to learn, and with backend infrastructure, has been great for us in terms of scalability.” +

    +
    + — Eric Kohan + ,  + Software Engineering Manager +  at MercadoLibre +
    +
    + + +

    Using Go allowed MercadoLibre to cut the number of servers they use for this service to one-eighth the original +number (from 32 servers down to four), plus each server can operate with less power (originally four CPU cores, now down +to two CPU cores). With Go, the company obviated 88 percent of their servers and cut CPU on the remaining ones in +half—producing a tremendous cost-savings.

    + +

    Sitting between developers and the cloud providers, MercadoLibre uses a platform called Fury—a platform-as-a-service +tool for building, deploying, monitoring, and managing services in a cloud-agnostic way. As a result, any team that +wants to create a new service in Go has access to proven templates for a variety of service types, and can quickly spin +up a repository in GitHub with starter code, a Docker image for the service, and a deployment pipeline. The end result +is a system that allows engineers to focus on building innovative services while avoiding the tedious stages of setting +up a new project—all while effectively standardizing the build and deployment pipelines.

    + +

    Today, roughly half of Mercadolibre’s traffic is handled by Go applications.

    + +

    MercadoLibre uses Go for developers

    + +

    The programming lingua francas for MercadoLibre’s infrastructure are currently Go and Java. Every app, every program, +every microservice is hosted on its own GitHub repository, plus the company uses an additional GitHub repository of +toolkits to solve new problems and allow clients to interact with its services.

    + +

    These extensive and well-curated Go and Java toolkits allow programmers to develop new apps quickly and with great +support. Plus, in a community of more than 2,800 developers, MercadoLibre has multiple internal groups available for +chat and guidance on deploying Go, whether across different development centers or different countries. The company also +fosters internal working groups to provide training sessions for new MercadoLibre Go developers, and hosts Go meetups +for external developers to help build a broader community of Latin American Go developers.

    + +

    Go as a recruiting tool

    + +

    MercadoLibre’s Go advocacy has also become a strong recruiting tool for the company. MercadoLibre was among the first +companies using Go in Argentina, and is perhaps the largest in Latin America using the language so widely in production. +Headquartered in Buenos Aires, with many start-ups and emerging technology companies nearby, MercadoLibre’s adoption of +Go has shaped the market for developers across the Pampas.

    + +
    +

    + “We really see eye-to-eye with the larger philosophy of the language. We love Go’s simplicity, and we find that having its very explicit error handling has been a gain for developers because it results in safer, more stable code in production.” +

    +
    + — Eric Kohan + ,  + Software Engineering Manager +  at MercadoLibre +
    +
    + + +

    Buenos Aires is today a very competitive market for programmers, offering computer programmers many employment options, +and the high demand for technology in the region drives great salaries, great benefits, and the ability to be selective +when choosing an employer. As such, MercadoLibre—like all employers of engineers and programmers in the region—strives +to provide an exciting workplace and strong career path. Go has proven to be a key differentiator for MercadoLibre: the +company organizes Go workshops for external developers so they can come and learn Go, and when they enjoy what they are +doing and the people they talk to, they quickly recognize MercadoLibre as an enticing place to work.

    + +

    Go enabling developers

    + +

    MercadoLibre employs Go for its simplicity with systems at scale, but that simplicity is also why the company’s +developers love Go.

    + +

    The company also uses web pages like Go by Example and Effective +Go to educate new programmers, and shares representative internal APIs +written in Go to speed understanding and proficiency. MercadoLibre developers get the resources they need to embrace the +language, then leverage their own skills and enthusiasm to start programming.

    + +
    +

    + “Go has been great for writing business logic, and we are the team that writes those APIs.” +

    +
    + — Federico Martin Roasio + ,  + Technical Project Lead +  at MercadoLibre +
    +
    + + +

    MercadoLibre leverages Go’s expressive and clean syntax to make it easier for developers to write programs that run +efficiently on modern cloud platforms. And while speed in development yields cost efficiency for the company, developers +individually benefit from the swift learning curve Go delivers. Not only are MercadoLibre’s experienced engineers able +to build highly critical applications very quickly with Go, but even entry-level engineers have been able to write +services that, in other languages, MercadoLibre would only trust to more senior developers. For example, a key set of +user APIs—handling almost ten million requests per minute—were developed by entry-level software engineers, many of whom +only knew about programming from recent courses at university. Similarly, MercadoLibre has seen developers already +proficient with other programming languages (such as Java or .NET or Ruby) learn Go fast enough start writing production +services in just a few weeks.

    + +

    With Go, MercadoLibre’s build times are three times (3x) faster and their test suite runs an amazing 24 times +faster. This means the company’s developers can make a change, then build and test that change much faster than they +could before.

    + +

    And dropping MercadoLibre’s test suite runtimes from 90-seconds to just 3-seconds with Go was a huge boon for its +developers—allowing them to keep focus (and context) while the much faster tests complete.

    + +

    Leveraging this success, MercadoLibre is committed not only to ongoing education for its programmers, but ongoing Go +education. The company sends key engineering leaders to GopherCon and other Go events each year, MercadoLibre’s +infrastructure and security teams encourage all the development teams to keep Go versions up to date, and the company +has a team developing a Go-meli-toolkit: A complete Go library to interface all the services provided by Fury.

    + +

    Getting your enterprise started with Go

    + +

    Just as MercadoLibre started with a proof-of-concept project to implement Go, dozens of other large enterprises are +adopting Go as well.

    + +

    There are over one million developers using Go worldwide—spanning banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as American Express, PayPal, Capital One, Dropbox, IBM, Monzo, New York Times, Salesforce, Square, Target, Twitch, Uber, and of course Google.

    + +

    To learn more about how Go can help your enterprise build reliable, scalable software as it does at MercadoLibre, visit go.dev today.

    + +
    +
    +
    + + MercadoLibre +

    + About MercadoLibre +

    + +

    Go provides clean, efficient code that readily scales as MercadoLibre’s online commerce grows, and increases developer productivity by allowing their engineers to serve their ever-increasing audience while writing less code.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/mercadolibre/logo.svg b/go.dev/testdata/golden/solutions/mercadolibre/logo.svg new file mode 100644 index 00000000..3fccb14c --- /dev/null +++ b/go.dev/testdata/golden/solutions/mercadolibre/logo.svg @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/go.dev/testdata/golden/solutions/microsoft/index.html b/go.dev/testdata/golden/solutions/microsoft/index.html new file mode 100644 index 00000000..83873762 --- /dev/null +++ b/go.dev/testdata/golden/solutions/microsoft/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    + + +
    + +
    + Microsoft +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Microsoft +

    + About Microsoft +

    + +

    Learn about how Microsoft has helped support Go and how it uses Go to power pieces of it’s cloud infrastructure.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/netflix/index.html b/go.dev/testdata/golden/solutions/netflix/index.html new file mode 100644 index 00000000..0a6ec4e1 --- /dev/null +++ b/go.dev/testdata/golden/solutions/netflix/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    + + +
    + +
    + Netflix +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Netflix +

    + About Netflix +

    + +

    The decision to use Go was deliberate, because we needed something that had lower latency than Java (where garbage collection pauses are an issue) and is more productive for developers than C, while also handling tens of thousands of client connections. Go fits this space well.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/netflix/logo.svg b/go.dev/testdata/golden/solutions/netflix/logo.svg new file mode 100644 index 00000000..0ce1bf48 --- /dev/null +++ b/go.dev/testdata/golden/solutions/netflix/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/paypal/index.html b/go.dev/testdata/golden/solutions/paypal/index.html new file mode 100644 index 00000000..df3e0755 --- /dev/null +++ b/go.dev/testdata/golden/solutions/paypal/index.html @@ -0,0 +1,482 @@ + + + + + + + + + + + + + + + + + +PayPal Taps Go to Modernize and Scale - go.dev + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    PayPal Taps Go to Modernize and Scale

    + + + + +
    + +
    + PayPal +
    + +
    +
    + +
    +
    + +
    +
    + + +
    +
    + Quotation mark. +
    +

    + Since our NoSQL and DB proxy used quite a bit of system details in a multi-threaded mode, the code got complex managing the different conditions, given that Go provides channels and routines to deal with complexity, we were able to structure the code to meet our requirements. +

    +
    + + — Bala Natarajan + ,  + Sr. Director of Engineering, Developer Experience +  at PayPal +
    +
    + +

    New code infrastructure built on Go

    + +

    PayPal was created to democratize financial services and empower people and businesses to join and thrive in the global economy. Central to this effort is PayPal’s Payments Platform, which uses a combination of proprietary and third-party technologies to efficiently and securely facilitate transactions between millions of merchants and consumers worldwide. As the Payments Platform grew larger and more complicated, PayPal sought to modernize its systems and reduce time-to-market for new applications.

    + +

    Go’s value in producing clean, efficient code that readily scales as software deployment scales made the language a strong fit to support PayPal’s goals.

    + +

    Central to the Payment Processing Platform is a proprietary NoSQL database that PayPal had developed in C++. The complexity of the code, however, was substantially decreasing its developers’ ability to evolve the platform. Go’s simple code layouts, goroutines (lightweight threads of execution) and channels (which serve as the pipes that connect concurrent goroutines), made Go a natural choice for the NoSQL development team to simplify and modernize the platform.

    + +

    As a proof of concept, a development team spent six months learning Go and reimplementing the NoSQL system from the ground up in Go, during which they also provided insights on how Go could be implemented more broadly at PayPal. As of today, thirty percent of the clusters have been migrated to use the new NoSQL database.

    + +

    Using Go to simplify for scale

    + +

    As PayPal’s platform becomes more intricate, Go provides a way to readily simplify the complexity of creating and running software at scale. The language provides PayPal with great libraries and fast tools, plus concurrency, garbage collection, and type safety.

    + +

    With Go, PayPal enables its developers to spend more time looking at code and thinking strategically, by freeing them from the noise of C++ and Java development.

    + +

    After the success of this newly re-written NoSQL system, more platform and content teams within PayPal began adopting Go. Natarajan’s current team is responsible for PayPal’s build, test, and release pipelines—all built in Go. The company has a large build and test farm which is completely managed using Go infrastructure to support builds-as-a-service (and tests-as-a-service) for developers across the company.

    + + + + Go gopher factory + + +

    Modernizing PayPal systems with Go

    + +

    With the distributed computing capabilities required by PayPal, Go was the right language to refresh their systems. PayPal needed programming that is concurrent and parallel, compiled for high performance and highly portable, and that brings developers the benefits of a modular, composable open-source architecture—Go has delivered all that and more to help PayPal modernize its systems.

    + +

    Security and supportability are key matters at PayPal, and the company’s operational pipelines are increasingly dominated by Go because the language’s cleanliness and modularity help them achieve these goals. PayPal’s deployment of Go engenders a platform of creativity for developers, allowing them to produce simple, efficient, and reliable software at scale for PayPal’s worldwide markets.

    + +

    As PayPal continues to modernize their software-defined networking (SDN) infrastructure with Go, they are seeing performance benefits in addition to more maintainable code. For example, Go now powers routers, load balances, and an increasing number of production systems.

    + +
    +

    + “In our tightly managed environments where we run Go code, we have seen a CPU reduction of approximately ten percent with cleaner and maintainable code.” +

    +
    + — Bala Natarajan + ,  + Sr. Director of Engineering +
    +
    + + +

    Go increases developer productivity

    + +

    As a global operation, PayPal needs its development teams to be effective at managing two kinds of scale: production scale, especially concurrent systems interacting with many other servers (such as cloud services); and development scale, especially large codebases developed by many programmers in coordination (such as open-source development)

    + +

    PayPal leverages Go to address these issues of scale. The company’s developers benefit from Go’s ability to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. As PayPal modernizes its system, support for networked and multicore computing is critical. Go not only delivers such support but delivers quickly—it takes at most a few seconds to compile a large executable on a single computer.

    + +

    There are currently over 100 Go developers at PayPal, and future developers who choose to adopt Go will have an easier time getting the language approved thanks to the many successful implementations already in production at the company.

    + +

    Most importantly, PayPal developers have increased their productivity with Go. Go’s concurrency mechanisms have made it easy to write programs that get the most out of PayPal’s multicore and networked machines. Developers using Go also benefit from the fact that it compiles quickly to machine code and their apps gain the convenience of garbage collection and the power of run-time reflection.

    + +

    Speeding PayPal’s time to market

    + +

    The first-class languages at PayPal today are Java and Node, with Go primarily used as an infrastructure language. While Go may never replace Node.js for certain applications, Natarajan is pushing to make Go a first-class language at PayPal.

    + +

    Through his efforts, PayPal is also evaluating moving to the Google Kubernetes Engine (GKE) to speed their new products’ time-to-market. The GKE is a managed, production-ready environment for deploying containerized applications, and brings Google’s latest innovations in developer productivity, automated operations, and open source flexibility.

    + +

    For PayPal, deploying to GKE would enable rapid development and iteration by making it easier for PayPal to deploy, update, and manage its applications and services. Plus PayPal will find it easier to run Machine Learning, General Purpose GPU, High-Performance Computing, and other workloads that benefit from specialized hardware accelerators supported by the GKE.

    + +

    Most importantly for PayPal, the combination of Go development and the GKE allows the company to scale effortless to meet demand, as Kubernetes autoscaling will allow PayPal to handle increased user demand for services—keeping them available when it matters most, then scale back in the quiet periods to save money.

    + +

    Getting your enterprise started with Go

    + +

    PayPal’s story is not unique; dozens of other large enterprises are discovering how Go can help them ship reliable software faster. There are over one million developers using Go worldwide—spanning banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as American Express, Mercado Libre, Capital One, Dropbox, IBM, Monzo, New York Times, Salesforce, Square, Target, Twitch, Uber, and of course Google.

    + +

    To learn more about how Go can help your enterprise build reliable, scalable software as it does at PayPal, visit go.dev today.

    + +
    +
    +
    + + PayPal +

    + About PayPal +

    + +

    Go’s value in producing clean, efficient code that readily scales as software deployment scales made the language a strong fit to support PayPal’s goals.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/paypal/logo.svg b/go.dev/testdata/golden/solutions/paypal/logo.svg new file mode 100644 index 00000000..2923b9f5 --- /dev/null +++ b/go.dev/testdata/golden/solutions/paypal/logo.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/go.dev/testdata/golden/solutions/riotgames/index.html b/go.dev/testdata/golden/solutions/riotgames/index.html new file mode 100644 index 00000000..207ee0d0 --- /dev/null +++ b/go.dev/testdata/golden/solutions/riotgames/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    + + +
    + +
    + Riot Games +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Riot Games +

    + About Riot Games +

    + +

    Learn how Riot uses Go to develop, deploy, and operate backend microserves at scale–globally. They share thier experience across use cases, with specific examples, and speak to the value of the gopher community.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/riotgames/riotgames.png b/go.dev/testdata/golden/solutions/riotgames/riotgames.png new file mode 100644 index 00000000..facb585f Binary files /dev/null and b/go.dev/testdata/golden/solutions/riotgames/riotgames.png differ diff --git a/go.dev/testdata/golden/solutions/salesforce/index.html b/go.dev/testdata/golden/solutions/salesforce/index.html new file mode 100644 index 00000000..8e054d2a --- /dev/null +++ b/go.dev/testdata/golden/solutions/salesforce/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    + + +
    + +
    + Salesforce +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Salesforce +

    + About Salesforce +

    + +

    One of the big advantages is that Go’s cross-platform features make porting code easy.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/salesforce/logo.svg b/go.dev/testdata/golden/solutions/salesforce/logo.svg new file mode 100644 index 00000000..e82db677 --- /dev/null +++ b/go.dev/testdata/golden/solutions/salesforce/logo.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/sitereliability/index.html b/go.dev/testdata/golden/solutions/sitereliability/index.html new file mode 100644 index 00000000..474afe27 --- /dev/null +++ b/go.dev/testdata/golden/solutions/sitereliability/index.html @@ -0,0 +1 @@ +https://go.dev/solutions/google/sitereliability/ diff --git a/go.dev/testdata/golden/solutions/target/index.html b/go.dev/testdata/golden/solutions/target/index.html new file mode 100644 index 00000000..670014d8 --- /dev/null +++ b/go.dev/testdata/golden/solutions/target/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    + + +
    + +
    + Target +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Target +

    + About Target +

    + +

    We loved the simplified syntax, strong standard library, great external community, and well-built and maintained libraries. We loved the fast compile times and incredibly small images we could build when deploying containers. As we continue to grow and scale our technical solutions to our guests, we find the concurrency primitives in Go particularly useful.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/target/logo.svg b/go.dev/testdata/golden/solutions/target/logo.svg new file mode 100644 index 00000000..98868c57 --- /dev/null +++ b/go.dev/testdata/golden/solutions/target/logo.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/go.dev/testdata/golden/solutions/twitch/index.html b/go.dev/testdata/golden/solutions/twitch/index.html new file mode 100644 index 00000000..94aa09a0 --- /dev/null +++ b/go.dev/testdata/golden/solutions/twitch/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    + + +
    + +
    + Twitch +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Twitch +

    + About Twitch +

    + +

    We use Go at Twitch for many of our busiest systems. Its simplicity, safety, performance, and readability make it a good tool for the problems we encounter with serving live video and chat to our millions of users.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/twitch/logo.svg b/go.dev/testdata/golden/solutions/twitch/logo.svg new file mode 100644 index 00000000..6afd8113 --- /dev/null +++ b/go.dev/testdata/golden/solutions/twitch/logo.svg @@ -0,0 +1,19 @@ + + + + + + diff --git a/go.dev/testdata/golden/solutions/twitter/index.html b/go.dev/testdata/golden/solutions/twitter/index.html new file mode 100644 index 00000000..2dd8750b --- /dev/null +++ b/go.dev/testdata/golden/solutions/twitter/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + +Twitter - 5 billion sessions a day in realtime - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    Twitter - 5 billion sessions a day in realtime

    + + +
    + +
    + Twitter +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Twitter +

    + About Twitter +

    + +

    We now see about five billion sessions per day, and growing. Hundreds of millions of devices send millions of events every second to the Answers endpoint. During the time that it took you to read to here, the Answers back-end will have received and processed about 10,000,000 analytics events.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/twitter/logo.svg b/go.dev/testdata/golden/solutions/twitter/logo.svg new file mode 100644 index 00000000..2832e7b5 --- /dev/null +++ b/go.dev/testdata/golden/solutions/twitter/logo.svg @@ -0,0 +1 @@ +Twitter_Logo_Blue \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/uber/index.html b/go.dev/testdata/golden/solutions/uber/index.html new file mode 100644 index 00000000..3f7c951a --- /dev/null +++ b/go.dev/testdata/golden/solutions/uber/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + +Uber - GPU-power analytics engine in Go - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    Uber - GPU-power analytics engine in Go

    + + +
    + +
    + Uber +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Uber +

    + About Uber +

    + +

    AresDB [,written in Go,] is widely used at Uber to power our real-time data analytics dashboards, enabling us to make data-driven decisions at scale about myriad aspects of our business.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/uber/logo.svg b/go.dev/testdata/golden/solutions/uber/logo.svg new file mode 100644 index 00000000..7950b0b8 --- /dev/null +++ b/go.dev/testdata/golden/solutions/uber/logo.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/go.dev/testdata/golden/solutions/webdev/index.html b/go.dev/testdata/golden/solutions/webdev/index.html new file mode 100644 index 00000000..db5999ae --- /dev/null +++ b/go.dev/testdata/golden/solutions/webdev/index.html @@ -0,0 +1,870 @@ + + + + + + + + + + + + + + + + + +Go for Web Development - go.dev + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    Go for Web Development

    + + + + +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + + +

    Overview

    + +

    Go delivers speed, security, and developer-friendly tools for Web Applications

    + +

    Go is designed to enable developers to rapidly develop scalable and secure web applications. Go ships with an easy to use, secure and performant web server and includes it own web templating library. Go has excellent support for all of the latest technologies from HTTP/2, to databases like MySQL, MongoDB and ElasticSearch, to the latest encryption standards including TLS 1.3. Go web applications run natively on Google App Engine and Google Cloud Run (for easy scaling) or on any environment, cloud, or operating system thanks to Go’s extreme portability.

    + +

    Key Benefits

    + +

    Deploy across platforms in record speed

    + +

    For enterprises, Go is preferred for providing rapid cross-platform deployment. With its goroutines, native compilation, and the URI-based package namespacing, Go code compiles to a single, small binary—with zero dependencies—making it very fast.

    + +

    Leverage Go’s out-of-the-box performance to scale with ease

    + +

    Tigran Bayburtsyan, Co-Founder and CTO at Hexact Inc., summarizes five key reasons his company switched to Go:

    + +
      +
    • Compiles into a single binary — “Using static linking, Go actually combining all dependency libraries and modules into one single binary file based on OS type and architecture.”

    • + +
    • Static type system — “Type system is really important for large scale applications.”

    • + +
    • Performance — “Go performed better because of its concurrency model and CPU scalability. Whenever we need to process some internal request, we are doing it with separate Goroutines which are 10x cheaper in resources than Python Threads.”

    • + +
    • No need for a web framework — “In most of the cases you really don’t need any third-party library.”

    • + +
    • Great IDE support and debugging — “After rewriting all projects to Go, we got 64 percent less code than we had earlier.”

    • +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CustomerBrief introductionProjects using go
    + Caddy + + Caddy + Caddy 2 is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go. Caddy offers greater memory safety than servers written in C. A hardened TLS stack powered by the Go standard library serves a significant portion of all Internet traffic. + + +
    + Cloudflare + + Cloudflare + Cloudflare speeds up and protects millions of websites, APIs, SaaS services, and other properties connected to the Internet. “Go is at the heart of CloudFlare’s services including handling compression for high-latency HTTP connections, our entire DNS infrastructure, SSL, load testing and more.” + + +
    + gov.uk + + gov.uk + The simplicity and safety of the Go language were a good fit for the United Kingdom’s government’s HTTP infrastructure, and some brief experiments with the excellent net/http package convinced web developers they were on the right track. “In particular, Go’s concurrency model makes it absurdly easy to build performant I/O-bound applications.” + + +
    + + + + + +
    + +

    Get Started

    + +

    Go books on web development

    + +

    + +

    + + + +
    + +
      + +
    • + Buffalo +

      A framework for rapid web development in Go, curating Go and JS libraries together.

      +
    • + +
    • + Echo +

      A high performance, extensible, and minimalist Go web framework

      +
    • + +
    • + Flamingo +

      A fast open-source framework based on Go with clean and scalable architecture

      +
    • + +
    • + Gin +

      A web framework written in Go, with a martini-like API.

      +
    • + +
    • + Gorilla +

      A web toolkit for the Go programming language.

      +
    • + +
    + View More +
    + +
    + +
      + +
    • + julienschmidt/httprouter +

      A lightweight high performance HTTP request router

      +
    • + +
    • + gorilla/mux +

      A powerful HTTP router and URL matcher for building Go web servers with 🦍

      +
    • + +
    • + Chi +

      A lightweight, idiomatic and composable router for building Go HTTP services.

      +
    • + +
    • + net/http +

      A standard library HTTP package

      +
    • + +
    + View More +
    + +
    + +
      + +
    • + html/template +

      A standard library HTML template engine

      +
    • + +
    • + flosch/pongo2 +

      A Django-syntax like templating-language

      +
    • + +
    + View More +
    + +
    + +
      + +
    • + database/sql +

      A standard library interface with driver support for MySQL, Postgres, Oracle, MS SQL, BigQuery and most SQL databases

      +
    • + +
    • + mongo-driver/mongo +

      The MongoDB supported driver for Go

      +
    • + +
    • + olivere/elastic +

      A Elasticsearch client for Go

      +
    • + +
    • + GORM +

      An ORM library for Go

      +
    • + +
    • + Bleve +

      Full-text search and indexing for Go

      +
    • + +
    • + CockroachDB +

      An evolution of the database—architected for the cloud to deliver resilient, consistent, distributed SQL at scale

      +
    • + +
    + View More +
    + +
    + + + View More +
    + +
    + +
      + +
    • + gopherjs +

      A compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers.

      +
    • + +
    + View More +
    +

    + +

    Courses

    + + + +

    Projects

    + +
      +
    • +gopherjs, a compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers.
    • +
    • Hugo, The world’s fastest framework for building websites
    • +
    • Mattermost, a flexible, open source messaging platform +that enables secure team collaboration
    • +
    • Caddy, a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go
    • +
    + +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/webdev/webdev-green.svg b/go.dev/testdata/golden/solutions/webdev/webdev-green.svg new file mode 100644 index 00000000..b4e73efc --- /dev/null +++ b/go.dev/testdata/golden/solutions/webdev/webdev-green.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/webdev/webdev-white.svg b/go.dev/testdata/golden/solutions/webdev/webdev-white.svg new file mode 100644 index 00000000..370f57e8 --- /dev/null +++ b/go.dev/testdata/golden/solutions/webdev/webdev-white.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/wildlifestudios/index.html b/go.dev/testdata/golden/solutions/wildlifestudios/index.html new file mode 100644 index 00000000..348c919b --- /dev/null +++ b/go.dev/testdata/golden/solutions/wildlifestudios/index.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + + - go.dev + + + + + + + + + +
    +
    +
    +
    +
    +
    + + +

    + + +
    + +
    + Wildlife Studios +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + Wildlife Studios +

    + About Wildlife Studios +

    + +

    Wildlife is a Brazilian native global company focused on mobile gaming. We aim to develop games that will make billions of people happy. We have almost 40 million daily active users, and we rely on Go as the main language for our core platform, given its features to scale our backend services.

    + +
    +
    +
    + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/solutions/wildlifestudios/logo.png b/go.dev/testdata/golden/solutions/wildlifestudios/logo.png new file mode 100644 index 00000000..8d1c43b8 Binary files /dev/null and b/go.dev/testdata/golden/solutions/wildlifestudios/logo.png differ diff --git a/go.dev/testdata/golden/tags/index.html b/go.dev/testdata/golden/tags/index.html new file mode 100644 index 00000000..8f1b37b4 --- /dev/null +++ b/go.dev/testdata/golden/tags/index.html @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + +Tags - go.dev + + + + + + + + +
    +

    Tags

    +
      + +
    +
    +
    + + + diff --git a/go.dev/testdata/golden/tags/index.xml b/go.dev/testdata/golden/tags/index.xml new file mode 100644 index 00000000..e6771153 --- /dev/null +++ b/go.dev/testdata/golden/tags/index.xml @@ -0,0 +1,14 @@ + + + + Tags on go.dev + https://go.dev/tags/ + Recent content in Tags on go.dev + Hugo -- gohugo.io + en + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/tos/index.html b/go.dev/testdata/golden/tos/index.html new file mode 100644 index 00000000..cbdd3fbd --- /dev/null +++ b/go.dev/testdata/golden/tos/index.html @@ -0,0 +1,316 @@ + + + + + + + + + + + + + + + + + +Terms of Service - go.dev + + + + + + + + +
    +
    +

    Terms of Service

    +

    The Go website (the “Website”) is hosted by Google. By using and/or visiting the Website, you consent to be bound by +Google’s general Terms of Service and Google’s general +Privacy Policy.

    + +
    +
    + + + -- cgit v1.3 From 0c5a52a33e86d1d428ff9fd0e0be0605a61bc6fd Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 17 May 2021 10:22:59 -0400 Subject: [x/go.dev] cmd/internal/tmplfunc: copy of rsc.io/tmplfunc Package tmplfunc makes it possible to invoke other templates as if they were functions, which greatly streamlines the use of sub-templates. Making a copy avoids a dependency on an unreviewed personal repo. Perhaps at some point in the future the main template package will provide something like this functionality, and then we can remove this. Change-Id: I67fd7ea159a47e8620793f0aca85e77432a5c45c X-GoDev-Commit: 209d65474a5a6b6c25c7a7ab8fa9537702c69070 --- go.dev/cmd/internal/tmplfunc/func.go | 202 +++++ go.dev/cmd/internal/tmplfunc/internal/parse/lex.go | 671 ++++++++++++++ .../internal/tmplfunc/internal/parse/lex_test.go | 557 ++++++++++++ .../cmd/internal/tmplfunc/internal/parse/node.go | 972 +++++++++++++++++++++ .../cmd/internal/tmplfunc/internal/parse/parse.go | 756 ++++++++++++++++ .../internal/tmplfunc/internal/parse/parse_test.go | 668 ++++++++++++++ go.dev/cmd/internal/tmplfunc/testdata/x.tmpl | 3 + go.dev/cmd/internal/tmplfunc/testdata/y.tmpl | 3 + go.dev/cmd/internal/tmplfunc/tmpl.go | 213 +++++ go.dev/cmd/internal/tmplfunc/tmplfunc_test.go | 111 +++ 10 files changed, 4156 insertions(+) create mode 100644 go.dev/cmd/internal/tmplfunc/func.go create mode 100644 go.dev/cmd/internal/tmplfunc/internal/parse/lex.go create mode 100644 go.dev/cmd/internal/tmplfunc/internal/parse/lex_test.go create mode 100644 go.dev/cmd/internal/tmplfunc/internal/parse/node.go create mode 100644 go.dev/cmd/internal/tmplfunc/internal/parse/parse.go create mode 100644 go.dev/cmd/internal/tmplfunc/internal/parse/parse_test.go create mode 100644 go.dev/cmd/internal/tmplfunc/testdata/x.tmpl create mode 100644 go.dev/cmd/internal/tmplfunc/testdata/y.tmpl create mode 100644 go.dev/cmd/internal/tmplfunc/tmpl.go create mode 100644 go.dev/cmd/internal/tmplfunc/tmplfunc_test.go diff --git a/go.dev/cmd/internal/tmplfunc/func.go b/go.dev/cmd/internal/tmplfunc/func.go new file mode 100644 index 00000000..430bf6c2 --- /dev/null +++ b/go.dev/cmd/internal/tmplfunc/func.go @@ -0,0 +1,202 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package tmplfunc + +import ( + "bytes" + "fmt" + "reflect" + "regexp" + "strings" + + "golang.org/x/go.dev/cmd/internal/tmplfunc/internal/parse" + + htmltemplate "html/template" + texttemplate "text/template" +) + +var validNameRE = regexp.MustCompile(`\A[_\pL][_\pL\p{Nd}]*\z`) +var validArgNameRE = regexp.MustCompile(`\A[_\pL][_\pL\p{Nd}]*(\.\.\.|\?)?\z`) + +func funcs(t Template, names, texts []string) error { + var leftDelim, rightDelim string + switch t := t.(type) { + case nil: + return fmt.Errorf("tmplfunc: nil Template") + default: + return fmt.Errorf("tmplfunc: non-template type %T", t) + case *texttemplate.Template: + leftDelim = reflect.ValueOf(t).Elem().FieldByName("leftDelim").String() + rightDelim = reflect.ValueOf(t).Elem().FieldByName("rightDelim").String() + case *htmltemplate.Template: + leftDelim = reflect.ValueOf(t).Elem().FieldByName("text").Elem().FieldByName("leftDelim").String() + rightDelim = reflect.ValueOf(t).Elem().FieldByName("text").Elem().FieldByName("rightDelim").String() + } + + trees := make(map[string]*parse.Tree) + for i, text := range texts { + t := parse.New(names[i], nil) + t.Mode = parse.SkipFuncCheck + _, err := t.Parse(text, leftDelim, rightDelim, trees) + if err != nil { + return err + } + } + + // Install functions for named templates as appropriate. + funcs := make(map[string]interface{}) + for name := range trees { + if err := addFunc(t, name, funcs); err != nil { + return err + } + } + + switch t := t.(type) { + case *texttemplate.Template: + t.Funcs(funcs) + case *htmltemplate.Template: + t.Funcs(funcs) + } + + return nil +} + +func Funcs(t Template) error { + funcs := make(map[string]interface{}) + switch t := t.(type) { + case *texttemplate.Template: + for _, t1 := range t.Templates() { + if err := addFunc(t, t1.Name(), funcs); err != nil { + return err + } + } + t.Funcs(funcs) + case *htmltemplate.Template: + for _, t1 := range t.Templates() { + if err := addFunc(t, t1.Name(), funcs); err != nil { + return err + } + } + t.Funcs(funcs) + } + return nil +} + +func addFunc(t Template, name string, funcs map[string]interface{}) error { + fn, bundle, err := bundler(name) + if err != nil { + return err + } + if fn == "" { + return nil + } + switch t := t.(type) { + case *texttemplate.Template: + funcs[fn] = func(args ...interface{}) (string, error) { + t := t.Lookup(name) + if t == nil { + return "", fmt.Errorf("lost template %q", name) + } + arg, err := bundle(args) + if err != nil { + return "", err + } + var buf bytes.Buffer + err = t.Execute(&buf, arg) + if err != nil { + return "", err + } + return buf.String(), nil + } + case *htmltemplate.Template: + funcs[fn] = func(args ...interface{}) (htmltemplate.HTML, error) { + t := t.Lookup(name) + if t == nil { + return "", fmt.Errorf("lost template %q", name) + } + arg, err := bundle(args) + if err != nil { + return "", err + } + var buf bytes.Buffer + err = t.Execute(&buf, arg) + if err != nil { + return "", err + } + return htmltemplate.HTML(buf.String()), nil + } + } + return nil +} + +func bundler(name string) (fn string, bundle func(args []interface{}) (interface{}, error), err error) { + f := strings.Fields(name) + if len(f) == 0 || !validNameRE.MatchString(f[0]) { + return "", nil, nil + } + + fn = f[0] + if len(f) == 1 { + bundle = func(args []interface{}) (interface{}, error) { + if len(args) == 0 { + return nil, nil + } + if len(args) == 1 { + return args[0], nil + } + return nil, fmt.Errorf("too many arguments in call to template %s", fn) + } + } else { + sawQ := false + for i, argName := range f[1:] { + if !validArgNameRE.MatchString(argName) { + return "", nil, fmt.Errorf("invalid template name %q: invalid argument name %s", name, argName) + } + if strings.HasSuffix(argName, "...") { + if i != len(f)-2 { + return "", nil, fmt.Errorf("invalid template name %q: %s is not last argument", name, argName) + } + break + } + if strings.HasSuffix(argName, "?") { + sawQ = true + continue + } + if sawQ { + return "", nil, fmt.Errorf("invalid template name %q: required %s after optional %s", name, argName, f[i]) + } + } + + bundle = func(args []interface{}) (interface{}, error) { + m := make(map[string]interface{}) + for _, argName := range f[1:] { + if strings.HasSuffix(argName, "...") { + m[strings.TrimSuffix(argName, "...")] = args + args = nil + break + } + if strings.HasSuffix(argName, "?") { + prefix := strings.TrimSuffix(argName, "?") + if len(args) == 0 { + m[prefix] = nil + } else { + m[prefix], args = args[0], args[1:] + } + continue + } + if len(args) == 0 { + return nil, fmt.Errorf("too few arguments in call to template %s", fn) + } + m[argName], args = args[0], args[1:] + } + if len(args) > 0 { + return nil, fmt.Errorf("too many arguments in call to template %s", fn) + } + return m, nil + } + } + + return fn, bundle, nil +} diff --git a/go.dev/cmd/internal/tmplfunc/internal/parse/lex.go b/go.dev/cmd/internal/tmplfunc/internal/parse/lex.go new file mode 100644 index 00000000..6784071b --- /dev/null +++ b/go.dev/cmd/internal/tmplfunc/internal/parse/lex.go @@ -0,0 +1,671 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package parse + +import ( + "fmt" + "strings" + "unicode" + "unicode/utf8" +) + +// item represents a token or text string returned from the scanner. +type item struct { + typ itemType // The type of this item. + pos Pos // The starting position, in bytes, of this item in the input string. + val string // The value of this item. + line int // The line number at the start of this item. +} + +func (i item) String() string { + switch { + case i.typ == itemEOF: + return "EOF" + case i.typ == itemError: + return i.val + case i.typ > itemKeyword: + return fmt.Sprintf("<%s>", i.val) + case len(i.val) > 10: + return fmt.Sprintf("%.10q...", i.val) + } + return fmt.Sprintf("%q", i.val) +} + +// itemType identifies the type of lex items. +type itemType int + +const ( + itemError itemType = iota // error occurred; value is text of error + itemBool // boolean constant + itemChar // printable ASCII character; grab bag for comma etc. + itemCharConstant // character constant + itemComment // comment text + itemComplex // complex constant (1+2i); imaginary is just a number + itemAssign // equals ('=') introducing an assignment + itemDeclare // colon-equals (':=') introducing a declaration + itemEOF + itemField // alphanumeric identifier starting with '.' + itemIdentifier // alphanumeric identifier not starting with '.' + itemLeftDelim // left action delimiter + itemLeftParen // '(' inside action + itemNumber // simple number, including imaginary + itemPipe // pipe symbol + itemRawString // raw quoted string (includes quotes) + itemRightDelim // right action delimiter + itemRightParen // ')' inside action + itemSpace // run of spaces separating arguments + itemString // quoted string (includes quotes) + itemText // plain text + itemVariable // variable starting with '$', such as '$' or '$1' or '$hello' + // Keywords appear after all the rest. + itemKeyword // used only to delimit the keywords + itemBlock // block keyword + itemDot // the cursor, spelled '.' + itemDefine // define keyword + itemElse // else keyword + itemEnd // end keyword + itemIf // if keyword + itemNil // the untyped nil constant, easiest to treat as a keyword + itemRange // range keyword + itemTemplate // template keyword + itemWith // with keyword +) + +var key = map[string]itemType{ + ".": itemDot, + "block": itemBlock, + "define": itemDefine, + "else": itemElse, + "end": itemEnd, + "if": itemIf, + "range": itemRange, + "nil": itemNil, + "template": itemTemplate, + "with": itemWith, +} + +const eof = -1 + +// Trimming spaces. +// If the action begins "{{- " rather than "{{", then all space/tab/newlines +// preceding the action are trimmed; conversely if it ends " -}}" the +// leading spaces are trimmed. This is done entirely in the lexer; the +// parser never sees it happen. We require an ASCII space (' ', \t, \r, \n) +// to be present to avoid ambiguity with things like "{{-3}}". It reads +// better with the space present anyway. For simplicity, only ASCII +// does the job. +const ( + spaceChars = " \t\r\n" // These are the space characters defined by Go itself. + trimMarker = '-' // Attached to left/right delimiter, trims trailing spaces from preceding/following text. + trimMarkerLen = Pos(1 + 1) // marker plus space before or after +) + +// stateFn represents the state of the scanner as a function that returns the next state. +type stateFn func(*lexer) stateFn + +// lexer holds the state of the scanner. +type lexer struct { + name string // the name of the input; used only for error reports + input string // the string being scanned + leftDelim string // start of action + rightDelim string // end of action + emitComment bool // emit itemComment tokens. + pos Pos // current position in the input + start Pos // start position of this item + width Pos // width of last rune read from input + items chan item // channel of scanned items + parenDepth int // nesting depth of ( ) exprs + line int // 1+number of newlines seen + startLine int // start line of this item +} + +// next returns the next rune in the input. +func (l *lexer) next() rune { + if int(l.pos) >= len(l.input) { + l.width = 0 + return eof + } + r, w := utf8.DecodeRuneInString(l.input[l.pos:]) + l.width = Pos(w) + l.pos += l.width + if r == '\n' { + l.line++ + } + return r +} + +// peek returns but does not consume the next rune in the input. +func (l *lexer) peek() rune { + r := l.next() + l.backup() + return r +} + +// backup steps back one rune. Can only be called once per call of next. +func (l *lexer) backup() { + l.pos -= l.width + // Correct newline count. + if l.width == 1 && l.input[l.pos] == '\n' { + l.line-- + } +} + +// emit passes an item back to the client. +func (l *lexer) emit(t itemType) { + l.items <- item{t, l.start, l.input[l.start:l.pos], l.startLine} + l.start = l.pos + l.startLine = l.line +} + +// ignore skips over the pending input before this point. +func (l *lexer) ignore() { + l.line += strings.Count(l.input[l.start:l.pos], "\n") + l.start = l.pos + l.startLine = l.line +} + +// accept consumes the next rune if it's from the valid set. +func (l *lexer) accept(valid string) bool { + if strings.ContainsRune(valid, l.next()) { + return true + } + l.backup() + return false +} + +// acceptRun consumes a run of runes from the valid set. +func (l *lexer) acceptRun(valid string) { + for strings.ContainsRune(valid, l.next()) { + } + l.backup() +} + +// errorf returns an error token and terminates the scan by passing +// back a nil pointer that will be the next state, terminating l.nextItem. +func (l *lexer) errorf(format string, args ...interface{}) stateFn { + l.items <- item{itemError, l.start, fmt.Sprintf(format, args...), l.startLine} + return nil +} + +// nextItem returns the next item from the input. +// Called by the parser, not in the lexing goroutine. +func (l *lexer) nextItem() item { + return <-l.items +} + +// drain drains the output so the lexing goroutine will exit. +// Called by the parser, not in the lexing goroutine. +func (l *lexer) drain() { + for range l.items { + } +} + +// lex creates a new scanner for the input string. +func lex(name, input, left, right string, emitComment bool) *lexer { + if left == "" { + left = leftDelim + } + if right == "" { + right = rightDelim + } + l := &lexer{ + name: name, + input: input, + leftDelim: left, + rightDelim: right, + emitComment: emitComment, + items: make(chan item), + line: 1, + startLine: 1, + } + go l.run() + return l +} + +// run runs the state machine for the lexer. +func (l *lexer) run() { + for state := lexText; state != nil; { + state = state(l) + } + close(l.items) +} + +// state functions + +const ( + leftDelim = "{{" + rightDelim = "}}" + leftComment = "/*" + rightComment = "*/" +) + +// lexText scans until an opening action delimiter, "{{". +func lexText(l *lexer) stateFn { + l.width = 0 + if x := strings.Index(l.input[l.pos:], l.leftDelim); x >= 0 { + ldn := Pos(len(l.leftDelim)) + l.pos += Pos(x) + trimLength := Pos(0) + if hasLeftTrimMarker(l.input[l.pos+ldn:]) { + trimLength = rightTrimLength(l.input[l.start:l.pos]) + } + l.pos -= trimLength + if l.pos > l.start { + l.line += strings.Count(l.input[l.start:l.pos], "\n") + l.emit(itemText) + } + l.pos += trimLength + l.ignore() + return lexLeftDelim + } + l.pos = Pos(len(l.input)) + // Correctly reached EOF. + if l.pos > l.start { + l.line += strings.Count(l.input[l.start:l.pos], "\n") + l.emit(itemText) + } + l.emit(itemEOF) + return nil +} + +// rightTrimLength returns the length of the spaces at the end of the string. +func rightTrimLength(s string) Pos { + return Pos(len(s) - len(strings.TrimRight(s, spaceChars))) +} + +// atRightDelim reports whether the lexer is at a right delimiter, possibly preceded by a trim marker. +func (l *lexer) atRightDelim() (delim, trimSpaces bool) { + if hasRightTrimMarker(l.input[l.pos:]) && strings.HasPrefix(l.input[l.pos+trimMarkerLen:], l.rightDelim) { // With trim marker. + return true, true + } + if strings.HasPrefix(l.input[l.pos:], l.rightDelim) { // Without trim marker. + return true, false + } + return false, false +} + +// leftTrimLength returns the length of the spaces at the beginning of the string. +func leftTrimLength(s string) Pos { + return Pos(len(s) - len(strings.TrimLeft(s, spaceChars))) +} + +// lexLeftDelim scans the left delimiter, which is known to be present, possibly with a trim marker. +func lexLeftDelim(l *lexer) stateFn { + l.pos += Pos(len(l.leftDelim)) + trimSpace := hasLeftTrimMarker(l.input[l.pos:]) + afterMarker := Pos(0) + if trimSpace { + afterMarker = trimMarkerLen + } + if strings.HasPrefix(l.input[l.pos+afterMarker:], leftComment) { + l.pos += afterMarker + l.ignore() + return lexComment + } + l.emit(itemLeftDelim) + l.pos += afterMarker + l.ignore() + l.parenDepth = 0 + return lexInsideAction +} + +// lexComment scans a comment. The left comment marker is known to be present. +func lexComment(l *lexer) stateFn { + l.pos += Pos(len(leftComment)) + i := strings.Index(l.input[l.pos:], rightComment) + if i < 0 { + return l.errorf("unclosed comment") + } + l.pos += Pos(i + len(rightComment)) + delim, trimSpace := l.atRightDelim() + if !delim { + return l.errorf("comment ends before closing delimiter") + } + if l.emitComment { + l.emit(itemComment) + } + if trimSpace { + l.pos += trimMarkerLen + } + l.pos += Pos(len(l.rightDelim)) + if trimSpace { + l.pos += leftTrimLength(l.input[l.pos:]) + } + l.ignore() + return lexText +} + +// lexRightDelim scans the right delimiter, which is known to be present, possibly with a trim marker. +func lexRightDelim(l *lexer) stateFn { + trimSpace := hasRightTrimMarker(l.input[l.pos:]) + if trimSpace { + l.pos += trimMarkerLen + l.ignore() + } + l.pos += Pos(len(l.rightDelim)) + l.emit(itemRightDelim) + if trimSpace { + l.pos += leftTrimLength(l.input[l.pos:]) + l.ignore() + } + return lexText +} + +// lexInsideAction scans the elements inside action delimiters. +func lexInsideAction(l *lexer) stateFn { + // Either number, quoted string, or identifier. + // Spaces separate arguments; runs of spaces turn into itemSpace. + // Pipe symbols separate and are emitted. + delim, _ := l.atRightDelim() + if delim { + if l.parenDepth == 0 { + return lexRightDelim + } + return l.errorf("unclosed left paren") + } + switch r := l.next(); { + case r == eof: + return l.errorf("unclosed action") + case isSpace(r): + l.backup() // Put space back in case we have " -}}". + return lexSpace + case r == '=': + l.emit(itemAssign) + case r == ':': + if l.next() != '=' { + return l.errorf("expected :=") + } + l.emit(itemDeclare) + case r == '|': + l.emit(itemPipe) + case r == '"': + return lexQuote + case r == '`': + return lexRawQuote + case r == '$': + return lexVariable + case r == '\'': + return lexChar + case r == '.': + // special look-ahead for ".field" so we don't break l.backup(). + if l.pos < Pos(len(l.input)) { + r := l.input[l.pos] + if r < '0' || '9' < r { + return lexField + } + } + fallthrough // '.' can start a number. + case r == '+' || r == '-' || ('0' <= r && r <= '9'): + l.backup() + return lexNumber + case isAlphaNumeric(r): + l.backup() + return lexIdentifier + case r == '(': + l.emit(itemLeftParen) + l.parenDepth++ + case r == ')': + l.emit(itemRightParen) + l.parenDepth-- + if l.parenDepth < 0 { + return l.errorf("unexpected right paren %#U", r) + } + case r <= unicode.MaxASCII && unicode.IsPrint(r): + l.emit(itemChar) + default: + return l.errorf("unrecognized character in action: %#U", r) + } + return lexInsideAction +} + +// lexSpace scans a run of space characters. +// We have not consumed the first space, which is known to be present. +// Take care if there is a trim-marked right delimiter, which starts with a space. +func lexSpace(l *lexer) stateFn { + var r rune + var numSpaces int + for { + r = l.peek() + if !isSpace(r) { + break + } + l.next() + numSpaces++ + } + // Be careful about a trim-marked closing delimiter, which has a minus + // after a space. We know there is a space, so check for the '-' that might follow. + if hasRightTrimMarker(l.input[l.pos-1:]) && strings.HasPrefix(l.input[l.pos-1+trimMarkerLen:], l.rightDelim) { + l.backup() // Before the space. + if numSpaces == 1 { + return lexRightDelim // On the delim, so go right to that. + } + } + l.emit(itemSpace) + return lexInsideAction +} + +// lexIdentifier scans an alphanumeric. +func lexIdentifier(l *lexer) stateFn { +Loop: + for { + switch r := l.next(); { + case isAlphaNumeric(r): + // absorb. + default: + l.backup() + word := l.input[l.start:l.pos] + if !l.atTerminator() { + return l.errorf("bad character %#U", r) + } + switch { + case key[word] > itemKeyword: + l.emit(key[word]) + case word[0] == '.': + l.emit(itemField) + case word == "true", word == "false": + l.emit(itemBool) + default: + l.emit(itemIdentifier) + } + break Loop + } + } + return lexInsideAction +} + +// lexField scans a field: .Alphanumeric. +// The . has been scanned. +func lexField(l *lexer) stateFn { + return lexFieldOrVariable(l, itemField) +} + +// lexVariable scans a Variable: $Alphanumeric. +// The $ has been scanned. +func lexVariable(l *lexer) stateFn { + if l.atTerminator() { // Nothing interesting follows -> "$". + l.emit(itemVariable) + return lexInsideAction + } + return lexFieldOrVariable(l, itemVariable) +} + +// lexVariable scans a field or variable: [.$]Alphanumeric. +// The . or $ has been scanned. +func lexFieldOrVariable(l *lexer, typ itemType) stateFn { + if l.atTerminator() { // Nothing interesting follows -> "." or "$". + if typ == itemVariable { + l.emit(itemVariable) + } else { + l.emit(itemDot) + } + return lexInsideAction + } + var r rune + for { + r = l.next() + if !isAlphaNumeric(r) { + l.backup() + break + } + } + if !l.atTerminator() { + return l.errorf("bad character %#U", r) + } + l.emit(typ) + return lexInsideAction +} + +// atTerminator reports whether the input is at valid termination character to +// appear after an identifier. Breaks .X.Y into two pieces. Also catches cases +// like "$x+2" not being acceptable without a space, in case we decide one +// day to implement arithmetic. +func (l *lexer) atTerminator() bool { + r := l.peek() + if isSpace(r) { + return true + } + switch r { + case eof, '.', ',', '|', ':', ')', '(': + return true + } + // Does r start the delimiter? This can be ambiguous (with delim=="//", $x/2 will + // succeed but should fail) but only in extremely rare cases caused by willfully + // bad choice of delimiter. + if rd, _ := utf8.DecodeRuneInString(l.rightDelim); rd == r { + return true + } + return false +} + +// lexChar scans a character constant. The initial quote is already +// scanned. Syntax checking is done by the parser. +func lexChar(l *lexer) stateFn { +Loop: + for { + switch l.next() { + case '\\': + if r := l.next(); r != eof && r != '\n' { + break + } + fallthrough + case eof, '\n': + return l.errorf("unterminated character constant") + case '\'': + break Loop + } + } + l.emit(itemCharConstant) + return lexInsideAction +} + +// lexNumber scans a number: decimal, octal, hex, float, or imaginary. This +// isn't a perfect number scanner - for instance it accepts "." and "0x0.2" +// and "089" - but when it's wrong the input is invalid and the parser (via +// strconv) will notice. +func lexNumber(l *lexer) stateFn { + if !l.scanNumber() { + return l.errorf("bad number syntax: %q", l.input[l.start:l.pos]) + } + if sign := l.peek(); sign == '+' || sign == '-' { + // Complex: 1+2i. No spaces, must end in 'i'. + if !l.scanNumber() || l.input[l.pos-1] != 'i' { + return l.errorf("bad number syntax: %q", l.input[l.start:l.pos]) + } + l.emit(itemComplex) + } else { + l.emit(itemNumber) + } + return lexInsideAction +} + +func (l *lexer) scanNumber() bool { + // Optional leading sign. + l.accept("+-") + // Is it hex? + digits := "0123456789_" + if l.accept("0") { + // Note: Leading 0 does not mean octal in floats. + if l.accept("xX") { + digits = "0123456789abcdefABCDEF_" + } else if l.accept("oO") { + digits = "01234567_" + } else if l.accept("bB") { + digits = "01_" + } + } + l.acceptRun(digits) + if l.accept(".") { + l.acceptRun(digits) + } + if len(digits) == 10+1 && l.accept("eE") { + l.accept("+-") + l.acceptRun("0123456789_") + } + if len(digits) == 16+6+1 && l.accept("pP") { + l.accept("+-") + l.acceptRun("0123456789_") + } + // Is it imaginary? + l.accept("i") + // Next thing mustn't be alphanumeric. + if isAlphaNumeric(l.peek()) { + l.next() + return false + } + return true +} + +// lexQuote scans a quoted string. +func lexQuote(l *lexer) stateFn { +Loop: + for { + switch l.next() { + case '\\': + if r := l.next(); r != eof && r != '\n' { + break + } + fallthrough + case eof, '\n': + return l.errorf("unterminated quoted string") + case '"': + break Loop + } + } + l.emit(itemString) + return lexInsideAction +} + +// lexRawQuote scans a raw quoted string. +func lexRawQuote(l *lexer) stateFn { +Loop: + for { + switch l.next() { + case eof: + return l.errorf("unterminated raw quoted string") + case '`': + break Loop + } + } + l.emit(itemRawString) + return lexInsideAction +} + +// isSpace reports whether r is a space character. +func isSpace(r rune) bool { + return r == ' ' || r == '\t' || r == '\r' || r == '\n' +} + +// isAlphaNumeric reports whether r is an alphabetic, digit, or underscore. +func isAlphaNumeric(r rune) bool { + return r == '_' || unicode.IsLetter(r) || unicode.IsDigit(r) +} + +func hasLeftTrimMarker(s string) bool { + return len(s) >= 2 && s[0] == trimMarker && isSpace(rune(s[1])) +} + +func hasRightTrimMarker(s string) bool { + return len(s) >= 2 && isSpace(rune(s[0])) && s[1] == trimMarker +} diff --git a/go.dev/cmd/internal/tmplfunc/internal/parse/lex_test.go b/go.dev/cmd/internal/tmplfunc/internal/parse/lex_test.go new file mode 100644 index 00000000..6510eed6 --- /dev/null +++ b/go.dev/cmd/internal/tmplfunc/internal/parse/lex_test.go @@ -0,0 +1,557 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package parse + +import ( + "fmt" + "testing" +) + +// Make the types prettyprint. +var itemName = map[itemType]string{ + itemError: "error", + itemBool: "bool", + itemChar: "char", + itemCharConstant: "charconst", + itemComment: "comment", + itemComplex: "complex", + itemDeclare: ":=", + itemEOF: "EOF", + itemField: "field", + itemIdentifier: "identifier", + itemLeftDelim: "left delim", + itemLeftParen: "(", + itemNumber: "number", + itemPipe: "pipe", + itemRawString: "raw string", + itemRightDelim: "right delim", + itemRightParen: ")", + itemSpace: "space", + itemString: "string", + itemVariable: "variable", + + // keywords + itemDot: ".", + itemBlock: "block", + itemDefine: "define", + itemElse: "else", + itemIf: "if", + itemEnd: "end", + itemNil: "nil", + itemRange: "range", + itemTemplate: "template", + itemWith: "with", +} + +func (i itemType) String() string { + s := itemName[i] + if s == "" { + return fmt.Sprintf("item%d", int(i)) + } + return s +} + +type lexTest struct { + name string + input string + items []item +} + +func mkItem(typ itemType, text string) item { + return item{ + typ: typ, + val: text, + } +} + +var ( + tDot = mkItem(itemDot, ".") + tBlock = mkItem(itemBlock, "block") + tEOF = mkItem(itemEOF, "") + tFor = mkItem(itemIdentifier, "for") + tLeft = mkItem(itemLeftDelim, "{{") + tLpar = mkItem(itemLeftParen, "(") + tPipe = mkItem(itemPipe, "|") + tQuote = mkItem(itemString, `"abc \n\t\" "`) + tRange = mkItem(itemRange, "range") + tRight = mkItem(itemRightDelim, "}}") + tRpar = mkItem(itemRightParen, ")") + tSpace = mkItem(itemSpace, " ") + raw = "`" + `abc\n\t\" ` + "`" + rawNL = "`now is{{\n}}the time`" // Contains newline inside raw quote. + tRawQuote = mkItem(itemRawString, raw) + tRawQuoteNL = mkItem(itemRawString, rawNL) +) + +var lexTests = []lexTest{ + {"empty", "", []item{tEOF}}, + {"spaces", " \t\n", []item{mkItem(itemText, " \t\n"), tEOF}}, + {"text", `now is the time`, []item{mkItem(itemText, "now is the time"), tEOF}}, + {"text with comment", "hello-{{/* this is a comment */}}-world", []item{ + mkItem(itemText, "hello-"), + mkItem(itemComment, "/* this is a comment */"), + mkItem(itemText, "-world"), + tEOF, + }}, + {"punctuation", "{{,@% }}", []item{ + tLeft, + mkItem(itemChar, ","), + mkItem(itemChar, "@"), + mkItem(itemChar, "%"), + tSpace, + tRight, + tEOF, + }}, + {"parens", "{{((3))}}", []item{ + tLeft, + tLpar, + tLpar, + mkItem(itemNumber, "3"), + tRpar, + tRpar, + tRight, + tEOF, + }}, + {"empty action", `{{}}`, []item{tLeft, tRight, tEOF}}, + {"for", `{{for}}`, []item{tLeft, tFor, tRight, tEOF}}, + {"block", `{{block "foo" .}}`, []item{ + tLeft, tBlock, tSpace, mkItem(itemString, `"foo"`), tSpace, tDot, tRight, tEOF, + }}, + {"quote", `{{"abc \n\t\" "}}`, []item{tLeft, tQuote, tRight, tEOF}}, + {"raw quote", "{{" + raw + "}}", []item{tLeft, tRawQuote, tRight, tEOF}}, + {"raw quote with newline", "{{" + rawNL + "}}", []item{tLeft, tRawQuoteNL, tRight, tEOF}}, + {"numbers", "{{1 02 0x14 0X14 -7.2i 1e3 1E3 +1.2e-4 4.2i 1+2i 1_2 0x1.e_fp4 0X1.E_FP4}}", []item{ + tLeft, + mkItem(itemNumber, "1"), + tSpace, + mkItem(itemNumber, "02"), + tSpace, + mkItem(itemNumber, "0x14"), + tSpace, + mkItem(itemNumber, "0X14"), + tSpace, + mkItem(itemNumber, "-7.2i"), + tSpace, + mkItem(itemNumber, "1e3"), + tSpace, + mkItem(itemNumber, "1E3"), + tSpace, + mkItem(itemNumber, "+1.2e-4"), + tSpace, + mkItem(itemNumber, "4.2i"), + tSpace, + mkItem(itemComplex, "1+2i"), + tSpace, + mkItem(itemNumber, "1_2"), + tSpace, + mkItem(itemNumber, "0x1.e_fp4"), + tSpace, + mkItem(itemNumber, "0X1.E_FP4"), + tRight, + tEOF, + }}, + {"characters", `{{'a' '\n' '\'' '\\' '\u00FF' '\xFF' '本'}}`, []item{ + tLeft, + mkItem(itemCharConstant, `'a'`), + tSpace, + mkItem(itemCharConstant, `'\n'`), + tSpace, + mkItem(itemCharConstant, `'\''`), + tSpace, + mkItem(itemCharConstant, `'\\'`), + tSpace, + mkItem(itemCharConstant, `'\u00FF'`), + tSpace, + mkItem(itemCharConstant, `'\xFF'`), + tSpace, + mkItem(itemCharConstant, `'本'`), + tRight, + tEOF, + }}, + {"bools", "{{true false}}", []item{ + tLeft, + mkItem(itemBool, "true"), + tSpace, + mkItem(itemBool, "false"), + tRight, + tEOF, + }}, + {"dot", "{{.}}", []item{ + tLeft, + tDot, + tRight, + tEOF, + }}, + {"nil", "{{nil}}", []item{ + tLeft, + mkItem(itemNil, "nil"), + tRight, + tEOF, + }}, + {"dots", "{{.x . .2 .x.y.z}}", []item{ + tLeft, + mkItem(itemField, ".x"), + tSpace, + tDot, + tSpace, + mkItem(itemNumber, ".2"), + tSpace, + mkItem(itemField, ".x"), + mkItem(itemField, ".y"), + mkItem(itemField, ".z"), + tRight, + tEOF, + }}, + {"keywords", "{{range if else end with}}", []item{ + tLeft, + mkItem(itemRange, "range"), + tSpace, + mkItem(itemIf, "if"), + tSpace, + mkItem(itemElse, "else"), + tSpace, + mkItem(itemEnd, "end"), + tSpace, + mkItem(itemWith, "with"), + tRight, + tEOF, + }}, + {"variables", "{{$c := printf $ $hello $23 $ $var.Field .Method}}", []item{ + tLeft, + mkItem(itemVariable, "$c"), + tSpace, + mkItem(itemDeclare, ":="), + tSpace, + mkItem(itemIdentifier, "printf"), + tSpace, + mkItem(itemVariable, "$"), + tSpace, + mkItem(itemVariable, "$hello"), + tSpace, + mkItem(itemVariable, "$23"), + tSpace, + mkItem(itemVariable, "$"), + tSpace, + mkItem(itemVariable, "$var"), + mkItem(itemField, ".Field"), + tSpace, + mkItem(itemField, ".Method"), + tRight, + tEOF, + }}, + {"variable invocation", "{{$x 23}}", []item{ + tLeft, + mkItem(itemVariable, "$x"), + tSpace, + mkItem(itemNumber, "23"), + tRight, + tEOF, + }}, + {"pipeline", `intro {{echo hi 1.2 |noargs|args 1 "hi"}} outro`, []item{ + mkItem(itemText, "intro "), + tLeft, + mkItem(itemIdentifier, "echo"), + tSpace, + mkItem(itemIdentifier, "hi"), + tSpace, + mkItem(itemNumber, "1.2"), + tSpace, + tPipe, + mkItem(itemIdentifier, "noargs"), + tPipe, + mkItem(itemIdentifier, "args"), + tSpace, + mkItem(itemNumber, "1"), + tSpace, + mkItem(itemString, `"hi"`), + tRight, + mkItem(itemText, " outro"), + tEOF, + }}, + {"declaration", "{{$v := 3}}", []item{ + tLeft, + mkItem(itemVariable, "$v"), + tSpace, + mkItem(itemDeclare, ":="), + tSpace, + mkItem(itemNumber, "3"), + tRight, + tEOF, + }}, + {"2 declarations", "{{$v , $w := 3}}", []item{ + tLeft, + mkItem(itemVariable, "$v"), + tSpace, + mkItem(itemChar, ","), + tSpace, + mkItem(itemVariable, "$w"), + tSpace, + mkItem(itemDeclare, ":="), + tSpace, + mkItem(itemNumber, "3"), + tRight, + tEOF, + }}, + {"field of parenthesized expression", "{{(.X).Y}}", []item{ + tLeft, + tLpar, + mkItem(itemField, ".X"), + tRpar, + mkItem(itemField, ".Y"), + tRight, + tEOF, + }}, + {"trimming spaces before and after", "hello- {{- 3 -}} -world", []item{ + mkItem(itemText, "hello-"), + tLeft, + mkItem(itemNumber, "3"), + tRight, + mkItem(itemText, "-world"), + tEOF, + }}, + {"trimming spaces before and after comment", "hello- {{- /* hello */ -}} -world", []item{ + mkItem(itemText, "hello-"), + mkItem(itemComment, "/* hello */"), + mkItem(itemText, "-world"), + tEOF, + }}, + // errors + {"badchar", "#{{\x01}}", []item{ + mkItem(itemText, "#"), + tLeft, + mkItem(itemError, "unrecognized character in action: U+0001"), + }}, + {"unclosed action", "{{", []item{ + tLeft, + mkItem(itemError, "unclosed action"), + }}, + {"EOF in action", "{{range", []item{ + tLeft, + tRange, + mkItem(itemError, "unclosed action"), + }}, + {"unclosed quote", "{{\"\n\"}}", []item{ + tLeft, + mkItem(itemError, "unterminated quoted string"), + }}, + {"unclosed raw quote", "{{`xx}}", []item{ + tLeft, + mkItem(itemError, "unterminated raw quoted string"), + }}, + {"unclosed char constant", "{{'\n}}", []item{ + tLeft, + mkItem(itemError, "unterminated character constant"), + }}, + {"bad number", "{{3k}}", []item{ + tLeft, + mkItem(itemError, `bad number syntax: "3k"`), + }}, + {"unclosed paren", "{{(3}}", []item{ + tLeft, + tLpar, + mkItem(itemNumber, "3"), + mkItem(itemError, `unclosed left paren`), + }}, + {"extra right paren", "{{3)}}", []item{ + tLeft, + mkItem(itemNumber, "3"), + tRpar, + mkItem(itemError, `unexpected right paren U+0029 ')'`), + }}, + + // Fixed bugs + // Many elements in an action blew the lookahead until + // we made lexInsideAction not loop. + {"long pipeline deadlock", "{{|||||}}", []item{ + tLeft, + tPipe, + tPipe, + tPipe, + tPipe, + tPipe, + tRight, + tEOF, + }}, + {"text with bad comment", "hello-{{/*/}}-world", []item{ + mkItem(itemText, "hello-"), + mkItem(itemError, `unclosed comment`), + }}, + {"text with comment close separated from delim", "hello-{{/* */ }}-world", []item{ + mkItem(itemText, "hello-"), + mkItem(itemError, `comment ends before closing delimiter`), + }}, + // This one is an error that we can't catch because it breaks templates with + // minimized JavaScript. Should have fixed it before Go 1.1. + {"unmatched right delimiter", "hello-{.}}-world", []item{ + mkItem(itemText, "hello-{.}}-world"), + tEOF, + }}, +} + +// collect gathers the emitted items into a slice. +func collect(t *lexTest, left, right string) (items []item) { + l := lex(t.name, t.input, left, right, true) + for { + item := l.nextItem() + items = append(items, item) + if item.typ == itemEOF || item.typ == itemError { + break + } + } + return +} + +func equal(i1, i2 []item, checkPos bool) bool { + if len(i1) != len(i2) { + return false + } + for k := range i1 { + if i1[k].typ != i2[k].typ { + return false + } + if i1[k].val != i2[k].val { + return false + } + if checkPos && i1[k].pos != i2[k].pos { + return false + } + if checkPos && i1[k].line != i2[k].line { + return false + } + } + return true +} + +func TestLex(t *testing.T) { + for _, test := range lexTests { + items := collect(&test, "", "") + if !equal(items, test.items, false) { + t.Errorf("%s: got\n\t%+v\nexpected\n\t%v", test.name, items, test.items) + } + } +} + +// Some easy cases from above, but with delimiters $$ and @@ +var lexDelimTests = []lexTest{ + {"punctuation", "$$,@%{{}}@@", []item{ + tLeftDelim, + mkItem(itemChar, ","), + mkItem(itemChar, "@"), + mkItem(itemChar, "%"), + mkItem(itemChar, "{"), + mkItem(itemChar, "{"), + mkItem(itemChar, "}"), + mkItem(itemChar, "}"), + tRightDelim, + tEOF, + }}, + {"empty action", `$$@@`, []item{tLeftDelim, tRightDelim, tEOF}}, + {"for", `$$for@@`, []item{tLeftDelim, tFor, tRightDelim, tEOF}}, + {"quote", `$$"abc \n\t\" "@@`, []item{tLeftDelim, tQuote, tRightDelim, tEOF}}, + {"raw quote", "$$" + raw + "@@", []item{tLeftDelim, tRawQuote, tRightDelim, tEOF}}, +} + +var ( + tLeftDelim = mkItem(itemLeftDelim, "$$") + tRightDelim = mkItem(itemRightDelim, "@@") +) + +func TestDelims(t *testing.T) { + for _, test := range lexDelimTests { + items := collect(&test, "$$", "@@") + if !equal(items, test.items, false) { + t.Errorf("%s: got\n\t%v\nexpected\n\t%v", test.name, items, test.items) + } + } +} + +var lexPosTests = []lexTest{ + {"empty", "", []item{{itemEOF, 0, "", 1}}}, + {"punctuation", "{{,@%#}}", []item{ + {itemLeftDelim, 0, "{{", 1}, + {itemChar, 2, ",", 1}, + {itemChar, 3, "@", 1}, + {itemChar, 4, "%", 1}, + {itemChar, 5, "#", 1}, + {itemRightDelim, 6, "}}", 1}, + {itemEOF, 8, "", 1}, + }}, + {"sample", "0123{{hello}}xyz", []item{ + {itemText, 0, "0123", 1}, + {itemLeftDelim, 4, "{{", 1}, + {itemIdentifier, 6, "hello", 1}, + {itemRightDelim, 11, "}}", 1}, + {itemText, 13, "xyz", 1}, + {itemEOF, 16, "", 1}, + }}, + {"trimafter", "{{x -}}\n{{y}}", []item{ + {itemLeftDelim, 0, "{{", 1}, + {itemIdentifier, 2, "x", 1}, + {itemRightDelim, 5, "}}", 1}, + {itemLeftDelim, 8, "{{", 2}, + {itemIdentifier, 10, "y", 2}, + {itemRightDelim, 11, "}}", 2}, + {itemEOF, 13, "", 2}, + }}, + {"trimbefore", "{{x}}\n{{- y}}", []item{ + {itemLeftDelim, 0, "{{", 1}, + {itemIdentifier, 2, "x", 1}, + {itemRightDelim, 3, "}}", 1}, + {itemLeftDelim, 6, "{{", 2}, + {itemIdentifier, 10, "y", 2}, + {itemRightDelim, 11, "}}", 2}, + {itemEOF, 13, "", 2}, + }}, +} + +// The other tests don't check position, to make the test cases easier to construct. +// This one does. +func TestPos(t *testing.T) { + for _, test := range lexPosTests { + items := collect(&test, "", "") + if !equal(items, test.items, true) { + t.Errorf("%s: got\n\t%v\nexpected\n\t%v", test.name, items, test.items) + if len(items) == len(test.items) { + // Detailed print; avoid item.String() to expose the position value. + for i := range items { + if !equal(items[i:i+1], test.items[i:i+1], true) { + i1 := items[i] + i2 := test.items[i] + t.Errorf("\t#%d: got {%v %d %q %d} expected {%v %d %q %d}", + i, i1.typ, i1.pos, i1.val, i1.line, i2.typ, i2.pos, i2.val, i2.line) + } + } + } + } + } +} + +// Test that an error shuts down the lexing goroutine. +func TestShutdown(t *testing.T) { + // We need to duplicate template.Parse here to hold on to the lexer. + const text = "erroneous{{define}}{{else}}1234" + lexer := lex("foo", text, "{{", "}}", false) + _, err := New("root").parseLexer(lexer) + if err == nil { + t.Fatalf("expected error") + } + // The error should have drained the input. Therefore, the lexer should be shut down. + token, ok := <-lexer.items + if ok { + t.Fatalf("input was not drained; got %v", token) + } +} + +// parseLexer is a local version of parse that lets us pass in the lexer instead of building it. +// We expect an error, so the tree set and funcs list are explicitly nil. +func (t *Tree) parseLexer(lex *lexer) (tree *Tree, err error) { + defer t.recover(&err) + t.ParseName = t.Name + t.startParse(nil, lex, map[string]*Tree{}) + t.parse() + t.add() + t.stopParse() + return t, nil +} diff --git a/go.dev/cmd/internal/tmplfunc/internal/parse/node.go b/go.dev/cmd/internal/tmplfunc/internal/parse/node.go new file mode 100644 index 00000000..177482f9 --- /dev/null +++ b/go.dev/cmd/internal/tmplfunc/internal/parse/node.go @@ -0,0 +1,972 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Parse nodes. + +package parse + +import ( + "fmt" + "strconv" + "strings" +) + +var textFormat = "%s" // Changed to "%q" in tests for better error messages. + +// A Node is an element in the parse tree. The interface is trivial. +// The interface contains an unexported method so that only +// types local to this package can satisfy it. +type Node interface { + Type() NodeType + String() string + // Copy does a deep copy of the Node and all its components. + // To avoid type assertions, some XxxNodes also have specialized + // CopyXxx methods that return *XxxNode. + Copy() Node + Position() Pos // byte position of start of node in full original input string + // tree returns the containing *Tree. + // It is unexported so all implementations of Node are in this package. + tree() *Tree + // writeTo writes the String output to the builder. + writeTo(*strings.Builder) +} + +// NodeType identifies the type of a parse tree node. +type NodeType int + +// Pos represents a byte position in the original input text from which +// this template was parsed. +type Pos int + +func (p Pos) Position() Pos { + return p +} + +// Type returns itself and provides an easy default implementation +// for embedding in a Node. Embedded in all non-trivial Nodes. +func (t NodeType) Type() NodeType { + return t +} + +const ( + NodeText NodeType = iota // Plain text. + NodeAction // A non-control action such as a field evaluation. + NodeBool // A boolean constant. + NodeChain // A sequence of field accesses. + NodeCommand // An element of a pipeline. + NodeDot // The cursor, dot. + nodeElse // An else action. Not added to tree. + nodeEnd // An end action. Not added to tree. + NodeField // A field or method name. + NodeIdentifier // An identifier; always a function name. + NodeIf // An if action. + NodeList // A list of Nodes. + NodeNil // An untyped nil constant. + NodeNumber // A numerical constant. + NodePipe // A pipeline of commands. + NodeRange // A range action. + NodeString // A string constant. + NodeTemplate // A template invocation action. + NodeVariable // A $ variable. + NodeWith // A with action. + NodeComment // A comment. +) + +// Nodes. + +// ListNode holds a sequence of nodes. +type ListNode struct { + NodeType + Pos + tr *Tree + Nodes []Node // The element nodes in lexical order. +} + +func (t *Tree) newList(pos Pos) *ListNode { + return &ListNode{tr: t, NodeType: NodeList, Pos: pos} +} + +func (l *ListNode) append(n Node) { + l.Nodes = append(l.Nodes, n) +} + +func (l *ListNode) tree() *Tree { + return l.tr +} + +func (l *ListNode) String() string { + var sb strings.Builder + l.writeTo(&sb) + return sb.String() +} + +func (l *ListNode) writeTo(sb *strings.Builder) { + for _, n := range l.Nodes { + n.writeTo(sb) + } +} + +func (l *ListNode) CopyList() *ListNode { + if l == nil { + return l + } + n := l.tr.newList(l.Pos) + for _, elem := range l.Nodes { + n.append(elem.Copy()) + } + return n +} + +func (l *ListNode) Copy() Node { + return l.CopyList() +} + +// TextNode holds plain text. +type TextNode struct { + NodeType + Pos + tr *Tree + Text []byte // The text; may span newlines. +} + +func (t *Tree) newText(pos Pos, text string) *TextNode { + return &TextNode{tr: t, NodeType: NodeText, Pos: pos, Text: []byte(text)} +} + +func (t *TextNode) String() string { + return fmt.Sprintf(textFormat, t.Text) +} + +func (t *TextNode) writeTo(sb *strings.Builder) { + sb.WriteString(t.String()) +} + +func (t *TextNode) tree() *Tree { + return t.tr +} + +func (t *TextNode) Copy() Node { + return &TextNode{tr: t.tr, NodeType: NodeText, Pos: t.Pos, Text: append([]byte{}, t.Text...)} +} + +// CommentNode holds a comment. +type CommentNode struct { + NodeType + Pos + tr *Tree + Text string // Comment text. +} + +func (t *Tree) newComment(pos Pos, text string) *CommentNode { + return &CommentNode{tr: t, NodeType: NodeComment, Pos: pos, Text: text} +} + +func (c *CommentNode) String() string { + var sb strings.Builder + c.writeTo(&sb) + return sb.String() +} + +func (c *CommentNode) writeTo(sb *strings.Builder) { + sb.WriteString("{{") + sb.WriteString(c.Text) + sb.WriteString("}}") +} + +func (c *CommentNode) tree() *Tree { + return c.tr +} + +func (c *CommentNode) Copy() Node { + return &CommentNode{tr: c.tr, NodeType: NodeComment, Pos: c.Pos, Text: c.Text} +} + +// PipeNode holds a pipeline with optional declaration +type PipeNode struct { + NodeType + Pos + tr *Tree + Line int // The line number in the input. Deprecated: Kept for compatibility. + IsAssign bool // The variables are being assigned, not declared. + Decl []*VariableNode // Variables in lexical order. + Cmds []*CommandNode // The commands in lexical order. +} + +func (t *Tree) newPipeline(pos Pos, line int, vars []*VariableNode) *PipeNode { + return &PipeNode{tr: t, NodeType: NodePipe, Pos: pos, Line: line, Decl: vars} +} + +func (p *PipeNode) append(command *CommandNode) { + p.Cmds = append(p.Cmds, command) +} + +func (p *PipeNode) String() string { + var sb strings.Builder + p.writeTo(&sb) + return sb.String() +} + +func (p *PipeNode) writeTo(sb *strings.Builder) { + if len(p.Decl) > 0 { + for i, v := range p.Decl { + if i > 0 { + sb.WriteString(", ") + } + v.writeTo(sb) + } + sb.WriteString(" := ") + } + for i, c := range p.Cmds { + if i > 0 { + sb.WriteString(" | ") + } + c.writeTo(sb) + } +} + +func (p *PipeNode) tree() *Tree { + return p.tr +} + +func (p *PipeNode) CopyPipe() *PipeNode { + if p == nil { + return p + } + vars := make([]*VariableNode, len(p.Decl)) + for i, d := range p.Decl { + vars[i] = d.Copy().(*VariableNode) + } + n := p.tr.newPipeline(p.Pos, p.Line, vars) + n.IsAssign = p.IsAssign + for _, c := range p.Cmds { + n.append(c.Copy().(*CommandNode)) + } + return n +} + +func (p *PipeNode) Copy() Node { + return p.CopyPipe() +} + +// ActionNode holds an action (something bounded by delimiters). +// Control actions have their own nodes; ActionNode represents simple +// ones such as field evaluations and parenthesized pipelines. +type ActionNode struct { + NodeType + Pos + tr *Tree + Line int // The line number in the input. Deprecated: Kept for compatibility. + Pipe *PipeNode // The pipeline in the action. +} + +func (t *Tree) newAction(pos Pos, line int, pipe *PipeNode) *ActionNode { + return &ActionNode{tr: t, NodeType: NodeAction, Pos: pos, Line: line, Pipe: pipe} +} + +func (a *ActionNode) String() string { + var sb strings.Builder + a.writeTo(&sb) + return sb.String() +} + +func (a *ActionNode) writeTo(sb *strings.Builder) { + sb.WriteString("{{") + a.Pipe.writeTo(sb) + sb.WriteString("}}") +} + +func (a *ActionNode) tree() *Tree { + return a.tr +} + +func (a *ActionNode) Copy() Node { + return a.tr.newAction(a.Pos, a.Line, a.Pipe.CopyPipe()) + +} + +// CommandNode holds a command (a pipeline inside an evaluating action). +type CommandNode struct { + NodeType + Pos + tr *Tree + Args []Node // Arguments in lexical order: Identifier, field, or constant. +} + +func (t *Tree) newCommand(pos Pos) *CommandNode { + return &CommandNode{tr: t, NodeType: NodeCommand, Pos: pos} +} + +func (c *CommandNode) append(arg Node) { + c.Args = append(c.Args, arg) +} + +func (c *CommandNode) String() string { + var sb strings.Builder + c.writeTo(&sb) + return sb.String() +} + +func (c *CommandNode) writeTo(sb *strings.Builder) { + for i, arg := range c.Args { + if i > 0 { + sb.WriteByte(' ') + } + if arg, ok := arg.(*PipeNode); ok { + sb.WriteByte('(') + arg.writeTo(sb) + sb.WriteByte(')') + continue + } + arg.writeTo(sb) + } +} + +func (c *CommandNode) tree() *Tree { + return c.tr +} + +func (c *CommandNode) Copy() Node { + if c == nil { + return c + } + n := c.tr.newCommand(c.Pos) + for _, c := range c.Args { + n.append(c.Copy()) + } + return n +} + +// IdentifierNode holds an identifier. +type IdentifierNode struct { + NodeType + Pos + tr *Tree + Ident string // The identifier's name. +} + +// NewIdentifier returns a new IdentifierNode with the given identifier name. +func NewIdentifier(ident string) *IdentifierNode { + return &IdentifierNode{NodeType: NodeIdentifier, Ident: ident} +} + +// SetPos sets the position. NewIdentifier is a public method so we can't modify its signature. +// Chained for convenience. +// TODO: fix one day? +func (i *IdentifierNode) SetPos(pos Pos) *IdentifierNode { + i.Pos = pos + return i +} + +// SetTree sets the parent tree for the node. NewIdentifier is a public method so we can't modify its signature. +// Chained for convenience. +// TODO: fix one day? +func (i *IdentifierNode) SetTree(t *Tree) *IdentifierNode { + i.tr = t + return i +} + +func (i *IdentifierNode) String() string { + return i.Ident +} + +func (i *IdentifierNode) writeTo(sb *strings.Builder) { + sb.WriteString(i.String()) +} + +func (i *IdentifierNode) tree() *Tree { + return i.tr +} + +func (i *IdentifierNode) Copy() Node { + return NewIdentifier(i.Ident).SetTree(i.tr).SetPos(i.Pos) +} + +// VariableNode holds a list of variable names, possibly with chained field +// accesses. The dollar sign is part of the (first) name. +type VariableNode struct { + NodeType + Pos + tr *Tree + Ident []string // Variable name and fields in lexical order. +} + +func (t *Tree) newVariable(pos Pos, ident string) *VariableNode { + return &VariableNode{tr: t, NodeType: NodeVariable, Pos: pos, Ident: strings.Split(ident, ".")} +} + +func (v *VariableNode) String() string { + var sb strings.Builder + v.writeTo(&sb) + return sb.String() +} + +func (v *VariableNode) writeTo(sb *strings.Builder) { + for i, id := range v.Ident { + if i > 0 { + sb.WriteByte('.') + } + sb.WriteString(id) + } +} + +func (v *VariableNode) tree() *Tree { + return v.tr +} + +func (v *VariableNode) Copy() Node { + return &VariableNode{tr: v.tr, NodeType: NodeVariable, Pos: v.Pos, Ident: append([]string{}, v.Ident...)} +} + +// DotNode holds the special identifier '.'. +type DotNode struct { + NodeType + Pos + tr *Tree +} + +func (t *Tree) newDot(pos Pos) *DotNode { + return &DotNode{tr: t, NodeType: NodeDot, Pos: pos} +} + +func (d *DotNode) Type() NodeType { + // Override method on embedded NodeType for API compatibility. + // TODO: Not really a problem; could change API without effect but + // api tool complains. + return NodeDot +} + +func (d *DotNode) String() string { + return "." +} + +func (d *DotNode) writeTo(sb *strings.Builder) { + sb.WriteString(d.String()) +} + +func (d *DotNode) tree() *Tree { + return d.tr +} + +func (d *DotNode) Copy() Node { + return d.tr.newDot(d.Pos) +} + +// NilNode holds the special identifier 'nil' representing an untyped nil constant. +type NilNode struct { + NodeType + Pos + tr *Tree +} + +func (t *Tree) newNil(pos Pos) *NilNode { + return &NilNode{tr: t, NodeType: NodeNil, Pos: pos} +} + +func (n *NilNode) Type() NodeType { + // Override method on embedded NodeType for API compatibility. + // TODO: Not really a problem; could change API without effect but + // api tool complains. + return NodeNil +} + +func (n *NilNode) String() string { + return "nil" +} + +func (n *NilNode) writeTo(sb *strings.Builder) { + sb.WriteString(n.String()) +} + +func (n *NilNode) tree() *Tree { + return n.tr +} + +func (n *NilNode) Copy() Node { + return n.tr.newNil(n.Pos) +} + +// FieldNode holds a field (identifier starting with '.'). +// The names may be chained ('.x.y'). +// The period is dropped from each ident. +type FieldNode struct { + NodeType + Pos + tr *Tree + Ident []string // The identifiers in lexical order. +} + +func (t *Tree) newField(pos Pos, ident string) *FieldNode { + return &FieldNode{tr: t, NodeType: NodeField, Pos: pos, Ident: strings.Split(ident[1:], ".")} // [1:] to drop leading period +} + +func (f *FieldNode) String() string { + var sb strings.Builder + f.writeTo(&sb) + return sb.String() +} + +func (f *FieldNode) writeTo(sb *strings.Builder) { + for _, id := range f.Ident { + sb.WriteByte('.') + sb.WriteString(id) + } +} + +func (f *FieldNode) tree() *Tree { + return f.tr +} + +func (f *FieldNode) Copy() Node { + return &FieldNode{tr: f.tr, NodeType: NodeField, Pos: f.Pos, Ident: append([]string{}, f.Ident...)} +} + +// ChainNode holds a term followed by a chain of field accesses (identifier starting with '.'). +// The names may be chained ('.x.y'). +// The periods are dropped from each ident. +type ChainNode struct { + NodeType + Pos + tr *Tree + Node Node + Field []string // The identifiers in lexical order. +} + +func (t *Tree) newChain(pos Pos, node Node) *ChainNode { + return &ChainNode{tr: t, NodeType: NodeChain, Pos: pos, Node: node} +} + +// Add adds the named field (which should start with a period) to the end of the chain. +func (c *ChainNode) Add(field string) { + if len(field) == 0 || field[0] != '.' { + panic("no dot in field") + } + field = field[1:] // Remove leading dot. + if field == "" { + panic("empty field") + } + c.Field = append(c.Field, field) +} + +func (c *ChainNode) String() string { + var sb strings.Builder + c.writeTo(&sb) + return sb.String() +} + +func (c *ChainNode) writeTo(sb *strings.Builder) { + if _, ok := c.Node.(*PipeNode); ok { + sb.WriteByte('(') + c.Node.writeTo(sb) + sb.WriteByte(')') + } else { + c.Node.writeTo(sb) + } + for _, field := range c.Field { + sb.WriteByte('.') + sb.WriteString(field) + } +} + +func (c *ChainNode) tree() *Tree { + return c.tr +} + +func (c *ChainNode) Copy() Node { + return &ChainNode{tr: c.tr, NodeType: NodeChain, Pos: c.Pos, Node: c.Node, Field: append([]string{}, c.Field...)} +} + +// BoolNode holds a boolean constant. +type BoolNode struct { + NodeType + Pos + tr *Tree + True bool // The value of the boolean constant. +} + +func (t *Tree) newBool(pos Pos, true bool) *BoolNode { + return &BoolNode{tr: t, NodeType: NodeBool, Pos: pos, True: true} +} + +func (b *BoolNode) String() string { + if b.True { + return "true" + } + return "false" +} + +func (b *BoolNode) writeTo(sb *strings.Builder) { + sb.WriteString(b.String()) +} + +func (b *BoolNode) tree() *Tree { + return b.tr +} + +func (b *BoolNode) Copy() Node { + return b.tr.newBool(b.Pos, b.True) +} + +// NumberNode holds a number: signed or unsigned integer, float, or complex. +// The value is parsed and stored under all the types that can represent the value. +// This simulates in a small amount of code the behavior of Go's ideal constants. +type NumberNode struct { + NodeType + Pos + tr *Tree + IsInt bool // Number has an integral value. + IsUint bool // Number has an unsigned integral value. + IsFloat bool // Number has a floating-point value. + IsComplex bool // Number is complex. + Int64 int64 // The signed integer value. + Uint64 uint64 // The unsigned integer value. + Float64 float64 // The floating-point value. + Complex128 complex128 // The complex value. + Text string // The original textual representation from the input. +} + +func (t *Tree) newNumber(pos Pos, text string, typ itemType) (*NumberNode, error) { + n := &NumberNode{tr: t, NodeType: NodeNumber, Pos: pos, Text: text} + switch typ { + case itemCharConstant: + rune, _, tail, err := strconv.UnquoteChar(text[1:], text[0]) + if err != nil { + return nil, err + } + if tail != "'" { + return nil, fmt.Errorf("malformed character constant: %s", text) + } + n.Int64 = int64(rune) + n.IsInt = true + n.Uint64 = uint64(rune) + n.IsUint = true + n.Float64 = float64(rune) // odd but those are the rules. + n.IsFloat = true + return n, nil + case itemComplex: + // fmt.Sscan can parse the pair, so let it do the work. + if _, err := fmt.Sscan(text, &n.Complex128); err != nil { + return nil, err + } + n.IsComplex = true + n.simplifyComplex() + return n, nil + } + // Imaginary constants can only be complex unless they are zero. + if len(text) > 0 && text[len(text)-1] == 'i' { + f, err := strconv.ParseFloat(text[:len(text)-1], 64) + if err == nil { + n.IsComplex = true + n.Complex128 = complex(0, f) + n.simplifyComplex() + return n, nil + } + } + // Do integer test first so we get 0x123 etc. + u, err := strconv.ParseUint(text, 0, 64) // will fail for -0; fixed below. + if err == nil { + n.IsUint = true + n.Uint64 = u + } + i, err := strconv.ParseInt(text, 0, 64) + if err == nil { + n.IsInt = true + n.Int64 = i + if i == 0 { + n.IsUint = true // in case of -0. + n.Uint64 = u + } + } + // If an integer extraction succeeded, promote the float. + if n.IsInt { + n.IsFloat = true + n.Float64 = float64(n.Int64) + } else if n.IsUint { + n.IsFloat = true + n.Float64 = float64(n.Uint64) + } else { + f, err := strconv.ParseFloat(text, 64) + if err == nil { + // If we parsed it as a float but it looks like an integer, + // it's a huge number too large to fit in an int. Reject it. + if !strings.ContainsAny(text, ".eEpP") { + return nil, fmt.Errorf("integer overflow: %q", text) + } + n.IsFloat = true + n.Float64 = f + // If a floating-point extraction succeeded, extract the int if needed. + if !n.IsInt && float64(int64(f)) == f { + n.IsInt = true + n.Int64 = int64(f) + } + if !n.IsUint && float64(uint64(f)) == f { + n.IsUint = true + n.Uint64 = uint64(f) + } + } + } + if !n.IsInt && !n.IsUint && !n.IsFloat { + return nil, fmt.Errorf("illegal number syntax: %q", text) + } + return n, nil +} + +// simplifyComplex pulls out any other types that are represented by the complex number. +// These all require that the imaginary part be zero. +func (n *NumberNode) simplifyComplex() { + n.IsFloat = imag(n.Complex128) == 0 + if n.IsFloat { + n.Float64 = real(n.Complex128) + n.IsInt = float64(int64(n.Float64)) == n.Float64 + if n.IsInt { + n.Int64 = int64(n.Float64) + } + n.IsUint = float64(uint64(n.Float64)) == n.Float64 + if n.IsUint { + n.Uint64 = uint64(n.Float64) + } + } +} + +func (n *NumberNode) String() string { + return n.Text +} + +func (n *NumberNode) writeTo(sb *strings.Builder) { + sb.WriteString(n.String()) +} + +func (n *NumberNode) tree() *Tree { + return n.tr +} + +func (n *NumberNode) Copy() Node { + nn := new(NumberNode) + *nn = *n // Easy, fast, correct. + return nn +} + +// StringNode holds a string constant. The value has been "unquoted". +type StringNode struct { + NodeType + Pos + tr *Tree + Quoted string // The original text of the string, with quotes. + Text string // The string, after quote processing. +} + +func (t *Tree) newString(pos Pos, orig, text string) *StringNode { + return &StringNode{tr: t, NodeType: NodeString, Pos: pos, Quoted: orig, Text: text} +} + +func (s *StringNode) String() string { + return s.Quoted +} + +func (s *StringNode) writeTo(sb *strings.Builder) { + sb.WriteString(s.String()) +} + +func (s *StringNode) tree() *Tree { + return s.tr +} + +func (s *StringNode) Copy() Node { + return s.tr.newString(s.Pos, s.Quoted, s.Text) +} + +// endNode represents an {{end}} action. +// It does not appear in the final parse tree. +type endNode struct { + NodeType + Pos + tr *Tree +} + +func (t *Tree) newEnd(pos Pos) *endNode { + return &endNode{tr: t, NodeType: nodeEnd, Pos: pos} +} + +func (e *endNode) String() string { + return "{{end}}" +} + +func (e *endNode) writeTo(sb *strings.Builder) { + sb.WriteString(e.String()) +} + +func (e *endNode) tree() *Tree { + return e.tr +} + +func (e *endNode) Copy() Node { + return e.tr.newEnd(e.Pos) +} + +// elseNode represents an {{else}} action. Does not appear in the final tree. +type elseNode struct { + NodeType + Pos + tr *Tree + Line int // The line number in the input. Deprecated: Kept for compatibility. +} + +func (t *Tree) newElse(pos Pos, line int) *elseNode { + return &elseNode{tr: t, NodeType: nodeElse, Pos: pos, Line: line} +} + +func (e *elseNode) Type() NodeType { + return nodeElse +} + +func (e *elseNode) String() string { + return "{{else}}" +} + +func (e *elseNode) writeTo(sb *strings.Builder) { + sb.WriteString(e.String()) +} + +func (e *elseNode) tree() *Tree { + return e.tr +} + +func (e *elseNode) Copy() Node { + return e.tr.newElse(e.Pos, e.Line) +} + +// BranchNode is the common representation of if, range, and with. +type BranchNode struct { + NodeType + Pos + tr *Tree + Line int // The line number in the input. Deprecated: Kept for compatibility. + Pipe *PipeNode // The pipeline to be evaluated. + List *ListNode // What to execute if the value is non-empty. + ElseList *ListNode // What to execute if the value is empty (nil if absent). +} + +func (b *BranchNode) String() string { + var sb strings.Builder + b.writeTo(&sb) + return sb.String() +} + +func (b *BranchNode) writeTo(sb *strings.Builder) { + name := "" + switch b.NodeType { + case NodeIf: + name = "if" + case NodeRange: + name = "range" + case NodeWith: + name = "with" + default: + panic("unknown branch type") + } + sb.WriteString("{{") + sb.WriteString(name) + sb.WriteByte(' ') + b.Pipe.writeTo(sb) + sb.WriteString("}}") + b.List.writeTo(sb) + if b.ElseList != nil { + sb.WriteString("{{else}}") + b.ElseList.writeTo(sb) + } + sb.WriteString("{{end}}") +} + +func (b *BranchNode) tree() *Tree { + return b.tr +} + +func (b *BranchNode) Copy() Node { + switch b.NodeType { + case NodeIf: + return b.tr.newIf(b.Pos, b.Line, b.Pipe, b.List, b.ElseList) + case NodeRange: + return b.tr.newRange(b.Pos, b.Line, b.Pipe, b.List, b.ElseList) + case NodeWith: + return b.tr.newWith(b.Pos, b.Line, b.Pipe, b.List, b.ElseList) + default: + panic("unknown branch type") + } +} + +// IfNode represents an {{if}} action and its commands. +type IfNode struct { + BranchNode +} + +func (t *Tree) newIf(pos Pos, line int, pipe *PipeNode, list, elseList *ListNode) *IfNode { + return &IfNode{BranchNode{tr: t, NodeType: NodeIf, Pos: pos, Line: line, Pipe: pipe, List: list, ElseList: elseList}} +} + +func (i *IfNode) Copy() Node { + return i.tr.newIf(i.Pos, i.Line, i.Pipe.CopyPipe(), i.List.CopyList(), i.ElseList.CopyList()) +} + +// RangeNode represents a {{range}} action and its commands. +type RangeNode struct { + BranchNode +} + +func (t *Tree) newRange(pos Pos, line int, pipe *PipeNode, list, elseList *ListNode) *RangeNode { + return &RangeNode{BranchNode{tr: t, NodeType: NodeRange, Pos: pos, Line: line, Pipe: pipe, List: list, ElseList: elseList}} +} + +func (r *RangeNode) Copy() Node { + return r.tr.newRange(r.Pos, r.Line, r.Pipe.CopyPipe(), r.List.CopyList(), r.ElseList.CopyList()) +} + +// WithNode represents a {{with}} action and its commands. +type WithNode struct { + BranchNode +} + +func (t *Tree) newWith(pos Pos, line int, pipe *PipeNode, list, elseList *ListNode) *WithNode { + return &WithNode{BranchNode{tr: t, NodeType: NodeWith, Pos: pos, Line: line, Pipe: pipe, List: list, ElseList: elseList}} +} + +func (w *WithNode) Copy() Node { + return w.tr.newWith(w.Pos, w.Line, w.Pipe.CopyPipe(), w.List.CopyList(), w.ElseList.CopyList()) +} + +// TemplateNode represents a {{template}} action. +type TemplateNode struct { + NodeType + Pos + tr *Tree + Line int // The line number in the input. Deprecated: Kept for compatibility. + Name string // The name of the template (unquoted). + Pipe *PipeNode // The command to evaluate as dot for the template. +} + +func (t *Tree) newTemplate(pos Pos, line int, name string, pipe *PipeNode) *TemplateNode { + return &TemplateNode{tr: t, NodeType: NodeTemplate, Pos: pos, Line: line, Name: name, Pipe: pipe} +} + +func (t *TemplateNode) String() string { + var sb strings.Builder + t.writeTo(&sb) + return sb.String() +} + +func (t *TemplateNode) writeTo(sb *strings.Builder) { + sb.WriteString("{{template ") + sb.WriteString(strconv.Quote(t.Name)) + if t.Pipe != nil { + sb.WriteByte(' ') + t.Pipe.writeTo(sb) + } + sb.WriteString("}}") +} + +func (t *TemplateNode) tree() *Tree { + return t.tr +} + +func (t *TemplateNode) Copy() Node { + return t.tr.newTemplate(t.Pos, t.Line, t.Name, t.Pipe.CopyPipe()) +} diff --git a/go.dev/cmd/internal/tmplfunc/internal/parse/parse.go b/go.dev/cmd/internal/tmplfunc/internal/parse/parse.go new file mode 100644 index 00000000..1a63961c --- /dev/null +++ b/go.dev/cmd/internal/tmplfunc/internal/parse/parse.go @@ -0,0 +1,756 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package parse builds parse trees for templates as defined by text/template +// and html/template. Clients should use those packages to construct templates +// rather than this one, which provides shared internal data structures not +// intended for general use. +package parse + +import ( + "bytes" + "fmt" + "runtime" + "strconv" + "strings" +) + +// Tree is the representation of a single parsed template. +type Tree struct { + Name string // name of the template represented by the tree. + ParseName string // name of the top-level template during parsing, for error messages. + Root *ListNode // top-level root of the tree. + Mode Mode // parsing mode. + text string // text parsed to create the template (or its parent) + // Parsing only; cleared after parse. + funcs []map[string]interface{} + lex *lexer + token [3]item // three-token lookahead for parser. + peekCount int + vars []string // variables defined at the moment. + treeSet map[string]*Tree + actionLine int // line of left delim starting action + mode Mode +} + +// A mode value is a set of flags (or 0). Modes control parser behavior. +type Mode uint + +const ( + ParseComments Mode = 1 << iota // parse comments and add them to AST + SkipFuncCheck // do not check that functions are defined +) + +// Copy returns a copy of the Tree. Any parsing state is discarded. +func (t *Tree) Copy() *Tree { + if t == nil { + return nil + } + return &Tree{ + Name: t.Name, + ParseName: t.ParseName, + Root: t.Root.CopyList(), + text: t.text, + } +} + +// Parse returns a map from template name to parse.Tree, created by parsing the +// templates described in the argument string. The top-level template will be +// given the specified name. If an error is encountered, parsing stops and an +// empty map is returned with the error. +func Parse(name, text, leftDelim, rightDelim string, funcs ...map[string]interface{}) (map[string]*Tree, error) { + treeSet := make(map[string]*Tree) + t := New(name) + t.text = text + _, err := t.Parse(text, leftDelim, rightDelim, treeSet, funcs...) + return treeSet, err +} + +// next returns the next token. +func (t *Tree) next() item { + if t.peekCount > 0 { + t.peekCount-- + } else { + t.token[0] = t.lex.nextItem() + } + return t.token[t.peekCount] +} + +// backup backs the input stream up one token. +func (t *Tree) backup() { + t.peekCount++ +} + +// backup2 backs the input stream up two tokens. +// The zeroth token is already there. +func (t *Tree) backup2(t1 item) { + t.token[1] = t1 + t.peekCount = 2 +} + +// backup3 backs the input stream up three tokens +// The zeroth token is already there. +func (t *Tree) backup3(t2, t1 item) { // Reverse order: we're pushing back. + t.token[1] = t1 + t.token[2] = t2 + t.peekCount = 3 +} + +// peek returns but does not consume the next token. +func (t *Tree) peek() item { + if t.peekCount > 0 { + return t.token[t.peekCount-1] + } + t.peekCount = 1 + t.token[0] = t.lex.nextItem() + return t.token[0] +} + +// nextNonSpace returns the next non-space token. +func (t *Tree) nextNonSpace() (token item) { + for { + token = t.next() + if token.typ != itemSpace { + break + } + } + return token +} + +// peekNonSpace returns but does not consume the next non-space token. +func (t *Tree) peekNonSpace() item { + token := t.nextNonSpace() + t.backup() + return token +} + +// Parsing. + +// New allocates a new parse tree with the given name. +func New(name string, funcs ...map[string]interface{}) *Tree { + return &Tree{ + Name: name, + funcs: funcs, + } +} + +// ErrorContext returns a textual representation of the location of the node in the input text. +// The receiver is only used when the node does not have a pointer to the tree inside, +// which can occur in old code. +func (t *Tree) ErrorContext(n Node) (location, context string) { + pos := int(n.Position()) + tree := n.tree() + if tree == nil { + tree = t + } + text := tree.text[:pos] + byteNum := strings.LastIndex(text, "\n") + if byteNum == -1 { + byteNum = pos // On first line. + } else { + byteNum++ // After the newline. + byteNum = pos - byteNum + } + lineNum := 1 + strings.Count(text, "\n") + context = n.String() + return fmt.Sprintf("%s:%d:%d", tree.ParseName, lineNum, byteNum), context +} + +// errorf formats the error and terminates processing. +func (t *Tree) errorf(format string, args ...interface{}) { + t.Root = nil + format = fmt.Sprintf("template: %s:%d: %s", t.ParseName, t.token[0].line, format) + panic(fmt.Errorf(format, args...)) +} + +// error terminates processing. +func (t *Tree) error(err error) { + t.errorf("%s", err) +} + +// expect consumes the next token and guarantees it has the required type. +func (t *Tree) expect(expected itemType, context string) item { + token := t.nextNonSpace() + if token.typ != expected { + t.unexpected(token, context) + } + return token +} + +// expectOneOf consumes the next token and guarantees it has one of the required types. +func (t *Tree) expectOneOf(expected1, expected2 itemType, context string) item { + token := t.nextNonSpace() + if token.typ != expected1 && token.typ != expected2 { + t.unexpected(token, context) + } + return token +} + +// unexpected complains about the token and terminates processing. +func (t *Tree) unexpected(token item, context string) { + if token.typ == itemError { + extra := "" + if t.actionLine != 0 && t.actionLine != token.line { + extra = fmt.Sprintf(" in action started at %s:%d", t.ParseName, t.actionLine) + if strings.HasSuffix(token.val, " action") { + extra = extra[len(" in action"):] // avoid "action in action" + } + } + t.errorf("%s%s", token, extra) + } + t.errorf("unexpected %s in %s", token, context) +} + +// recover is the handler that turns panics into returns from the top level of Parse. +func (t *Tree) recover(errp *error) { + e := recover() + if e != nil { + if _, ok := e.(runtime.Error); ok { + panic(e) + } + if t != nil { + t.lex.drain() + t.stopParse() + } + *errp = e.(error) + } +} + +// startParse initializes the parser, using the lexer. +func (t *Tree) startParse(funcs []map[string]interface{}, lex *lexer, treeSet map[string]*Tree) { + t.Root = nil + t.lex = lex + t.vars = []string{"$"} + t.funcs = funcs + t.treeSet = treeSet +} + +// stopParse terminates parsing. +func (t *Tree) stopParse() { + t.lex = nil + t.vars = nil + t.funcs = nil + t.treeSet = nil +} + +// Parse parses the template definition string to construct a representation of +// the template for execution. If either action delimiter string is empty, the +// default ("{{" or "}}") is used. Embedded template definitions are added to +// the treeSet map. +func (t *Tree) Parse(text, leftDelim, rightDelim string, treeSet map[string]*Tree, funcs ...map[string]interface{}) (tree *Tree, err error) { + defer t.recover(&err) + t.ParseName = t.Name + emitComment := t.Mode&ParseComments != 0 + t.startParse(funcs, lex(t.Name, text, leftDelim, rightDelim, emitComment), treeSet) + t.text = text + t.parse() + t.add() + t.stopParse() + return t, nil +} + +// add adds tree to t.treeSet. +func (t *Tree) add() { + tree := t.treeSet[t.Name] + if tree == nil || IsEmptyTree(tree.Root) { + t.treeSet[t.Name] = t + return + } + if !IsEmptyTree(t.Root) { + t.errorf("template: multiple definition of template %q", t.Name) + } +} + +// IsEmptyTree reports whether this tree (node) is empty of everything but space or comments. +func IsEmptyTree(n Node) bool { + switch n := n.(type) { + case nil: + return true + case *ActionNode: + case *CommentNode: + return true + case *IfNode: + case *ListNode: + for _, node := range n.Nodes { + if !IsEmptyTree(node) { + return false + } + } + return true + case *RangeNode: + case *TemplateNode: + case *TextNode: + return len(bytes.TrimSpace(n.Text)) == 0 + case *WithNode: + default: + panic("unknown node: " + n.String()) + } + return false +} + +// parse is the top-level parser for a template, essentially the same +// as itemList except it also parses {{define}} actions. +// It runs to EOF. +func (t *Tree) parse() { + t.Root = t.newList(t.peek().pos) + for t.peek().typ != itemEOF { + if t.peek().typ == itemLeftDelim { + delim := t.next() + if t.nextNonSpace().typ == itemDefine { + newT := New("definition") // name will be updated once we know it. + newT.text = t.text + newT.Mode = t.Mode + newT.ParseName = t.ParseName + newT.startParse(t.funcs, t.lex, t.treeSet) + newT.parseDefinition() + continue + } + t.backup2(delim) + } + switch n := t.textOrAction(); n.Type() { + case nodeEnd, nodeElse: + t.errorf("unexpected %s", n) + default: + t.Root.append(n) + } + } +} + +// parseDefinition parses a {{define}} ... {{end}} template definition and +// installs the definition in t.treeSet. The "define" keyword has already +// been scanned. +func (t *Tree) parseDefinition() { + const context = "define clause" + name := t.expectOneOf(itemString, itemRawString, context) + var err error + t.Name, err = strconv.Unquote(name.val) + if err != nil { + t.error(err) + } + t.expect(itemRightDelim, context) + var end Node + t.Root, end = t.itemList() + if end.Type() != nodeEnd { + t.errorf("unexpected %s in %s", end, context) + } + t.add() + t.stopParse() +} + +// itemList: +// textOrAction* +// Terminates at {{end}} or {{else}}, returned separately. +func (t *Tree) itemList() (list *ListNode, next Node) { + list = t.newList(t.peekNonSpace().pos) + for t.peekNonSpace().typ != itemEOF { + n := t.textOrAction() + switch n.Type() { + case nodeEnd, nodeElse: + return list, n + } + list.append(n) + } + t.errorf("unexpected EOF") + return +} + +// textOrAction: +// text | comment | action +func (t *Tree) textOrAction() Node { + switch token := t.nextNonSpace(); token.typ { + case itemText: + return t.newText(token.pos, token.val) + case itemLeftDelim: + t.actionLine = token.line + defer t.clearActionLine() + return t.action() + case itemComment: + return t.newComment(token.pos, token.val) + default: + t.unexpected(token, "input") + } + return nil +} + +func (t *Tree) clearActionLine() { + t.actionLine = 0 +} + +// Action: +// control +// command ("|" command)* +// Left delim is past. Now get actions. +// First word could be a keyword such as range. +func (t *Tree) action() (n Node) { + switch token := t.nextNonSpace(); token.typ { + case itemBlock: + return t.blockControl() + case itemElse: + return t.elseControl() + case itemEnd: + return t.endControl() + case itemIf: + return t.ifControl() + case itemRange: + return t.rangeControl() + case itemTemplate: + return t.templateControl() + case itemWith: + return t.withControl() + } + t.backup() + token := t.peek() + // Do not pop variables; they persist until "end". + return t.newAction(token.pos, token.line, t.pipeline("command", itemRightDelim)) +} + +// Pipeline: +// declarations? command ('|' command)* +func (t *Tree) pipeline(context string, end itemType) (pipe *PipeNode) { + token := t.peekNonSpace() + pipe = t.newPipeline(token.pos, token.line, nil) + // Are there declarations or assignments? +decls: + if v := t.peekNonSpace(); v.typ == itemVariable { + t.next() + // Since space is a token, we need 3-token look-ahead here in the worst case: + // in "$x foo" we need to read "foo" (as opposed to ":=") to know that $x is an + // argument variable rather than a declaration. So remember the token + // adjacent to the variable so we can push it back if necessary. + tokenAfterVariable := t.peek() + next := t.peekNonSpace() + switch { + case next.typ == itemAssign, next.typ == itemDeclare: + pipe.IsAssign = next.typ == itemAssign + t.nextNonSpace() + pipe.Decl = append(pipe.Decl, t.newVariable(v.pos, v.val)) + t.vars = append(t.vars, v.val) + case next.typ == itemChar && next.val == ",": + t.nextNonSpace() + pipe.Decl = append(pipe.Decl, t.newVariable(v.pos, v.val)) + t.vars = append(t.vars, v.val) + if context == "range" && len(pipe.Decl) < 2 { + switch t.peekNonSpace().typ { + case itemVariable, itemRightDelim, itemRightParen: + // second initialized variable in a range pipeline + goto decls + default: + t.errorf("range can only initialize variables") + } + } + t.errorf("too many declarations in %s", context) + case tokenAfterVariable.typ == itemSpace: + t.backup3(v, tokenAfterVariable) + default: + t.backup2(v) + } + } + for { + switch token := t.nextNonSpace(); token.typ { + case end: + // At this point, the pipeline is complete + t.checkPipeline(pipe, context) + return + case itemBool, itemCharConstant, itemComplex, itemDot, itemField, itemIdentifier, + itemNumber, itemNil, itemRawString, itemString, itemVariable, itemLeftParen: + t.backup() + pipe.append(t.command()) + default: + t.unexpected(token, context) + } + } +} + +func (t *Tree) checkPipeline(pipe *PipeNode, context string) { + // Reject empty pipelines + if len(pipe.Cmds) == 0 { + t.errorf("missing value for %s", context) + } + // Only the first command of a pipeline can start with a non executable operand + for i, c := range pipe.Cmds[1:] { + switch c.Args[0].Type() { + case NodeBool, NodeDot, NodeNil, NodeNumber, NodeString: + // With A|B|C, pipeline stage 2 is B + t.errorf("non executable command in pipeline stage %d", i+2) + } + } +} + +func (t *Tree) parseControl(allowElseIf bool, context string) (pos Pos, line int, pipe *PipeNode, list, elseList *ListNode) { + defer t.popVars(len(t.vars)) + pipe = t.pipeline(context, itemRightDelim) + var next Node + list, next = t.itemList() + switch next.Type() { + case nodeEnd: //done + case nodeElse: + if allowElseIf { + // Special case for "else if". If the "else" is followed immediately by an "if", + // the elseControl will have left the "if" token pending. Treat + // {{if a}}_{{else if b}}_{{end}} + // as + // {{if a}}_{{else}}{{if b}}_{{end}}{{end}}. + // To do this, parse the if as usual and stop at it {{end}}; the subsequent{{end}} + // is assumed. This technique works even for long if-else-if chains. + // TODO: Should we allow else-if in with and range? + if t.peek().typ == itemIf { + t.next() // Consume the "if" token. + elseList = t.newList(next.Position()) + elseList.append(t.ifControl()) + // Do not consume the next item - only one {{end}} required. + break + } + } + elseList, next = t.itemList() + if next.Type() != nodeEnd { + t.errorf("expected end; found %s", next) + } + } + return pipe.Position(), pipe.Line, pipe, list, elseList +} + +// If: +// {{if pipeline}} itemList {{end}} +// {{if pipeline}} itemList {{else}} itemList {{end}} +// If keyword is past. +func (t *Tree) ifControl() Node { + return t.newIf(t.parseControl(true, "if")) +} + +// Range: +// {{range pipeline}} itemList {{end}} +// {{range pipeline}} itemList {{else}} itemList {{end}} +// Range keyword is past. +func (t *Tree) rangeControl() Node { + return t.newRange(t.parseControl(false, "range")) +} + +// With: +// {{with pipeline}} itemList {{end}} +// {{with pipeline}} itemList {{else}} itemList {{end}} +// If keyword is past. +func (t *Tree) withControl() Node { + return t.newWith(t.parseControl(false, "with")) +} + +// End: +// {{end}} +// End keyword is past. +func (t *Tree) endControl() Node { + return t.newEnd(t.expect(itemRightDelim, "end").pos) +} + +// Else: +// {{else}} +// Else keyword is past. +func (t *Tree) elseControl() Node { + // Special case for "else if". + peek := t.peekNonSpace() + if peek.typ == itemIf { + // We see "{{else if ... " but in effect rewrite it to {{else}}{{if ... ". + return t.newElse(peek.pos, peek.line) + } + token := t.expect(itemRightDelim, "else") + return t.newElse(token.pos, token.line) +} + +// Block: +// {{block stringValue pipeline}} +// Block keyword is past. +// The name must be something that can evaluate to a string. +// The pipeline is mandatory. +func (t *Tree) blockControl() Node { + const context = "block clause" + + token := t.nextNonSpace() + name := t.parseTemplateName(token, context) + pipe := t.pipeline(context, itemRightDelim) + + block := New(name) // name will be updated once we know it. + block.text = t.text + block.Mode = t.Mode + block.ParseName = t.ParseName + block.startParse(t.funcs, t.lex, t.treeSet) + var end Node + block.Root, end = block.itemList() + if end.Type() != nodeEnd { + t.errorf("unexpected %s in %s", end, context) + } + block.add() + block.stopParse() + + return t.newTemplate(token.pos, token.line, name, pipe) +} + +// Template: +// {{template stringValue pipeline}} +// Template keyword is past. The name must be something that can evaluate +// to a string. +func (t *Tree) templateControl() Node { + const context = "template clause" + token := t.nextNonSpace() + name := t.parseTemplateName(token, context) + var pipe *PipeNode + if t.nextNonSpace().typ != itemRightDelim { + t.backup() + // Do not pop variables; they persist until "end". + pipe = t.pipeline(context, itemRightDelim) + } + return t.newTemplate(token.pos, token.line, name, pipe) +} + +func (t *Tree) parseTemplateName(token item, context string) (name string) { + switch token.typ { + case itemString, itemRawString: + s, err := strconv.Unquote(token.val) + if err != nil { + t.error(err) + } + name = s + default: + t.unexpected(token, context) + } + return +} + +// command: +// operand (space operand)* +// space-separated arguments up to a pipeline character or right delimiter. +// we consume the pipe character but leave the right delim to terminate the action. +func (t *Tree) command() *CommandNode { + cmd := t.newCommand(t.peekNonSpace().pos) + for { + t.peekNonSpace() // skip leading spaces. + operand := t.operand() + if operand != nil { + cmd.append(operand) + } + switch token := t.next(); token.typ { + case itemSpace: + continue + case itemRightDelim, itemRightParen: + t.backup() + case itemPipe: + // nothing here; break loop below + default: + t.unexpected(token, "operand") + } + break + } + if len(cmd.Args) == 0 { + t.errorf("empty command") + } + return cmd +} + +// operand: +// term .Field* +// An operand is a space-separated component of a command, +// a term possibly followed by field accesses. +// A nil return means the next item is not an operand. +func (t *Tree) operand() Node { + node := t.term() + if node == nil { + return nil + } + if t.peek().typ == itemField { + chain := t.newChain(t.peek().pos, node) + for t.peek().typ == itemField { + chain.Add(t.next().val) + } + // Compatibility with original API: If the term is of type NodeField + // or NodeVariable, just put more fields on the original. + // Otherwise, keep the Chain node. + // Obvious parsing errors involving literal values are detected here. + // More complex error cases will have to be handled at execution time. + switch node.Type() { + case NodeField: + node = t.newField(chain.Position(), chain.String()) + case NodeVariable: + node = t.newVariable(chain.Position(), chain.String()) + case NodeBool, NodeString, NodeNumber, NodeNil, NodeDot: + t.errorf("unexpected . after term %q", node.String()) + default: + node = chain + } + } + return node +} + +// term: +// literal (number, string, nil, boolean) +// function (identifier) +// . +// .Field +// $ +// '(' pipeline ')' +// A term is a simple "expression". +// A nil return means the next item is not a term. +func (t *Tree) term() Node { + switch token := t.nextNonSpace(); token.typ { + case itemIdentifier: + checkFunc := t.Mode&SkipFuncCheck == 0 + if checkFunc && !t.hasFunction(token.val) { + t.errorf("function %q not defined", token.val) + } + return NewIdentifier(token.val).SetTree(t).SetPos(token.pos) + case itemDot: + return t.newDot(token.pos) + case itemNil: + return t.newNil(token.pos) + case itemVariable: + return t.useVar(token.pos, token.val) + case itemField: + return t.newField(token.pos, token.val) + case itemBool: + return t.newBool(token.pos, token.val == "true") + case itemCharConstant, itemComplex, itemNumber: + number, err := t.newNumber(token.pos, token.val, token.typ) + if err != nil { + t.error(err) + } + return number + case itemLeftParen: + return t.pipeline("parenthesized pipeline", itemRightParen) + case itemString, itemRawString: + s, err := strconv.Unquote(token.val) + if err != nil { + t.error(err) + } + return t.newString(token.pos, token.val, s) + } + t.backup() + return nil +} + +// hasFunction reports if a function name exists in the Tree's maps. +func (t *Tree) hasFunction(name string) bool { + for _, funcMap := range t.funcs { + if funcMap == nil { + continue + } + if funcMap[name] != nil { + return true + } + } + return false +} + +// popVars trims the variable list to the specified length +func (t *Tree) popVars(n int) { + t.vars = t.vars[:n] +} + +// useVar returns a node for a variable reference. It errors if the +// variable is not defined. +func (t *Tree) useVar(pos Pos, name string) Node { + v := t.newVariable(pos, name) + for _, varName := range t.vars { + if varName == v.Ident[0] { + return v + } + } + t.errorf("undefined variable %q", v.Ident[0]) + return nil +} diff --git a/go.dev/cmd/internal/tmplfunc/internal/parse/parse_test.go b/go.dev/cmd/internal/tmplfunc/internal/parse/parse_test.go new file mode 100644 index 00000000..9b1be272 --- /dev/null +++ b/go.dev/cmd/internal/tmplfunc/internal/parse/parse_test.go @@ -0,0 +1,668 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package parse + +import ( + "flag" + "fmt" + "strings" + "testing" +) + +var debug = flag.Bool("debug", false, "show the errors produced by the main tests") + +type numberTest struct { + text string + isInt bool + isUint bool + isFloat bool + isComplex bool + int64 + uint64 + float64 + complex128 +} + +var numberTests = []numberTest{ + // basics + {"0", true, true, true, false, 0, 0, 0, 0}, + {"-0", true, true, true, false, 0, 0, 0, 0}, // check that -0 is a uint. + {"73", true, true, true, false, 73, 73, 73, 0}, + {"7_3", true, true, true, false, 73, 73, 73, 0}, + {"0b10_010_01", true, true, true, false, 73, 73, 73, 0}, + {"0B10_010_01", true, true, true, false, 73, 73, 73, 0}, + {"073", true, true, true, false, 073, 073, 073, 0}, + {"0o73", true, true, true, false, 073, 073, 073, 0}, + {"0O73", true, true, true, false, 073, 073, 073, 0}, + {"0x73", true, true, true, false, 0x73, 0x73, 0x73, 0}, + {"0X73", true, true, true, false, 0x73, 0x73, 0x73, 0}, + {"0x7_3", true, true, true, false, 0x73, 0x73, 0x73, 0}, + {"-73", true, false, true, false, -73, 0, -73, 0}, + {"+73", true, false, true, false, 73, 0, 73, 0}, + {"100", true, true, true, false, 100, 100, 100, 0}, + {"1e9", true, true, true, false, 1e9, 1e9, 1e9, 0}, + {"-1e9", true, false, true, false, -1e9, 0, -1e9, 0}, + {"-1.2", false, false, true, false, 0, 0, -1.2, 0}, + {"1e19", false, true, true, false, 0, 1e19, 1e19, 0}, + {"1e1_9", false, true, true, false, 0, 1e19, 1e19, 0}, + {"1E19", false, true, true, false, 0, 1e19, 1e19, 0}, + {"-1e19", false, false, true, false, 0, 0, -1e19, 0}, + {"0x_1p4", true, true, true, false, 16, 16, 16, 0}, + {"0X_1P4", true, true, true, false, 16, 16, 16, 0}, + {"0x_1p-4", false, false, true, false, 0, 0, 1 / 16., 0}, + {"4i", false, false, false, true, 0, 0, 0, 4i}, + {"-1.2+4.2i", false, false, false, true, 0, 0, 0, -1.2 + 4.2i}, + {"073i", false, false, false, true, 0, 0, 0, 73i}, // not octal! + // complex with 0 imaginary are float (and maybe integer) + {"0i", true, true, true, true, 0, 0, 0, 0}, + {"-1.2+0i", false, false, true, true, 0, 0, -1.2, -1.2}, + {"-12+0i", true, false, true, true, -12, 0, -12, -12}, + {"13+0i", true, true, true, true, 13, 13, 13, 13}, + // funny bases + {"0123", true, true, true, false, 0123, 0123, 0123, 0}, + {"-0x0", true, true, true, false, 0, 0, 0, 0}, + {"0xdeadbeef", true, true, true, false, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0}, + // character constants + {`'a'`, true, true, true, false, 'a', 'a', 'a', 0}, + {`'\n'`, true, true, true, false, '\n', '\n', '\n', 0}, + {`'\\'`, true, true, true, false, '\\', '\\', '\\', 0}, + {`'\''`, true, true, true, false, '\'', '\'', '\'', 0}, + {`'\xFF'`, true, true, true, false, 0xFF, 0xFF, 0xFF, 0}, + {`'パ'`, true, true, true, false, 0x30d1, 0x30d1, 0x30d1, 0}, + {`'\u30d1'`, true, true, true, false, 0x30d1, 0x30d1, 0x30d1, 0}, + {`'\U000030d1'`, true, true, true, false, 0x30d1, 0x30d1, 0x30d1, 0}, + // some broken syntax + {text: "+-2"}, + {text: "0x123."}, + {text: "1e."}, + {text: "0xi."}, + {text: "1+2."}, + {text: "'x"}, + {text: "'xx'"}, + {text: "'433937734937734969526500969526500'"}, // Integer too large - issue 10634. + // Issue 8622 - 0xe parsed as floating point. Very embarrassing. + {"0xef", true, true, true, false, 0xef, 0xef, 0xef, 0}, +} + +func TestNumberParse(t *testing.T) { + for _, test := range numberTests { + // If fmt.Sscan thinks it's complex, it's complex. We can't trust the output + // because imaginary comes out as a number. + var c complex128 + typ := itemNumber + var tree *Tree + if test.text[0] == '\'' { + typ = itemCharConstant + } else { + _, err := fmt.Sscan(test.text, &c) + if err == nil { + typ = itemComplex + } + } + n, err := tree.newNumber(0, test.text, typ) + ok := test.isInt || test.isUint || test.isFloat || test.isComplex + if ok && err != nil { + t.Errorf("unexpected error for %q: %s", test.text, err) + continue + } + if !ok && err == nil { + t.Errorf("expected error for %q", test.text) + continue + } + if !ok { + if *debug { + fmt.Printf("%s\n\t%s\n", test.text, err) + } + continue + } + if n.IsComplex != test.isComplex { + t.Errorf("complex incorrect for %q; should be %t", test.text, test.isComplex) + } + if test.isInt { + if !n.IsInt { + t.Errorf("expected integer for %q", test.text) + } + if n.Int64 != test.int64 { + t.Errorf("int64 for %q should be %d Is %d", test.text, test.int64, n.Int64) + } + } else if n.IsInt { + t.Errorf("did not expect integer for %q", test.text) + } + if test.isUint { + if !n.IsUint { + t.Errorf("expected unsigned integer for %q", test.text) + } + if n.Uint64 != test.uint64 { + t.Errorf("uint64 for %q should be %d Is %d", test.text, test.uint64, n.Uint64) + } + } else if n.IsUint { + t.Errorf("did not expect unsigned integer for %q", test.text) + } + if test.isFloat { + if !n.IsFloat { + t.Errorf("expected float for %q", test.text) + } + if n.Float64 != test.float64 { + t.Errorf("float64 for %q should be %g Is %g", test.text, test.float64, n.Float64) + } + } else if n.IsFloat { + t.Errorf("did not expect float for %q", test.text) + } + if test.isComplex { + if !n.IsComplex { + t.Errorf("expected complex for %q", test.text) + } + if n.Complex128 != test.complex128 { + t.Errorf("complex128 for %q should be %g Is %g", test.text, test.complex128, n.Complex128) + } + } else if n.IsComplex { + t.Errorf("did not expect complex for %q", test.text) + } + } +} + +type parseTest struct { + name string + input string + ok bool + result string // what the user would see in an error message. +} + +const ( + noError = true + hasError = false +) + +var parseTests = []parseTest{ + {"empty", "", noError, + ``}, + {"comment", "{{/*\n\n\n*/}}", noError, + ``}, + {"spaces", " \t\n", noError, + `" \t\n"`}, + {"text", "some text", noError, + `"some text"`}, + {"emptyAction", "{{}}", hasError, + `{{}}`}, + {"field", "{{.X}}", noError, + `{{.X}}`}, + {"simple command", "{{printf}}", noError, + `{{printf}}`}, + {"$ invocation", "{{$}}", noError, + "{{$}}"}, + {"variable invocation", "{{with $x := 3}}{{$x 23}}{{end}}", noError, + "{{with $x := 3}}{{$x 23}}{{end}}"}, + {"variable with fields", "{{$.I}}", noError, + "{{$.I}}"}, + {"multi-word command", "{{printf `%d` 23}}", noError, + "{{printf `%d` 23}}"}, + {"pipeline", "{{.X|.Y}}", noError, + `{{.X | .Y}}`}, + {"pipeline with decl", "{{$x := .X|.Y}}", noError, + `{{$x := .X | .Y}}`}, + {"nested pipeline", "{{.X (.Y .Z) (.A | .B .C) (.E)}}", noError, + `{{.X (.Y .Z) (.A | .B .C) (.E)}}`}, + {"field applied to parentheses", "{{(.Y .Z).Field}}", noError, + `{{(.Y .Z).Field}}`}, + {"simple if", "{{if .X}}hello{{end}}", noError, + `{{if .X}}"hello"{{end}}`}, + {"if with else", "{{if .X}}true{{else}}false{{end}}", noError, + `{{if .X}}"true"{{else}}"false"{{end}}`}, + {"if with else if", "{{if .X}}true{{else if .Y}}false{{end}}", noError, + `{{if .X}}"true"{{else}}{{if .Y}}"false"{{end}}{{end}}`}, + {"if else chain", "+{{if .X}}X{{else if .Y}}Y{{else if .Z}}Z{{end}}+", noError, + `"+"{{if .X}}"X"{{else}}{{if .Y}}"Y"{{else}}{{if .Z}}"Z"{{end}}{{end}}{{end}}"+"`}, + {"simple range", "{{range .X}}hello{{end}}", noError, + `{{range .X}}"hello"{{end}}`}, + {"chained field range", "{{range .X.Y.Z}}hello{{end}}", noError, + `{{range .X.Y.Z}}"hello"{{end}}`}, + {"nested range", "{{range .X}}hello{{range .Y}}goodbye{{end}}{{end}}", noError, + `{{range .X}}"hello"{{range .Y}}"goodbye"{{end}}{{end}}`}, + {"range with else", "{{range .X}}true{{else}}false{{end}}", noError, + `{{range .X}}"true"{{else}}"false"{{end}}`}, + {"range over pipeline", "{{range .X|.M}}true{{else}}false{{end}}", noError, + `{{range .X | .M}}"true"{{else}}"false"{{end}}`}, + {"range []int", "{{range .SI}}{{.}}{{end}}", noError, + `{{range .SI}}{{.}}{{end}}`}, + {"range 1 var", "{{range $x := .SI}}{{.}}{{end}}", noError, + `{{range $x := .SI}}{{.}}{{end}}`}, + {"range 2 vars", "{{range $x, $y := .SI}}{{.}}{{end}}", noError, + `{{range $x, $y := .SI}}{{.}}{{end}}`}, + {"constants", "{{range .SI 1 -3.2i true false 'a' nil}}{{end}}", noError, + `{{range .SI 1 -3.2i true false 'a' nil}}{{end}}`}, + {"template", "{{template `x`}}", noError, + `{{template "x"}}`}, + {"template with arg", "{{template `x` .Y}}", noError, + `{{template "x" .Y}}`}, + {"with", "{{with .X}}hello{{end}}", noError, + `{{with .X}}"hello"{{end}}`}, + {"with with else", "{{with .X}}hello{{else}}goodbye{{end}}", noError, + `{{with .X}}"hello"{{else}}"goodbye"{{end}}`}, + // Trimming spaces. + {"trim left", "x \r\n\t{{- 3}}", noError, `"x"{{3}}`}, + {"trim right", "{{3 -}}\n\n\ty", noError, `{{3}}"y"`}, + {"trim left and right", "x \r\n\t{{- 3 -}}\n\n\ty", noError, `"x"{{3}}"y"`}, + {"trim with extra spaces", "x\n{{- 3 -}}\ny", noError, `"x"{{3}}"y"`}, + {"comment trim left", "x \r\n\t{{- /* hi */}}", noError, `"x"`}, + {"comment trim right", "{{/* hi */ -}}\n\n\ty", noError, `"y"`}, + {"comment trim left and right", "x \r\n\t{{- /* */ -}}\n\n\ty", noError, `"x""y"`}, + {"block definition", `{{block "foo" .}}hello{{end}}`, noError, + `{{template "foo" .}}`}, + + {"newline in assignment", "{{ $x \n := \n 1 \n }}", noError, "{{$x := 1}}"}, + {"newline in empty action", "{{\n}}", hasError, "{{\n}}"}, + {"newline in pipeline", "{{\n\"x\"\n|\nprintf\n}}", noError, `{{"x" | printf}}`}, + {"newline in comment", "{{/*\nhello\n*/}}", noError, ""}, + {"newline in comment", "{{-\n/*\nhello\n*/\n-}}", noError, ""}, + + // Errors. + {"unclosed action", "hello{{range", hasError, ""}, + {"unmatched end", "{{end}}", hasError, ""}, + {"unmatched else", "{{else}}", hasError, ""}, + {"unmatched else after if", "{{if .X}}hello{{end}}{{else}}", hasError, ""}, + {"multiple else", "{{if .X}}1{{else}}2{{else}}3{{end}}", hasError, ""}, + {"missing end", "hello{{range .x}}", hasError, ""}, + {"missing end after else", "hello{{range .x}}{{else}}", hasError, ""}, + {"undefined function", "hello{{undefined}}", hasError, ""}, + {"undefined variable", "{{$x}}", hasError, ""}, + {"variable undefined after end", "{{with $x := 4}}{{end}}{{$x}}", hasError, ""}, + {"variable undefined in template", "{{template $v}}", hasError, ""}, + {"declare with field", "{{with $x.Y := 4}}{{end}}", hasError, ""}, + {"template with field ref", "{{template .X}}", hasError, ""}, + {"template with var", "{{template $v}}", hasError, ""}, + {"invalid punctuation", "{{printf 3, 4}}", hasError, ""}, + {"multidecl outside range", "{{with $v, $u := 3}}{{end}}", hasError, ""}, + {"too many decls in range", "{{range $u, $v, $w := 3}}{{end}}", hasError, ""}, + {"dot applied to parentheses", "{{printf (printf .).}}", hasError, ""}, + {"adjacent args", "{{printf 3`x`}}", hasError, ""}, + {"adjacent args with .", "{{printf `x`.}}", hasError, ""}, + {"extra end after if", "{{if .X}}a{{else if .Y}}b{{end}}{{end}}", hasError, ""}, + // Other kinds of assignments and operators aren't available yet. + {"bug0a", "{{$x := 0}}{{$x}}", noError, "{{$x := 0}}{{$x}}"}, + {"bug0b", "{{$x += 1}}{{$x}}", hasError, ""}, + {"bug0c", "{{$x ! 2}}{{$x}}", hasError, ""}, + {"bug0d", "{{$x % 3}}{{$x}}", hasError, ""}, + // Check the parse fails for := rather than comma. + {"bug0e", "{{range $x := $y := 3}}{{end}}", hasError, ""}, + // Another bug: variable read must ignore following punctuation. + {"bug1a", "{{$x:=.}}{{$x!2}}", hasError, ""}, // ! is just illegal here. + {"bug1b", "{{$x:=.}}{{$x+2}}", hasError, ""}, // $x+2 should not parse as ($x) (+2). + {"bug1c", "{{$x:=.}}{{$x +2}}", noError, "{{$x := .}}{{$x +2}}"}, // It's OK with a space. + // dot following a literal value + {"dot after integer", "{{1.E}}", hasError, ""}, + {"dot after float", "{{0.1.E}}", hasError, ""}, + {"dot after boolean", "{{true.E}}", hasError, ""}, + {"dot after char", "{{'a'.any}}", hasError, ""}, + {"dot after string", `{{"hello".guys}}`, hasError, ""}, + {"dot after dot", "{{..E}}", hasError, ""}, + {"dot after nil", "{{nil.E}}", hasError, ""}, + // Wrong pipeline + {"wrong pipeline dot", "{{12|.}}", hasError, ""}, + {"wrong pipeline number", "{{.|12|printf}}", hasError, ""}, + {"wrong pipeline string", "{{.|printf|\"error\"}}", hasError, ""}, + {"wrong pipeline char", "{{12|printf|'e'}}", hasError, ""}, + {"wrong pipeline boolean", "{{.|true}}", hasError, ""}, + {"wrong pipeline nil", "{{'c'|nil}}", hasError, ""}, + {"empty pipeline", `{{printf "%d" ( ) }}`, hasError, ""}, + // Missing pipeline in block + {"block definition", `{{block "foo"}}hello{{end}}`, hasError, ""}, +} + +var builtins = map[string]interface{}{ + "printf": fmt.Sprintf, + "contains": strings.Contains, +} + +func testParse(doCopy bool, t *testing.T) { + textFormat = "%q" + defer func() { textFormat = "%s" }() + for _, test := range parseTests { + tmpl, err := New(test.name).Parse(test.input, "", "", make(map[string]*Tree), builtins) + switch { + case err == nil && !test.ok: + t.Errorf("%q: expected error; got none", test.name) + continue + case err != nil && test.ok: + t.Errorf("%q: unexpected error: %v", test.name, err) + continue + case err != nil && !test.ok: + // expected error, got one + if *debug { + fmt.Printf("%s: %s\n\t%s\n", test.name, test.input, err) + } + continue + } + var result string + if doCopy { + result = tmpl.Root.Copy().String() + } else { + result = tmpl.Root.String() + } + if result != test.result { + t.Errorf("%s=(%q): got\n\t%v\nexpected\n\t%v", test.name, test.input, result, test.result) + } + } +} + +func TestParse(t *testing.T) { + testParse(false, t) +} + +// Same as TestParse, but we copy the node first +func TestParseCopy(t *testing.T) { + testParse(true, t) +} + +func TestParseWithComments(t *testing.T) { + textFormat = "%q" + defer func() { textFormat = "%s" }() + tests := [...]parseTest{ + {"comment", "{{/*\n\n\n*/}}", noError, "{{/*\n\n\n*/}}"}, + {"comment trim left", "x \r\n\t{{- /* hi */}}", noError, `"x"{{/* hi */}}`}, + {"comment trim right", "{{/* hi */ -}}\n\n\ty", noError, `{{/* hi */}}"y"`}, + {"comment trim left and right", "x \r\n\t{{- /* */ -}}\n\n\ty", noError, `"x"{{/* */}}"y"`}, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + tr := New(test.name) + tr.Mode = ParseComments + tmpl, err := tr.Parse(test.input, "", "", make(map[string]*Tree)) + if err != nil { + t.Errorf("%q: expected error; got none", test.name) + } + if result := tmpl.Root.String(); result != test.result { + t.Errorf("%s=(%q): got\n\t%v\nexpected\n\t%v", test.name, test.input, result, test.result) + } + }) + } +} + +func TestSkipFuncCheck(t *testing.T) { + oldTextFormat := textFormat + textFormat = "%q" + defer func() { textFormat = oldTextFormat }() + tr := New("skip func check") + tr.Mode = SkipFuncCheck + tmpl, err := tr.Parse("{{fn 1 2}}", "", "", make(map[string]*Tree)) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + expected := "{{fn 1 2}}" + if result := tmpl.Root.String(); result != expected { + t.Errorf("got\n\t%v\nexpected\n\t%v", result, expected) + } +} + +type isEmptyTest struct { + name string + input string + empty bool +} + +var isEmptyTests = []isEmptyTest{ + {"empty", ``, true}, + {"nonempty", `hello`, false}, + {"spaces only", " \t\n \t\n", true}, + {"comment only", "{{/* comment */}}", true}, + {"definition", `{{define "x"}}something{{end}}`, true}, + {"definitions and space", "{{define `x`}}something{{end}}\n\n{{define `y`}}something{{end}}\n\n", true}, + {"definitions and text", "{{define `x`}}something{{end}}\nx\n{{define `y`}}something{{end}}\ny\n", false}, + {"definition and action", "{{define `x`}}something{{end}}{{if 3}}foo{{end}}", false}, +} + +func TestIsEmpty(t *testing.T) { + if !IsEmptyTree(nil) { + t.Errorf("nil tree is not empty") + } + for _, test := range isEmptyTests { + tree, err := New("root").Parse(test.input, "", "", make(map[string]*Tree), nil) + if err != nil { + t.Errorf("%q: unexpected error: %v", test.name, err) + continue + } + if empty := IsEmptyTree(tree.Root); empty != test.empty { + t.Errorf("%q: expected %t got %t", test.name, test.empty, empty) + } + } +} + +func TestErrorContextWithTreeCopy(t *testing.T) { + tree, err := New("root").Parse("{{if true}}{{end}}", "", "", make(map[string]*Tree), nil) + if err != nil { + t.Fatalf("unexpected tree parse failure: %v", err) + } + treeCopy := tree.Copy() + wantLocation, wantContext := tree.ErrorContext(tree.Root.Nodes[0]) + gotLocation, gotContext := treeCopy.ErrorContext(treeCopy.Root.Nodes[0]) + if wantLocation != gotLocation { + t.Errorf("wrong error location want %q got %q", wantLocation, gotLocation) + } + if wantContext != gotContext { + t.Errorf("wrong error location want %q got %q", wantContext, gotContext) + } +} + +// All failures, and the result is a string that must appear in the error message. +var errorTests = []parseTest{ + // Check line numbers are accurate. + {"unclosed1", + "line1\n{{", + hasError, `unclosed1:2: unclosed action`}, + {"unclosed2", + "line1\n{{define `x`}}line2\n{{", + hasError, `unclosed2:3: unclosed action`}, + {"unclosed3", + "line1\n{{\"x\"\n\"y\"\n", + hasError, `unclosed3:4: unclosed action started at unclosed3:2`}, + {"unclosed4", + "{{\n\n\n\n\n", + hasError, `unclosed4:6: unclosed action started at unclosed4:1`}, + {"var1", + "line1\n{{\nx\n}}", + hasError, `var1:3: function "x" not defined`}, + // Specific errors. + {"function", + "{{foo}}", + hasError, `function "foo" not defined`}, + {"comment1", + "{{/*}}", + hasError, `comment1:1: unclosed comment`}, + {"comment2", + "{{/*\nhello\n}}", + hasError, `comment2:1: unclosed comment`}, + {"lparen", + "{{.X (1 2 3}}", + hasError, `unclosed left paren`}, + {"rparen", + "{{.X 1 2 3 ) }}", + hasError, `unexpected ")" in command`}, + {"rparen2", + "{{(.X 1 2 3", + hasError, `unclosed action`}, + {"space", + "{{`x`3}}", + hasError, `in operand`}, + {"idchar", + "{{a#}}", + hasError, `'#'`}, + {"charconst", + "{{'a}}", + hasError, `unterminated character constant`}, + {"stringconst", + `{{"a}}`, + hasError, `unterminated quoted string`}, + {"rawstringconst", + "{{`a}}", + hasError, `unterminated raw quoted string`}, + {"number", + "{{0xi}}", + hasError, `number syntax`}, + {"multidefine", + "{{define `a`}}a{{end}}{{define `a`}}b{{end}}", + hasError, `multiple definition of template`}, + {"eof", + "{{range .X}}", + hasError, `unexpected EOF`}, + {"variable", + // Declare $x so it's defined, to avoid that error, and then check we don't parse a declaration. + "{{$x := 23}}{{with $x.y := 3}}{{$x 23}}{{end}}", + hasError, `unexpected ":="`}, + {"multidecl", + "{{$a,$b,$c := 23}}", + hasError, `too many declarations`}, + {"undefvar", + "{{$a}}", + hasError, `undefined variable`}, + {"wrongdot", + "{{true.any}}", + hasError, `unexpected . after term`}, + {"wrongpipeline", + "{{12|false}}", + hasError, `non executable command in pipeline`}, + {"emptypipeline", + `{{ ( ) }}`, + hasError, `missing value for parenthesized pipeline`}, + {"multilinerawstring", + "{{ $v := `\n` }} {{", + hasError, `multilinerawstring:2: unclosed action`}, + {"rangeundefvar", + "{{range $k}}{{end}}", + hasError, `undefined variable`}, + {"rangeundefvars", + "{{range $k, $v}}{{end}}", + hasError, `undefined variable`}, + {"rangemissingvalue1", + "{{range $k,}}{{end}}", + hasError, `missing value for range`}, + {"rangemissingvalue2", + "{{range $k, $v := }}{{end}}", + hasError, `missing value for range`}, + {"rangenotvariable1", + "{{range $k, .}}{{end}}", + hasError, `range can only initialize variables`}, + {"rangenotvariable2", + "{{range $k, 123 := .}}{{end}}", + hasError, `range can only initialize variables`}, +} + +func TestErrors(t *testing.T) { + for _, test := range errorTests { + t.Run(test.name, func(t *testing.T) { + _, err := New(test.name).Parse(test.input, "", "", make(map[string]*Tree)) + if err == nil { + t.Fatalf("expected error %q, got nil", test.result) + } + if !strings.Contains(err.Error(), test.result) { + t.Fatalf("error %q does not contain %q", err, test.result) + } + }) + } +} + +func TestBlock(t *testing.T) { + const ( + input = `a{{block "inner" .}}bar{{.}}baz{{end}}b` + outer = `a{{template "inner" .}}b` + inner = `bar{{.}}baz` + ) + treeSet := make(map[string]*Tree) + tmpl, err := New("outer").Parse(input, "", "", treeSet, nil) + if err != nil { + t.Fatal(err) + } + if g, w := tmpl.Root.String(), outer; g != w { + t.Errorf("outer template = %q, want %q", g, w) + } + inTmpl := treeSet["inner"] + if inTmpl == nil { + t.Fatal("block did not define template") + } + if g, w := inTmpl.Root.String(), inner; g != w { + t.Errorf("inner template = %q, want %q", g, w) + } +} + +func TestLineNum(t *testing.T) { + const count = 100 + text := strings.Repeat("{{printf 1234}}\n", count) + tree, err := New("bench").Parse(text, "", "", make(map[string]*Tree), builtins) + if err != nil { + t.Fatal(err) + } + // Check the line numbers. Each line is an action containing a template, followed by text. + // That's two nodes per line. + nodes := tree.Root.Nodes + for i := 0; i < len(nodes); i += 2 { + line := 1 + i/2 + // Action first. + action := nodes[i].(*ActionNode) + if action.Line != line { + t.Fatalf("line %d: action is line %d", line, action.Line) + } + pipe := action.Pipe + if pipe.Line != line { + t.Fatalf("line %d: pipe is line %d", line, pipe.Line) + } + } +} + +func BenchmarkParseLarge(b *testing.B) { + text := strings.Repeat("{{1234}}\n", 10000) + for i := 0; i < b.N; i++ { + _, err := New("bench").Parse(text, "", "", make(map[string]*Tree), builtins) + if err != nil { + b.Fatal(err) + } + } +} + +var sinkv, sinkl string + +func BenchmarkVariableString(b *testing.B) { + v := &VariableNode{ + Ident: []string{"$", "A", "BB", "CCC", "THIS_IS_THE_VARIABLE_BEING_PROCESSED"}, + } + b.ResetTimer() + b.ReportAllocs() + for i := 0; i < b.N; i++ { + sinkv = v.String() + } + if sinkv == "" { + b.Fatal("Benchmark was not run") + } +} + +func BenchmarkListString(b *testing.B) { + text := ` +{{(printf .Field1.Field2.Field3).Value}} +{{$x := (printf .Field1.Field2.Field3).Value}} +{{$y := (printf $x.Field1.Field2.Field3).Value}} +{{$z := $y.Field1.Field2.Field3}} +{{if contains $y $z}} + {{printf "%q" $y}} +{{else}} + {{printf "%q" $x}} +{{end}} +{{with $z.Field1 | contains "boring"}} + {{printf "%q" . | printf "%s"}} +{{else}} + {{printf "%d %d %d" 11 11 11}} + {{printf "%d %d %s" 22 22 $x.Field1.Field2.Field3 | printf "%s"}} + {{printf "%v" (contains $z.Field1.Field2 $y)}} +{{end}} +` + tree, err := New("bench").Parse(text, "", "", make(map[string]*Tree), builtins) + if err != nil { + b.Fatal(err) + } + b.ResetTimer() + b.ReportAllocs() + for i := 0; i < b.N; i++ { + sinkl = tree.Root.String() + } + if sinkl == "" { + b.Fatal("Benchmark was not run") + } +} diff --git a/go.dev/cmd/internal/tmplfunc/testdata/x.tmpl b/go.dev/cmd/internal/tmplfunc/testdata/x.tmpl new file mode 100644 index 00000000..f334fe5c --- /dev/null +++ b/go.dev/cmd/internal/tmplfunc/testdata/x.tmpl @@ -0,0 +1,3 @@ +{{define "x"}} +{{if len .}}{{y (slice . 1 (len .))}}{{else}}x{{end}} +{{end}} diff --git a/go.dev/cmd/internal/tmplfunc/testdata/y.tmpl b/go.dev/cmd/internal/tmplfunc/testdata/y.tmpl new file mode 100644 index 00000000..12bbdbb8 --- /dev/null +++ b/go.dev/cmd/internal/tmplfunc/testdata/y.tmpl @@ -0,0 +1,3 @@ +{{define "y"}} +{{if len .}}{{x (slice . 1 (len .))}}{{else}}y{{end}} +{{end}} diff --git a/go.dev/cmd/internal/tmplfunc/tmpl.go b/go.dev/cmd/internal/tmplfunc/tmpl.go new file mode 100644 index 00000000..a10cbc53 --- /dev/null +++ b/go.dev/cmd/internal/tmplfunc/tmpl.go @@ -0,0 +1,213 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package tmplfunc provides an extension of Go templates +// in which templates can be invoked as if they were functions. +// +// For example, after parsing +// +// {{define "link url text"}}{{.text}}{{end}} +// +// this package installs a function named link allowing the template +// to be invoked as +// +// {{link "https://golang.org" "the Go language"}} +// +// instead of the longer-form (assuming an appropriate function named dict) +// +// {{template "link" (dict "url" "https://golang.org" "text" "the Go language")}} +// +// Function Definitions +// +// The function installed for a given template depends on the name of the +// defined template, which can include not just a function name but also +// a list of parameter names. The function name and parameter names must +// consist only of letters, digits, and underscores, with a leading non-digit. +// +// If there is no parameter list, then the function is expected to take +// at most one argument, made available in the template body as “.” (dot). +// If such a function is called with no arguments, dot will be a nil interface value. +// +// If there is a parameter list, then the function requires an argument for +// each parameter, except for optional and variadic parameters, explained below. +// Inside the template, the top-level value “.” is a map[string]interface{} in which +// each parameter name is mapped to the corresponding argument value. +// A parameter x can therefore be accessed as {{(index . "x")}} or, more concisely, {{.x}}. +// +// The first special case in parameter handling is that +// a parameter can be made optional by adding a “?” suffix after its name. +// If the argument list ends before that parameter, the corresponding map entry +// will be present and set to a nil value. +// The second special case is that a parameter can be made variadic +// by adding a “...” suffix after its name. +// The corresponding map entry contains a []interface{} holding the +// zero or more arguments corresponding to that parameter. +// +// In the parameter list, required parameters must precede optional parameters, +// which must in turn precede any variadic parameter. +// +// For example, we can revise the link template given earlier to make the +// link text optional, substituting the URL when the text is omitted: +// +// {{define "link url text?"}}{{or .text .url}}{{end}} +// +// The Go home page is {{link "https://golang.org"}}. +// +// Usage +// +// This package is meant to be used with templates from either the +// text/template or html/template packages. Given a *template.Template +// variable t, substitute: +// +// t.Parse(text) -> tmplfunc.Parse(t, text) +// t.ParseFiles(list) -> tmplfunc.ParseFiles(t, list) +// t.ParseGlob(pattern) -> tmplfunc.ParseGlob(t, pattern) +// +// Parse, ParseFiles, and ParseGlob parse the new templates but also add +// functions that invoke them, named according to the function signatures. +// Templates can only invoke functions for templates that have already been +// defined or that are being defined in the same Parse, ParseFiles, or ParseGlob call. +// For example, templates in two files x.tmpl and y.tmpl can call each other +// only if ParseFiles or ParseGlob is used to parse both files in a single call. +// Otherwise, the parsing of the first file will report that calls to templates in +// the second file are calling unknown functions. +// +// When used with the html/template package, all function-invoked template +// calls are treated as invoking templates producing HTML. In order to use a +// template that produces some other kind of text fragment, the template must +// be invoked directly using the {{template "name"}} form, not as a function call. +package tmplfunc + +import ( + "fmt" + "io/ioutil" + "path/filepath" + + htmltemplate "html/template" + texttemplate "text/template" +) + +// A Template is a *template.Template, where template refers to either +// the html/template or text/template package. +type Template interface { + // Method here only to make most types that are not a *template.Template + // not implement the interface. The requirement here is to be one of the two + // template types, not just to have this single method. + DefinedTemplates() string + Name() string +} + +// Parse is like t.Parse(text), adding functions for the templates defined in text. +func Parse(t Template, text string) error { + if err := funcs(t, []string{t.Name()}, []string{text}); err != nil { + return err + } + var err error + switch t := t.(type) { + case *texttemplate.Template: + _, err = t.Parse(text) + case *htmltemplate.Template: + _, err = t.Parse(text) + } + return err +} + +// ParseFiles is like t.ParseFiles(filenames...), adding functions for the parsed templates. +func ParseFiles(t Template, filenames ...string) error { + return parseFiles(t, readFileOS, filenames...) +} + +// parseFiles is the helper for the method and function. If the argument +// template is nil, it is created from the first file. +func parseFiles(t Template, readFile func(string) (string, []byte, error), filenames ...string) error { + if len(filenames) == 0 { + // Not really a problem, but be consistent. + return fmt.Errorf("tmplfunc: no files named in call to ParseFiles") + } + + var names []string + var texts []string + for _, filename := range filenames { + name, b, err := readFile(filename) + if err != nil { + return err + } + names = append(names, name) + texts = append(texts, string(b)) + } + + err := funcs(t, names, texts) + if err != nil { + return err + } + + switch t := t.(type) { + case *texttemplate.Template: + for i, name := range names { + var tmpl *texttemplate.Template + if name == t.Name() { + tmpl = t + } else { + tmpl = t.New(name) + } + if _, err := tmpl.Parse(texts[i]); err != nil { + return err + } + } + + case *htmltemplate.Template: + for i, name := range names { + var tmpl *htmltemplate.Template + if name == t.Name() { + tmpl = t + } else { + tmpl = t.New(name) + } + if _, err := tmpl.Parse(texts[i]); err != nil { + return err + } + } + } + + return nil +} + +// ParseGlob is like t.ParseGlob(pattern), adding functions for the parsed templates. +func ParseGlob(t Template, pattern string) error { + filenames, err := filepath.Glob(pattern) + if err != nil { + return err + } + if len(filenames) == 0 { + return fmt.Errorf("tmplfunc: pattern matches no files: %#q", pattern) + } + return parseFiles(t, readFileOS, filenames...) +} + +func must(err error) { + if err != nil { + panic(err) + } +} + +// MustParse is like Parse but panics on error. +func MustParse(t Template, text string) { + must(Parse(t, text)) +} + +// MustParseFiles is like ParseFiles but panics on error. +func MustParseFiles(t Template, filenames ...string) { + must(ParseFiles(t, filenames...)) +} + +// MustParseGlob is like ParseGlob but panics on error. +func MustParseGlob(t Template, pattern string) { + must(ParseGlob(t, pattern)) +} + +func readFileOS(file string) (name string, b []byte, err error) { + name = filepath.Base(file) + b, err = ioutil.ReadFile(file) + return +} diff --git a/go.dev/cmd/internal/tmplfunc/tmplfunc_test.go b/go.dev/cmd/internal/tmplfunc/tmplfunc_test.go new file mode 100644 index 00000000..4b278190 --- /dev/null +++ b/go.dev/cmd/internal/tmplfunc/tmplfunc_test.go @@ -0,0 +1,111 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package tmplfunc + +import ( + "bytes" + "fmt" + "strings" + "testing" + + htmltemplate "html/template" + texttemplate "text/template" +) + +var tests = []struct { + in string + out string +}{ + {`{{define "hello"}}hello {{.}}{{end}}{{template "hello" "world"}}`, "hello world"}, + {`{{define "hello"}}hello {{.}}{{end}}{{hello "world"}}`, "hello world"}, + {`{{define "hello who"}}hello {{.who}}{{end}}{{hello "world"}}`, "hello world"}, + {`{{define "hello who"}}hello {{.who}}{{end}}{{hello}}`, + "EXEC: template: :1:45: executing \"\" at : error calling hello: too few arguments in call to template hello", + }, + {`{{define "hello who?"}}hello {{.who}}{{end}}{{hello}}`, "hello"}, + {`{{define "hello who?"}}hello {{.who}}{{end}}{{hello "world"}}`, "hello world"}, + {`{{define "hello who..."}}hello {{.who}}{{end}}{{hello}}`, "hello []"}, + {`{{define "hello who..."}}hello {{.who}}{{end}}{{hello "world"}}`, "hello [world]"}, +} + +func TestText(t *testing.T) { + for i, tt := range tests { + t.Run(fmt.Sprint(i), func(t *testing.T) { + tmpl := texttemplate.New("") + err := Parse(tmpl, tt.in) + var out string + if err != nil { + out = "PARSE: " + err.Error() + } else { + var buf bytes.Buffer + err := tmpl.Execute(&buf, nil) + if err != nil { + out = "EXEC: " + err.Error() + } else { + out = strings.ReplaceAll(buf.String(), "", "") // text generates these but html does not + out = strings.TrimSpace(out) + } + } + if out != tt.out { + t.Errorf("have: %s\nwant: %s", out, tt.out) + } + }) + } +} + +func TestHTML(t *testing.T) { + for i, tt := range tests { + t.Run(fmt.Sprint(i), func(t *testing.T) { + tmpl := htmltemplate.New("") + err := Parse(tmpl, tt.in) + var out string + if err != nil { + out = "PARSE: " + err.Error() + } else { + var buf bytes.Buffer + err := tmpl.Execute(&buf, nil) + if err != nil { + out = "EXEC: " + err.Error() + } else { + out = strings.TrimSpace(buf.String()) + } + } + if out != tt.out { + t.Errorf("have: %s\nwant: %s", out, tt.out) + } + }) + } +} + +func TestGlob(t *testing.T) { + tmpl := texttemplate.New("") + MustParseGlob(tmpl, "testdata/*.tmpl") + texttemplate.Must(tmpl.Parse("{{x .}}")) + + var buf bytes.Buffer + must(tmpl.Execute(&buf, []int{1, 2, 3})) + out := strings.TrimSpace(buf.String()) + if out != "y" { + t.Fatalf("out = %q, want %q", out, "y") + } +} + +func TestFuncs(t *testing.T) { + tmpl := htmltemplate.New("") + MustParseGlob(tmpl, "testdata/*.tmpl") + htmltemplate.Must(tmpl.Parse("{{x .}}")) + + tmpl2 := htmltemplate.Must(tmpl.Clone()) + if err := Funcs(tmpl2); err != nil { + t.Fatal(err) + } + tmpl2.Execute(new(bytes.Buffer), nil) + + if _, err := tmpl.Clone(); err != nil { + // Happens if you forget to call Funcs above: + // cannot Clone "" after it has executed + t.Fatal(err) + } +} -- cgit v1.3 From 538f1d17149f6c47f8e4794e1fb6c64b8af2318d Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 24 May 2021 22:28:01 -0400 Subject: [x/go.dev] cmd/internal: add forked copies of Go 1.17+ text/template and html/template The most pressing need is a fixed eq that will ship in Go 1.17, which allows comparing an interface nil against a string, as in (eq .notavailable "hello"). It also has pending Go 1.18 features break/continue and short-circuit and/or, which are likely to be useful. It has the io/fs-based APIs from Go 1.16 removed, since App Engine does not yet support io/fs. Since we already had a copy of text/template/parse as tmplfunc/internal/parse, changed tmplfunc to use the copy being imported here. Change-Id: I4619db1846c3002de38ae26f277b12e7041883b9 X-GoDev-Commit: 6f3361e314ab1d286011d8fc26e8ea4482415ec7 --- go.dev/cmd/internal/README.md | 9 + go.dev/cmd/internal/fmtsort/export_test.go | 11 + go.dev/cmd/internal/fmtsort/sort.go | 220 +++ go.dev/cmd/internal/fmtsort/sort_test.go | 269 +++ go.dev/cmd/internal/html/template/attr.go | 175 ++ go.dev/cmd/internal/html/template/attr_string.go | 16 + go.dev/cmd/internal/html/template/clone_test.go | 280 +++ go.dev/cmd/internal/html/template/content.go | 185 ++ go.dev/cmd/internal/html/template/content_test.go | 458 +++++ go.dev/cmd/internal/html/template/context.go | 265 +++ go.dev/cmd/internal/html/template/css.go | 260 +++ go.dev/cmd/internal/html/template/css_test.go | 281 +++ go.dev/cmd/internal/html/template/delim_string.go | 16 + go.dev/cmd/internal/html/template/doc.go | 241 +++ .../cmd/internal/html/template/element_string.go | 16 + go.dev/cmd/internal/html/template/error.go | 234 +++ go.dev/cmd/internal/html/template/escape.go | 962 ++++++++++ go.dev/cmd/internal/html/template/escape_test.go | 1994 ++++++++++++++++++++ go.dev/cmd/internal/html/template/example_test.go | 182 ++ .../internal/html/template/examplefiles_test.go | 227 +++ go.dev/cmd/internal/html/template/exec_test.go | 1834 ++++++++++++++++++ go.dev/cmd/internal/html/template/html.go | 265 +++ go.dev/cmd/internal/html/template/html_test.go | 97 + go.dev/cmd/internal/html/template/js.go | 431 +++++ go.dev/cmd/internal/html/template/js_test.go | 423 +++++ go.dev/cmd/internal/html/template/jsctx_string.go | 16 + go.dev/cmd/internal/html/template/multi_test.go | 247 +++ go.dev/cmd/internal/html/template/state_string.go | 16 + go.dev/cmd/internal/html/template/template.go | 496 +++++ go.dev/cmd/internal/html/template/template_test.go | 219 +++ .../cmd/internal/html/template/testdata/file1.tmpl | 2 + .../cmd/internal/html/template/testdata/file2.tmpl | 2 + go.dev/cmd/internal/html/template/testdata/fs.zip | Bin 0 -> 406 bytes .../cmd/internal/html/template/testdata/tmpl1.tmpl | 3 + .../cmd/internal/html/template/testdata/tmpl2.tmpl | 3 + go.dev/cmd/internal/html/template/transition.go | 592 ++++++ .../cmd/internal/html/template/transition_test.go | 60 + go.dev/cmd/internal/html/template/url.go | 219 +++ go.dev/cmd/internal/html/template/url_test.go | 169 ++ .../cmd/internal/html/template/urlpart_string.go | 16 + go.dev/cmd/internal/text/template/doc.go | 463 +++++ go.dev/cmd/internal/text/template/example_test.go | 111 ++ .../internal/text/template/examplefiles_test.go | 183 ++ .../cmd/internal/text/template/examplefunc_test.go | 55 + go.dev/cmd/internal/text/template/exec.go | 1028 ++++++++++ go.dev/cmd/internal/text/template/exec_test.go | 1782 +++++++++++++++++ go.dev/cmd/internal/text/template/funcs.go | 753 ++++++++ go.dev/cmd/internal/text/template/funcs.go.save | 771 ++++++++ go.dev/cmd/internal/text/template/helper.go | 135 ++ go.dev/cmd/internal/text/template/multi_test.go | 425 +++++ go.dev/cmd/internal/text/template/option.go | 74 + go.dev/cmd/internal/text/template/parse/lex.go | 682 +++++++ .../cmd/internal/text/template/parse/lex_test.go | 559 ++++++ go.dev/cmd/internal/text/template/parse/node.go | 1008 ++++++++++ go.dev/cmd/internal/text/template/parse/parse.go | 796 ++++++++ .../cmd/internal/text/template/parse/parse_test.go | 676 +++++++ go.dev/cmd/internal/text/template/template.go | 239 +++ .../cmd/internal/text/template/testdata/file1.tmpl | 2 + .../cmd/internal/text/template/testdata/file2.tmpl | 2 + .../cmd/internal/text/template/testdata/tmpl1.tmpl | 3 + .../cmd/internal/text/template/testdata/tmpl2.tmpl | 3 + go.dev/cmd/internal/tmplfunc/func.go | 6 +- go.dev/cmd/internal/tmplfunc/internal/parse/lex.go | 671 ------- .../internal/tmplfunc/internal/parse/lex_test.go | 557 ------ .../cmd/internal/tmplfunc/internal/parse/node.go | 972 ---------- .../cmd/internal/tmplfunc/internal/parse/parse.go | 756 -------- .../internal/tmplfunc/internal/parse/parse_test.go | 668 ------- go.dev/cmd/internal/tmplfunc/tmpl.go | 4 +- go.dev/cmd/internal/tmplfunc/tmplfunc_test.go | 4 +- 69 files changed, 21168 insertions(+), 3631 deletions(-) create mode 100644 go.dev/cmd/internal/README.md create mode 100644 go.dev/cmd/internal/fmtsort/export_test.go create mode 100644 go.dev/cmd/internal/fmtsort/sort.go create mode 100644 go.dev/cmd/internal/fmtsort/sort_test.go create mode 100644 go.dev/cmd/internal/html/template/attr.go create mode 100644 go.dev/cmd/internal/html/template/attr_string.go create mode 100644 go.dev/cmd/internal/html/template/clone_test.go create mode 100644 go.dev/cmd/internal/html/template/content.go create mode 100644 go.dev/cmd/internal/html/template/content_test.go create mode 100644 go.dev/cmd/internal/html/template/context.go create mode 100644 go.dev/cmd/internal/html/template/css.go create mode 100644 go.dev/cmd/internal/html/template/css_test.go create mode 100644 go.dev/cmd/internal/html/template/delim_string.go create mode 100644 go.dev/cmd/internal/html/template/doc.go create mode 100644 go.dev/cmd/internal/html/template/element_string.go create mode 100644 go.dev/cmd/internal/html/template/error.go create mode 100644 go.dev/cmd/internal/html/template/escape.go create mode 100644 go.dev/cmd/internal/html/template/escape_test.go create mode 100644 go.dev/cmd/internal/html/template/example_test.go create mode 100644 go.dev/cmd/internal/html/template/examplefiles_test.go create mode 100644 go.dev/cmd/internal/html/template/exec_test.go create mode 100644 go.dev/cmd/internal/html/template/html.go create mode 100644 go.dev/cmd/internal/html/template/html_test.go create mode 100644 go.dev/cmd/internal/html/template/js.go create mode 100644 go.dev/cmd/internal/html/template/js_test.go create mode 100644 go.dev/cmd/internal/html/template/jsctx_string.go create mode 100644 go.dev/cmd/internal/html/template/multi_test.go create mode 100644 go.dev/cmd/internal/html/template/state_string.go create mode 100644 go.dev/cmd/internal/html/template/template.go create mode 100644 go.dev/cmd/internal/html/template/template_test.go create mode 100644 go.dev/cmd/internal/html/template/testdata/file1.tmpl create mode 100644 go.dev/cmd/internal/html/template/testdata/file2.tmpl create mode 100644 go.dev/cmd/internal/html/template/testdata/fs.zip create mode 100644 go.dev/cmd/internal/html/template/testdata/tmpl1.tmpl create mode 100644 go.dev/cmd/internal/html/template/testdata/tmpl2.tmpl create mode 100644 go.dev/cmd/internal/html/template/transition.go create mode 100644 go.dev/cmd/internal/html/template/transition_test.go create mode 100644 go.dev/cmd/internal/html/template/url.go create mode 100644 go.dev/cmd/internal/html/template/url_test.go create mode 100644 go.dev/cmd/internal/html/template/urlpart_string.go create mode 100644 go.dev/cmd/internal/text/template/doc.go create mode 100644 go.dev/cmd/internal/text/template/example_test.go create mode 100644 go.dev/cmd/internal/text/template/examplefiles_test.go create mode 100644 go.dev/cmd/internal/text/template/examplefunc_test.go create mode 100644 go.dev/cmd/internal/text/template/exec.go create mode 100644 go.dev/cmd/internal/text/template/exec_test.go create mode 100644 go.dev/cmd/internal/text/template/funcs.go create mode 100644 go.dev/cmd/internal/text/template/funcs.go.save create mode 100644 go.dev/cmd/internal/text/template/helper.go create mode 100644 go.dev/cmd/internal/text/template/multi_test.go create mode 100644 go.dev/cmd/internal/text/template/option.go create mode 100644 go.dev/cmd/internal/text/template/parse/lex.go create mode 100644 go.dev/cmd/internal/text/template/parse/lex_test.go create mode 100644 go.dev/cmd/internal/text/template/parse/node.go create mode 100644 go.dev/cmd/internal/text/template/parse/parse.go create mode 100644 go.dev/cmd/internal/text/template/parse/parse_test.go create mode 100644 go.dev/cmd/internal/text/template/template.go create mode 100644 go.dev/cmd/internal/text/template/testdata/file1.tmpl create mode 100644 go.dev/cmd/internal/text/template/testdata/file2.tmpl create mode 100644 go.dev/cmd/internal/text/template/testdata/tmpl1.tmpl create mode 100644 go.dev/cmd/internal/text/template/testdata/tmpl2.tmpl delete mode 100644 go.dev/cmd/internal/tmplfunc/internal/parse/lex.go delete mode 100644 go.dev/cmd/internal/tmplfunc/internal/parse/lex_test.go delete mode 100644 go.dev/cmd/internal/tmplfunc/internal/parse/node.go delete mode 100644 go.dev/cmd/internal/tmplfunc/internal/parse/parse.go delete mode 100644 go.dev/cmd/internal/tmplfunc/internal/parse/parse_test.go diff --git a/go.dev/cmd/internal/README.md b/go.dev/cmd/internal/README.md new file mode 100644 index 00000000..9530049e --- /dev/null +++ b/go.dev/cmd/internal/README.md @@ -0,0 +1,9 @@ +internal/fmtsort, internal/html/template, internal/text/template, +and internal/text/template/parse are copied from the standard library +as of May 2021. The text/template code contains various bug fixes +that the site depends on, as well as two features planned for Go 1.18: +break and continue in range loops and short-circuit and/or +(CL 321491 and CL 321490). + +internal/tmplfunc is a copy of rsc.io/tmplfunc, which may some day +make it into the standard library. diff --git a/go.dev/cmd/internal/fmtsort/export_test.go b/go.dev/cmd/internal/fmtsort/export_test.go new file mode 100644 index 00000000..25cbb5d4 --- /dev/null +++ b/go.dev/cmd/internal/fmtsort/export_test.go @@ -0,0 +1,11 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fmtsort + +import "reflect" + +func Compare(a, b reflect.Value) int { + return compare(a, b) +} diff --git a/go.dev/cmd/internal/fmtsort/sort.go b/go.dev/cmd/internal/fmtsort/sort.go new file mode 100644 index 00000000..7127ba6a --- /dev/null +++ b/go.dev/cmd/internal/fmtsort/sort.go @@ -0,0 +1,220 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package fmtsort provides a general stable ordering mechanism +// for maps, on behalf of the fmt and text/template packages. +// It is not guaranteed to be efficient and works only for types +// that are valid map keys. +package fmtsort + +import ( + "reflect" + "sort" +) + +// Note: Throughout this package we avoid calling reflect.Value.Interface as +// it is not always legal to do so and it's easier to avoid the issue than to face it. + +// SortedMap represents a map's keys and values. The keys and values are +// aligned in index order: Value[i] is the value in the map corresponding to Key[i]. +type SortedMap struct { + Key []reflect.Value + Value []reflect.Value +} + +func (o *SortedMap) Len() int { return len(o.Key) } +func (o *SortedMap) Less(i, j int) bool { return compare(o.Key[i], o.Key[j]) < 0 } +func (o *SortedMap) Swap(i, j int) { + o.Key[i], o.Key[j] = o.Key[j], o.Key[i] + o.Value[i], o.Value[j] = o.Value[j], o.Value[i] +} + +// Sort accepts a map and returns a SortedMap that has the same keys and +// values but in a stable sorted order according to the keys, modulo issues +// raised by unorderable key values such as NaNs. +// +// The ordering rules are more general than with Go's < operator: +// +// - when applicable, nil compares low +// - ints, floats, and strings order by < +// - NaN compares less than non-NaN floats +// - bool compares false before true +// - complex compares real, then imag +// - pointers compare by machine address +// - channel values compare by machine address +// - structs compare each field in turn +// - arrays compare each element in turn. +// Otherwise identical arrays compare by length. +// - interface values compare first by reflect.Type describing the concrete type +// and then by concrete value as described in the previous rules. +// +func Sort(mapValue reflect.Value) *SortedMap { + if mapValue.Type().Kind() != reflect.Map { + return nil + } + // Note: this code is arranged to not panic even in the presence + // of a concurrent map update. The runtime is responsible for + // yelling loudly if that happens. See issue 33275. + n := mapValue.Len() + key := make([]reflect.Value, 0, n) + value := make([]reflect.Value, 0, n) + iter := mapValue.MapRange() + for iter.Next() { + key = append(key, iter.Key()) + value = append(value, iter.Value()) + } + sorted := &SortedMap{ + Key: key, + Value: value, + } + sort.Stable(sorted) + return sorted +} + +// compare compares two values of the same type. It returns -1, 0, 1 +// according to whether a > b (1), a == b (0), or a < b (-1). +// If the types differ, it returns -1. +// See the comment on Sort for the comparison rules. +func compare(aVal, bVal reflect.Value) int { + aType, bType := aVal.Type(), bVal.Type() + if aType != bType { + return -1 // No good answer possible, but don't return 0: they're not equal. + } + switch aVal.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + a, b := aVal.Int(), bVal.Int() + switch { + case a < b: + return -1 + case a > b: + return 1 + default: + return 0 + } + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + a, b := aVal.Uint(), bVal.Uint() + switch { + case a < b: + return -1 + case a > b: + return 1 + default: + return 0 + } + case reflect.String: + a, b := aVal.String(), bVal.String() + switch { + case a < b: + return -1 + case a > b: + return 1 + default: + return 0 + } + case reflect.Float32, reflect.Float64: + return floatCompare(aVal.Float(), bVal.Float()) + case reflect.Complex64, reflect.Complex128: + a, b := aVal.Complex(), bVal.Complex() + if c := floatCompare(real(a), real(b)); c != 0 { + return c + } + return floatCompare(imag(a), imag(b)) + case reflect.Bool: + a, b := aVal.Bool(), bVal.Bool() + switch { + case a == b: + return 0 + case a: + return 1 + default: + return -1 + } + case reflect.Ptr, reflect.UnsafePointer: + a, b := aVal.Pointer(), bVal.Pointer() + switch { + case a < b: + return -1 + case a > b: + return 1 + default: + return 0 + } + case reflect.Chan: + if c, ok := nilCompare(aVal, bVal); ok { + return c + } + ap, bp := aVal.Pointer(), bVal.Pointer() + switch { + case ap < bp: + return -1 + case ap > bp: + return 1 + default: + return 0 + } + case reflect.Struct: + for i := 0; i < aVal.NumField(); i++ { + if c := compare(aVal.Field(i), bVal.Field(i)); c != 0 { + return c + } + } + return 0 + case reflect.Array: + for i := 0; i < aVal.Len(); i++ { + if c := compare(aVal.Index(i), bVal.Index(i)); c != 0 { + return c + } + } + return 0 + case reflect.Interface: + if c, ok := nilCompare(aVal, bVal); ok { + return c + } + c := compare(reflect.ValueOf(aVal.Elem().Type()), reflect.ValueOf(bVal.Elem().Type())) + if c != 0 { + return c + } + return compare(aVal.Elem(), bVal.Elem()) + default: + // Certain types cannot appear as keys (maps, funcs, slices), but be explicit. + panic("bad type in compare: " + aType.String()) + } +} + +// nilCompare checks whether either value is nil. If not, the boolean is false. +// If either value is nil, the boolean is true and the integer is the comparison +// value. The comparison is defined to be 0 if both are nil, otherwise the one +// nil value compares low. Both arguments must represent a chan, func, +// interface, map, pointer, or slice. +func nilCompare(aVal, bVal reflect.Value) (int, bool) { + if aVal.IsNil() { + if bVal.IsNil() { + return 0, true + } + return -1, true + } + if bVal.IsNil() { + return 1, true + } + return 0, false +} + +// floatCompare compares two floating-point values. NaNs compare low. +func floatCompare(a, b float64) int { + switch { + case isNaN(a): + return -1 // No good answer if b is a NaN so don't bother checking. + case isNaN(b): + return 1 + case a < b: + return -1 + case a > b: + return 1 + } + return 0 +} + +func isNaN(a float64) bool { + return a != a +} diff --git a/go.dev/cmd/internal/fmtsort/sort_test.go b/go.dev/cmd/internal/fmtsort/sort_test.go new file mode 100644 index 00000000..93b7b3f6 --- /dev/null +++ b/go.dev/cmd/internal/fmtsort/sort_test.go @@ -0,0 +1,269 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fmtsort_test + +import ( + "fmt" + "math" + "reflect" + "strings" + "testing" + "unsafe" + + "golang.org/x/go.dev/cmd/internal/fmtsort" +) + +var compareTests = [][]reflect.Value{ + ct(reflect.TypeOf(int(0)), -1, 0, 1), + ct(reflect.TypeOf(int8(0)), -1, 0, 1), + ct(reflect.TypeOf(int16(0)), -1, 0, 1), + ct(reflect.TypeOf(int32(0)), -1, 0, 1), + ct(reflect.TypeOf(int64(0)), -1, 0, 1), + ct(reflect.TypeOf(uint(0)), 0, 1, 5), + ct(reflect.TypeOf(uint8(0)), 0, 1, 5), + ct(reflect.TypeOf(uint16(0)), 0, 1, 5), + ct(reflect.TypeOf(uint32(0)), 0, 1, 5), + ct(reflect.TypeOf(uint64(0)), 0, 1, 5), + ct(reflect.TypeOf(uintptr(0)), 0, 1, 5), + ct(reflect.TypeOf(string("")), "", "a", "ab"), + ct(reflect.TypeOf(float32(0)), math.NaN(), math.Inf(-1), -1e10, 0, 1e10, math.Inf(1)), + ct(reflect.TypeOf(float64(0)), math.NaN(), math.Inf(-1), -1e10, 0, 1e10, math.Inf(1)), + ct(reflect.TypeOf(complex64(0+1i)), -1-1i, -1+0i, -1+1i, 0-1i, 0+0i, 0+1i, 1-1i, 1+0i, 1+1i), + ct(reflect.TypeOf(complex128(0+1i)), -1-1i, -1+0i, -1+1i, 0-1i, 0+0i, 0+1i, 1-1i, 1+0i, 1+1i), + ct(reflect.TypeOf(false), false, true), + ct(reflect.TypeOf(&ints[0]), &ints[0], &ints[1], &ints[2]), + ct(reflect.TypeOf(unsafe.Pointer(&ints[0])), unsafe.Pointer(&ints[0]), unsafe.Pointer(&ints[1]), unsafe.Pointer(&ints[2])), + ct(reflect.TypeOf(chans[0]), chans[0], chans[1], chans[2]), + ct(reflect.TypeOf(toy{}), toy{0, 1}, toy{0, 2}, toy{1, -1}, toy{1, 1}), + ct(reflect.TypeOf([2]int{}), [2]int{1, 1}, [2]int{1, 2}, [2]int{2, 0}), + ct(reflect.TypeOf(interface{}(interface{}(0))), iFace, 1, 2, 3), +} + +var iFace interface{} + +func ct(typ reflect.Type, args ...interface{}) []reflect.Value { + value := make([]reflect.Value, len(args)) + for i, v := range args { + x := reflect.ValueOf(v) + if !x.IsValid() { // Make it a typed nil. + x = reflect.Zero(typ) + } else { + x = x.Convert(typ) + } + value[i] = x + } + return value +} + +func TestCompare(t *testing.T) { + for _, test := range compareTests { + for i, v0 := range test { + for j, v1 := range test { + c := fmtsort.Compare(v0, v1) + var expect int + switch { + case i == j: + expect = 0 + // NaNs are tricky. + if typ := v0.Type(); (typ.Kind() == reflect.Float32 || typ.Kind() == reflect.Float64) && math.IsNaN(v0.Float()) { + expect = -1 + } + case i < j: + expect = -1 + case i > j: + expect = 1 + } + if c != expect { + t.Errorf("%s: compare(%v,%v)=%d; expect %d", v0.Type(), v0, v1, c, expect) + } + } + } + } +} + +type sortTest struct { + data interface{} // Always a map. + print string // Printed result using our custom printer. +} + +var sortTests = []sortTest{ + { + map[int]string{7: "bar", -3: "foo"}, + "-3:foo 7:bar", + }, + { + map[uint8]string{7: "bar", 3: "foo"}, + "3:foo 7:bar", + }, + { + map[string]string{"7": "bar", "3": "foo"}, + "3:foo 7:bar", + }, + { + map[float64]string{7: "bar", -3: "foo", math.NaN(): "nan", math.Inf(0): "inf"}, + "NaN:nan -3:foo 7:bar +Inf:inf", + }, + { + map[complex128]string{7 + 2i: "bar2", 7 + 1i: "bar", -3: "foo", complex(math.NaN(), 0i): "nan", complex(math.Inf(0), 0i): "inf"}, + "(NaN+0i):nan (-3+0i):foo (7+1i):bar (7+2i):bar2 (+Inf+0i):inf", + }, + { + map[bool]string{true: "true", false: "false"}, + "false:false true:true", + }, + { + chanMap(), + "CHAN0:0 CHAN1:1 CHAN2:2", + }, + { + pointerMap(), + "PTR0:0 PTR1:1 PTR2:2", + }, + { + unsafePointerMap(), + "UNSAFEPTR0:0 UNSAFEPTR1:1 UNSAFEPTR2:2", + }, + { + map[toy]string{{7, 2}: "72", {7, 1}: "71", {3, 4}: "34"}, + "{3 4}:34 {7 1}:71 {7 2}:72", + }, + { + map[[2]int]string{{7, 2}: "72", {7, 1}: "71", {3, 4}: "34"}, + "[3 4]:34 [7 1]:71 [7 2]:72", + }, +} + +func sprint(data interface{}) string { + om := fmtsort.Sort(reflect.ValueOf(data)) + if om == nil { + return "nil" + } + b := new(strings.Builder) + for i, key := range om.Key { + if i > 0 { + b.WriteRune(' ') + } + b.WriteString(sprintKey(key)) + b.WriteRune(':') + b.WriteString(fmt.Sprint(om.Value[i])) + } + return b.String() +} + +// sprintKey formats a reflect.Value but gives reproducible values for some +// problematic types such as pointers. Note that it only does special handling +// for the troublesome types used in the test cases; it is not a general +// printer. +func sprintKey(key reflect.Value) string { + switch str := key.Type().String(); str { + case "*int": + ptr := key.Interface().(*int) + for i := range ints { + if ptr == &ints[i] { + return fmt.Sprintf("PTR%d", i) + } + } + return "PTR???" + case "unsafe.Pointer": + ptr := key.Interface().(unsafe.Pointer) + for i := range ints { + if ptr == unsafe.Pointer(&ints[i]) { + return fmt.Sprintf("UNSAFEPTR%d", i) + } + } + return "UNSAFEPTR???" + case "chan int": + c := key.Interface().(chan int) + for i := range chans { + if c == chans[i] { + return fmt.Sprintf("CHAN%d", i) + } + } + return "CHAN???" + default: + return fmt.Sprint(key) + } +} + +var ( + ints [3]int + chans = [3]chan int{make(chan int), make(chan int), make(chan int)} +) + +func pointerMap() map[*int]string { + m := make(map[*int]string) + for i := 2; i >= 0; i-- { + m[&ints[i]] = fmt.Sprint(i) + } + return m +} + +func unsafePointerMap() map[unsafe.Pointer]string { + m := make(map[unsafe.Pointer]string) + for i := 2; i >= 0; i-- { + m[unsafe.Pointer(&ints[i])] = fmt.Sprint(i) + } + return m +} + +func chanMap() map[chan int]string { + m := make(map[chan int]string) + for i := 2; i >= 0; i-- { + m[chans[i]] = fmt.Sprint(i) + } + return m +} + +type toy struct { + A int // Exported. + b int // Unexported. +} + +func TestOrder(t *testing.T) { + for _, test := range sortTests { + got := sprint(test.data) + if got != test.print { + t.Errorf("%s: got %q, want %q", reflect.TypeOf(test.data), got, test.print) + } + } +} + +func TestInterface(t *testing.T) { + // A map containing multiple concrete types should be sorted by type, + // then value. However, the relative ordering of types is unspecified, + // so test this by checking the presence of sorted subgroups. + m := map[interface{}]string{ + [2]int{1, 0}: "", + [2]int{0, 1}: "", + true: "", + false: "", + 3.1: "", + 2.1: "", + 1.1: "", + math.NaN(): "", + 3: "", + 2: "", + 1: "", + "c": "", + "b": "", + "a": "", + struct{ x, y int }{1, 0}: "", + struct{ x, y int }{0, 1}: "", + } + got := sprint(m) + typeGroups := []string{ + "NaN: 1.1: 2.1: 3.1:", // float64 + "false: true:", // bool + "1: 2: 3:", // int + "a: b: c:", // string + "[0 1]: [1 0]:", // [2]int + "{0 1}: {1 0}:", // struct{ x int; y int } + } + for _, g := range typeGroups { + if !strings.Contains(got, g) { + t.Errorf("sorted map should contain %q", g) + } + } +} diff --git a/go.dev/cmd/internal/html/template/attr.go b/go.dev/cmd/internal/html/template/attr.go new file mode 100644 index 00000000..22922e60 --- /dev/null +++ b/go.dev/cmd/internal/html/template/attr.go @@ -0,0 +1,175 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package template + +import ( + "strings" +) + +// attrTypeMap[n] describes the value of the given attribute. +// If an attribute affects (or can mask) the encoding or interpretation of +// other content, or affects the contents, idempotency, or credentials of a +// network message, then the value in this map is contentTypeUnsafe. +// This map is derived from HTML5, specifically +// https://www.w3.org/TR/html5/Overview.html#attributes-1 +// as well as "%URI"-typed attributes from +// https://www.w3.org/TR/html4/index/attributes.html +var attrTypeMap = map[string]contentType{ + "accept": contentTypePlain, + "accept-charset": contentTypeUnsafe, + "action": contentTypeURL, + "alt": contentTypePlain, + "archive": contentTypeURL, + "async": contentTypeUnsafe, + "autocomplete": contentTypePlain, + "autofocus": contentTypePlain, + "autoplay": contentTypePlain, + "background": contentTypeURL, + "border": contentTypePlain, + "checked": contentTypePlain, + "cite": contentTypeURL, + "challenge": contentTypeUnsafe, + "charset": contentTypeUnsafe, + "class": contentTypePlain, + "classid": contentTypeURL, + "codebase": contentTypeURL, + "cols": contentTypePlain, + "colspan": contentTypePlain, + "content": contentTypeUnsafe, + "contenteditable": contentTypePlain, + "contextmenu": contentTypePlain, + "controls": contentTypePlain, + "coords": contentTypePlain, + "crossorigin": contentTypeUnsafe, + "data": contentTypeURL, + "datetime": contentTypePlain, + "default": contentTypePlain, + "defer": contentTypeUnsafe, + "dir": contentTypePlain, + "dirname": contentTypePlain, + "disabled": contentTypePlain, + "draggable": contentTypePlain, + "dropzone": contentTypePlain, + "enctype": contentTypeUnsafe, + "for": contentTypePlain, + "form": contentTypeUnsafe, + "formaction": contentTypeURL, + "formenctype": contentTypeUnsafe, + "formmethod": contentTypeUnsafe, + "formnovalidate": contentTypeUnsafe, + "formtarget": contentTypePlain, + "headers": contentTypePlain, + "height": contentTypePlain, + "hidden": contentTypePlain, + "high": contentTypePlain, + "href": contentTypeURL, + "hreflang": contentTypePlain, + "http-equiv": contentTypeUnsafe, + "icon": contentTypeURL, + "id": contentTypePlain, + "ismap": contentTypePlain, + "keytype": contentTypeUnsafe, + "kind": contentTypePlain, + "label": contentTypePlain, + "lang": contentTypePlain, + "language": contentTypeUnsafe, + "list": contentTypePlain, + "longdesc": contentTypeURL, + "loop": contentTypePlain, + "low": contentTypePlain, + "manifest": contentTypeURL, + "max": contentTypePlain, + "maxlength": contentTypePlain, + "media": contentTypePlain, + "mediagroup": contentTypePlain, + "method": contentTypeUnsafe, + "min": contentTypePlain, + "multiple": contentTypePlain, + "name": contentTypePlain, + "novalidate": contentTypeUnsafe, + // Skip handler names from + // https://www.w3.org/TR/html5/webappapis.html#event-handlers-on-elements,-document-objects,-and-window-objects + // since we have special handling in attrType. + "open": contentTypePlain, + "optimum": contentTypePlain, + "pattern": contentTypeUnsafe, + "placeholder": contentTypePlain, + "poster": contentTypeURL, + "profile": contentTypeURL, + "preload": contentTypePlain, + "pubdate": contentTypePlain, + "radiogroup": contentTypePlain, + "readonly": contentTypePlain, + "rel": contentTypeUnsafe, + "required": contentTypePlain, + "reversed": contentTypePlain, + "rows": contentTypePlain, + "rowspan": contentTypePlain, + "sandbox": contentTypeUnsafe, + "spellcheck": contentTypePlain, + "scope": contentTypePlain, + "scoped": contentTypePlain, + "seamless": contentTypePlain, + "selected": contentTypePlain, + "shape": contentTypePlain, + "size": contentTypePlain, + "sizes": contentTypePlain, + "span": contentTypePlain, + "src": contentTypeURL, + "srcdoc": contentTypeHTML, + "srclang": contentTypePlain, + "srcset": contentTypeSrcset, + "start": contentTypePlain, + "step": contentTypePlain, + "style": contentTypeCSS, + "tabindex": contentTypePlain, + "target": contentTypePlain, + "title": contentTypePlain, + "type": contentTypeUnsafe, + "usemap": contentTypeURL, + "value": contentTypeUnsafe, + "width": contentTypePlain, + "wrap": contentTypePlain, + "xmlns": contentTypeURL, +} + +// attrType returns a conservative (upper-bound on authority) guess at the +// type of the lowercase named attribute. +func attrType(name string) contentType { + if strings.HasPrefix(name, "data-") { + // Strip data- so that custom attribute heuristics below are + // widely applied. + // Treat data-action as URL below. + name = name[5:] + } else if colon := strings.IndexRune(name, ':'); colon != -1 { + if name[:colon] == "xmlns" { + return contentTypeURL + } + // Treat svg:href and xlink:href as href below. + name = name[colon+1:] + } + if t, ok := attrTypeMap[name]; ok { + return t + } + // Treat partial event handler names as script. + if strings.HasPrefix(name, "on") { + return contentTypeJS + } + + // Heuristics to prevent "javascript:..." injection in custom + // data attributes and custom attributes like g:tweetUrl. + // https://www.w3.org/TR/html5/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes + // "Custom data attributes are intended to store custom data + // private to the page or application, for which there are no + // more appropriate attributes or elements." + // Developers seem to store URL content in data URLs that start + // or end with "URI" or "URL". + if strings.Contains(name, "src") || + strings.Contains(name, "uri") || + strings.Contains(name, "url") { + return contentTypeURL + } + return contentTypePlain +} diff --git a/go.dev/cmd/internal/html/template/attr_string.go b/go.dev/cmd/internal/html/template/attr_string.go new file mode 100644 index 00000000..babe70c0 --- /dev/null +++ b/go.dev/cmd/internal/html/template/attr_string.go @@ -0,0 +1,16 @@ +// Code generated by "stringer -type attr"; DO NOT EDIT. + +package template + +import "strconv" + +const _attr_name = "attrNoneattrScriptattrScriptTypeattrStyleattrURLattrSrcset" + +var _attr_index = [...]uint8{0, 8, 18, 32, 41, 48, 58} + +func (i attr) String() string { + if i >= attr(len(_attr_index)-1) { + return "attr(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _attr_name[_attr_index[i]:_attr_index[i+1]] +} diff --git a/go.dev/cmd/internal/html/template/clone_test.go b/go.dev/cmd/internal/html/template/clone_test.go new file mode 100644 index 00000000..ef68dc71 --- /dev/null +++ b/go.dev/cmd/internal/html/template/clone_test.go @@ -0,0 +1,280 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package template + +import ( + "bytes" + "errors" + "fmt" + "io/ioutil" + "strings" + "sync" + "testing" + + "golang.org/x/go.dev/cmd/internal/text/template/parse" +) + +func TestAddParseTreeHTML(t *testing.T) { + root := Must(New("root").Parse(`{{define "a"}} {{.}} {{template "b"}} {{.}} ">{{end}}`)) + tree, err := parse.Parse("t", `{{define "b"}}0") + if err != nil { + t.Fatal(err) + } + if got, want := b.String(), ` 1>0 `; got != want { + t.Errorf("got %q want %q", got, want) + } +} + +func TestClone(t *testing.T) { + // The {{.}} will be executed with data "*/" in different contexts. + // In the t0 template, it will be in a text context. + // In the t1 template, it will be in a URL context. + // In the t2 template, it will be in a JavaScript context. + // In the t3 template, it will be in a CSS context. + const tmpl = `{{define "a"}}{{template "lhs"}}{{.}}{{template "rhs"}}{{end}}` + b := new(bytes.Buffer) + + // Create an incomplete template t0. + t0 := Must(New("t0").Parse(tmpl)) + + // Clone t0 as t1. + t1 := Must(t0.Clone()) + Must(t1.Parse(`{{define "lhs"}} {{end}}`)) + + // Execute t1. + b.Reset() + if err := t1.ExecuteTemplate(b, "a", "*/"); err != nil { + t.Fatal(err) + } + if got, want := b.String(), ` `; got != want { + t.Errorf("t1: got %q want %q", got, want) + } + + // Clone t0 as t2. + t2 := Must(t0.Clone()) + Must(t2.Parse(`{{define "lhs"}}

    {{end}}`)) + + // Execute t2. + b.Reset() + if err := t2.ExecuteTemplate(b, "a", "*/"); err != nil { + t.Fatal(err) + } + if got, want := b.String(), `

    `; got != want { + t.Errorf("t2: got %q want %q", got, want) + } + + // Clone t0 as t3, but do not execute t3 yet. + t3 := Must(t0.Clone()) + Must(t3.Parse(`{{define "lhs"}} {{end}}`)) + + // Complete t0. + Must(t0.Parse(`{{define "lhs"}} ( {{end}}`)) + Must(t0.Parse(`{{define "rhs"}} ) {{end}}`)) + + // Clone t0 as t4. Redefining the "lhs" template should not fail. + t4 := Must(t0.Clone()) + if _, err := t4.Parse(`{{define "lhs"}} OK {{end}}`); err != nil { + t.Errorf(`redefine "lhs": got err %v want nil`, err) + } + // Cloning t1 should fail as it has been executed. + if _, err := t1.Clone(); err == nil { + t.Error("cloning t1: got nil err want non-nil") + } + // Redefining the "lhs" template in t1 should fail as it has been executed. + if _, err := t1.Parse(`{{define "lhs"}} OK {{end}}`); err == nil { + t.Error(`redefine "lhs": got nil err want non-nil`) + } + + // Execute t0. + b.Reset() + if err := t0.ExecuteTemplate(b, "a", "*/"); err != nil { + t.Fatal(err) + } + if got, want := b.String(), ` ( <i>*/ ) `; got != want { + t.Errorf("t0: got %q want %q", got, want) + } + + // Clone t0. This should fail, as t0 has already executed. + if _, err := t0.Clone(); err == nil { + t.Error(`t0.Clone(): got nil err want non-nil`) + } + + // Similarly, cloning sub-templates should fail. + if _, err := t0.Lookup("a").Clone(); err == nil { + t.Error(`t0.Lookup("a").Clone(): got nil err want non-nil`) + } + if _, err := t0.Lookup("lhs").Clone(); err == nil { + t.Error(`t0.Lookup("lhs").Clone(): got nil err want non-nil`) + } + + // Execute t3. + b.Reset() + if err := t3.ExecuteTemplate(b, "a", "*/"); err != nil { + t.Fatal(err) + } + if got, want := b.String(), ` `; got != want { + t.Errorf("t3: got %q want %q", got, want) + } +} + +func TestTemplates(t *testing.T) { + names := []string{"t0", "a", "lhs", "rhs"} + // Some template definitions borrowed from TestClone. + const tmpl = ` + {{define "a"}}{{template "lhs"}}{{.}}{{template "rhs"}}{{end}} + {{define "lhs"}} {{end}}` + t0 := Must(New("t0").Parse(tmpl)) + templates := t0.Templates() + if len(templates) != len(names) { + t.Errorf("expected %d templates; got %d", len(names), len(templates)) + } + for _, name := range names { + found := false + for _, tmpl := range templates { + if name == tmpl.text.Name() { + found = true + break + } + } + if !found { + t.Error("could not find template", name) + } + } +} + +// This used to crash; https://golang.org/issue/3281 +func TestCloneCrash(t *testing.T) { + t1 := New("all") + Must(t1.New("t1").Parse(`{{define "foo"}}foo{{end}}`)) + t1.Clone() +} + +// Ensure that this guarantee from the docs is upheld: +// "Further calls to Parse in the copy will add templates +// to the copy but not to the original." +func TestCloneThenParse(t *testing.T) { + t0 := Must(New("t0").Parse(`{{define "a"}}{{template "embedded"}}{{end}}`)) + t1 := Must(t0.Clone()) + Must(t1.Parse(`{{define "embedded"}}t1{{end}}`)) + if len(t0.Templates())+1 != len(t1.Templates()) { + t.Error("adding a template to a clone added it to the original") + } + // double check that the embedded template isn't available in the original + err := t0.ExecuteTemplate(ioutil.Discard, "a", nil) + if err == nil { + t.Error("expected 'no such template' error") + } +} + +// https://golang.org/issue/5980 +func TestFuncMapWorksAfterClone(t *testing.T) { + funcs := FuncMap{"customFunc": func() (string, error) { + return "", errors.New("issue5980") + }} + + // get the expected error output (no clone) + uncloned := Must(New("").Funcs(funcs).Parse("{{customFunc}}")) + wantErr := uncloned.Execute(ioutil.Discard, nil) + + // toClone must be the same as uncloned. It has to be recreated from scratch, + // since cloning cannot occur after execution. + toClone := Must(New("").Funcs(funcs).Parse("{{customFunc}}")) + cloned := Must(toClone.Clone()) + gotErr := cloned.Execute(ioutil.Discard, nil) + + if wantErr.Error() != gotErr.Error() { + t.Errorf("clone error message mismatch want %q got %q", wantErr, gotErr) + } +} + +// https://golang.org/issue/16101 +func TestTemplateCloneExecuteRace(t *testing.T) { + const ( + input = `{{block "a" .}}a{{end}}{{block "b" .}}b{{end}}` + overlay = `{{define "b"}}A{{end}}` + ) + outer := Must(New("outer").Parse(input)) + tmpl := Must(Must(outer.Clone()).Parse(overlay)) + + var wg sync.WaitGroup + for i := 0; i < 10; i++ { + wg.Add(1) + go func() { + defer wg.Done() + for i := 0; i < 100; i++ { + if err := tmpl.Execute(ioutil.Discard, "data"); err != nil { + panic(err) + } + } + }() + } + wg.Wait() +} + +func TestTemplateCloneLookup(t *testing.T) { + // Template.escape makes an assumption that the template associated + // with t.Name() is t. Check that this holds. + tmpl := Must(New("x").Parse("a")) + tmpl = Must(tmpl.Clone()) + if tmpl.Lookup(tmpl.Name()) != tmpl { + t.Error("after Clone, tmpl.Lookup(tmpl.Name()) != tmpl") + } +} + +func TestCloneGrowth(t *testing.T) { + tmpl := Must(New("root").Parse(`{{block "B". }}Arg{{end}}`)) + tmpl = Must(tmpl.Clone()) + Must(tmpl.Parse(`{{define "B"}}Text{{end}}`)) + for i := 0; i < 10; i++ { + tmpl.Execute(ioutil.Discard, nil) + } + if len(tmpl.DefinedTemplates()) > 200 { + t.Fatalf("too many templates: %v", len(tmpl.DefinedTemplates())) + } +} + +// https://golang.org/issue/17735 +func TestCloneRedefinedName(t *testing.T) { + const base = ` +{{ define "a" -}}{{ template "b" . -}}{{ end -}} +{{ define "b" }}{{ end -}} +` + const page = `{{ template "a" . }}` + + t1 := Must(New("a").Parse(base)) + + for i := 0; i < 2; i++ { + t2 := Must(t1.Clone()) + t2 = Must(t2.New(fmt.Sprintf("%d", i)).Parse(page)) + err := t2.Execute(ioutil.Discard, nil) + if err != nil { + t.Fatal(err) + } + } +} + +// Issue 24791. +func TestClonePipe(t *testing.T) { + a := Must(New("a").Parse(`{{define "a"}}{{range $v := .A}}{{$v}}{{end}}{{end}}`)) + data := struct{ A []string }{A: []string{"hi"}} + b := Must(a.Clone()) + var buf strings.Builder + if err := b.Execute(&buf, &data); err != nil { + t.Fatal(err) + } + if got, want := buf.String(), "hi"; got != want { + t.Errorf("got %q want %q", got, want) + } +} diff --git a/go.dev/cmd/internal/html/template/content.go b/go.dev/cmd/internal/html/template/content.go new file mode 100644 index 00000000..6ba87a95 --- /dev/null +++ b/go.dev/cmd/internal/html/template/content.go @@ -0,0 +1,185 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package template + +import ( + "fmt" + "reflect" +) + +// Strings of content from a trusted source. +type ( + // CSS encapsulates known safe content that matches any of: + // 1. The CSS3 stylesheet production, such as `p { color: purple }`. + // 2. The CSS3 rule production, such as `a[href=~"https:"].foo#bar`. + // 3. CSS3 declaration productions, such as `color: red; margin: 2px`. + // 4. The CSS3 value production, such as `rgba(0, 0, 255, 127)`. + // See https://www.w3.org/TR/css3-syntax/#parsing and + // https://web.archive.org/web/20090211114933/http://w3.org/TR/css3-syntax#style + // + // Use of this type presents a security risk: + // the encapsulated content should come from a trusted source, + // as it will be included verbatim in the template output. + CSS string + + // HTML encapsulates a known safe HTML document fragment. + // It should not be used for HTML from a third-party, or HTML with + // unclosed tags or comments. The outputs of a sound HTML sanitizer + // and a template escaped by this package are fine for use with HTML. + // + // Use of this type presents a security risk: + // the encapsulated content should come from a trusted source, + // as it will be included verbatim in the template output. + HTML string + + // HTMLAttr encapsulates an HTML attribute from a trusted source, + // for example, ` dir="ltr"`. + // + // Use of this type presents a security risk: + // the encapsulated content should come from a trusted source, + // as it will be included verbatim in the template output. + HTMLAttr string + + // JS encapsulates a known safe EcmaScript5 Expression, for example, + // `(x + y * z())`. + // Template authors are responsible for ensuring that typed expressions + // do not break the intended precedence and that there is no + // statement/expression ambiguity as when passing an expression like + // "{ foo: bar() }\n['foo']()", which is both a valid Expression and a + // valid Program with a very different meaning. + // + // Use of this type presents a security risk: + // the encapsulated content should come from a trusted source, + // as it will be included verbatim in the template output. + // + // Using JS to include valid but untrusted JSON is not safe. + // A safe alternative is to parse the JSON with json.Unmarshal and then + // pass the resultant object into the template, where it will be + // converted to sanitized JSON when presented in a JavaScript context. + JS string + + // JSStr encapsulates a sequence of characters meant to be embedded + // between quotes in a JavaScript expression. + // The string must match a series of StringCharacters: + // StringCharacter :: SourceCharacter but not `\` or LineTerminator + // | EscapeSequence + // Note that LineContinuations are not allowed. + // JSStr("foo\\nbar") is fine, but JSStr("foo\\\nbar") is not. + // + // Use of this type presents a security risk: + // the encapsulated content should come from a trusted source, + // as it will be included verbatim in the template output. + JSStr string + + // URL encapsulates a known safe URL or URL substring (see RFC 3986). + // A URL like `javascript:checkThatFormNotEditedBeforeLeavingPage()` + // from a trusted source should go in the page, but by default dynamic + // `javascript:` URLs are filtered out since they are a frequently + // exploited injection vector. + // + // Use of this type presents a security risk: + // the encapsulated content should come from a trusted source, + // as it will be included verbatim in the template output. + URL string + + // Srcset encapsulates a known safe srcset attribute + // (see https://w3c.github.io/html/semantics-embedded-content.html#element-attrdef-img-srcset). + // + // Use of this type presents a security risk: + // the encapsulated content should come from a trusted source, + // as it will be included verbatim in the template output. + Srcset string +) + +type contentType uint8 + +const ( + contentTypePlain contentType = iota + contentTypeCSS + contentTypeHTML + contentTypeHTMLAttr + contentTypeJS + contentTypeJSStr + contentTypeURL + contentTypeSrcset + // contentTypeUnsafe is used in attr.go for values that affect how + // embedded content and network messages are formed, vetted, + // or interpreted; or which credentials network messages carry. + contentTypeUnsafe +) + +// indirect returns the value, after dereferencing as many times +// as necessary to reach the base type (or nil). +func indirect(a interface{}) interface{} { + if a == nil { + return nil + } + if t := reflect.TypeOf(a); t.Kind() != reflect.Ptr { + // Avoid creating a reflect.Value if it's not a pointer. + return a + } + v := reflect.ValueOf(a) + for v.Kind() == reflect.Ptr && !v.IsNil() { + v = v.Elem() + } + return v.Interface() +} + +var ( + errorType = reflect.TypeOf((*error)(nil)).Elem() + fmtStringerType = reflect.TypeOf((*fmt.Stringer)(nil)).Elem() +) + +// indirectToStringerOrError returns the value, after dereferencing as many times +// as necessary to reach the base type (or nil) or an implementation of fmt.Stringer +// or error, +func indirectToStringerOrError(a interface{}) interface{} { + if a == nil { + return nil + } + v := reflect.ValueOf(a) + for !v.Type().Implements(fmtStringerType) && !v.Type().Implements(errorType) && v.Kind() == reflect.Ptr && !v.IsNil() { + v = v.Elem() + } + return v.Interface() +} + +// stringify converts its arguments to a string and the type of the content. +// All pointers are dereferenced, as in the text/template package. +func stringify(args ...interface{}) (string, contentType) { + if len(args) == 1 { + switch s := indirect(args[0]).(type) { + case string: + return s, contentTypePlain + case CSS: + return string(s), contentTypeCSS + case HTML: + return string(s), contentTypeHTML + case HTMLAttr: + return string(s), contentTypeHTMLAttr + case JS: + return string(s), contentTypeJS + case JSStr: + return string(s), contentTypeJSStr + case URL: + return string(s), contentTypeURL + case Srcset: + return string(s), contentTypeSrcset + } + } + i := 0 + for _, arg := range args { + // We skip untyped nil arguments for backward compatibility. + // Without this they would be output as , escaped. + // See issue 25875. + if arg == nil { + continue + } + + args[i] = indirectToStringerOrError(arg) + i++ + } + return fmt.Sprint(args[:i]...), contentTypePlain +} diff --git a/go.dev/cmd/internal/html/template/content_test.go b/go.dev/cmd/internal/html/template/content_test.go new file mode 100644 index 00000000..bb1667b9 --- /dev/null +++ b/go.dev/cmd/internal/html/template/content_test.go @@ -0,0 +1,458 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package template + +import ( + "bytes" + "fmt" + "strings" + "testing" +) + +func TestTypedContent(t *testing.T) { + data := []interface{}{ + ` "foo%" O'Reilly &bar;`, + CSS(`a[href =~ "//example.com"]#foo`), + HTML(`Hello, World &tc!`), + HTMLAttr(` dir="ltr"`), + JS(`c && alert("Hello, World!");`), + JSStr(`Hello, World & O'Reilly\u0021`), + URL(`greeting=H%69,&addressee=(World)`), + Srcset(`greeting=H%69,&addressee=(World) 2x, https://golang.org/favicon.ico 500.5w`), + URL(`,foo/,`), + } + + // For each content sensitive escaper, see how it does on + // each of the typed strings above. + tests := []struct { + // A template containing a single {{.}}. + input string + want []string + }{ + { + ``, + []string{ + `ZgotmplZ`, + // Allowed but not escaped. + `a[href =~ "//example.com"]#foo`, + `ZgotmplZ`, + `ZgotmplZ`, + `ZgotmplZ`, + `ZgotmplZ`, + `ZgotmplZ`, + `ZgotmplZ`, + `ZgotmplZ`, + }, + }, + { + `
    `, + []string{ + `ZgotmplZ`, + // Allowed and HTML escaped. + `a[href =~ "//example.com"]#foo`, + `ZgotmplZ`, + `ZgotmplZ`, + `ZgotmplZ`, + `ZgotmplZ`, + `ZgotmplZ`, + `ZgotmplZ`, + `ZgotmplZ`, + }, + }, + { + `{{.}}`, + []string{ + `<b> "foo%" O'Reilly &bar;`, + `a[href =~ "//example.com"]#foo`, + // Not escaped. + `Hello, World &tc!`, + ` dir="ltr"`, + `c && alert("Hello, World!");`, + `Hello, World & O'Reilly\u0021`, + `greeting=H%69,&addressee=(World)`, + `greeting=H%69,&addressee=(World) 2x, https://golang.org/favicon.ico 500.5w`, + `,foo/,`, + }, + }, + { + ``, + []string{ + `ZgotmplZ`, + `ZgotmplZ`, + `ZgotmplZ`, + // Allowed and HTML escaped. + ` dir="ltr"`, + `ZgotmplZ`, + `ZgotmplZ`, + `ZgotmplZ`, + `ZgotmplZ`, + `ZgotmplZ`, + }, + }, + { + ``, + []string{ + `<b> "foo%" O'Reilly &bar;`, + `a[href =~ "//example.com"]#foo`, + // Tags stripped, spaces escaped, entity not re-escaped. + `Hello, World &tc!`, + ` dir="ltr"`, + `c && alert("Hello, World!");`, + `Hello, World & O'Reilly\u0021`, + `greeting=H%69,&addressee=(World)`, + `greeting=H%69,&addressee=(World) 2x, https://golang.org/favicon.ico 500.5w`, + `,foo/,`, + }, + }, + { + ``, + []string{ + `<b> "foo%" O'Reilly &bar;`, + `a[href =~ "//example.com"]#foo`, + // Tags stripped, entity not re-escaped. + `Hello, World &tc!`, + ` dir="ltr"`, + `c && alert("Hello, World!");`, + `Hello, World & O'Reilly\u0021`, + `greeting=H%69,&addressee=(World)`, + `greeting=H%69,&addressee=(World) 2x, https://golang.org/favicon.ico 500.5w`, + `,foo/,`, + }, + }, + { + ``, + []string{ + `<b> "foo%" O'Reilly &bar;`, + `a[href =~ "//example.com"]#foo`, + // Angle brackets escaped to prevent injection of close tags, entity not re-escaped. + `Hello, <b>World</b> &tc!`, + ` dir="ltr"`, + `c && alert("Hello, World!");`, + `Hello, World & O'Reilly\u0021`, + `greeting=H%69,&addressee=(World)`, + `greeting=H%69,&addressee=(World) 2x, https://golang.org/favicon.ico 500.5w`, + `,foo/,`, + }, + }, + { + ``, + []string{ + `"\u003cb\u003e \"foo%\" O'Reilly \u0026bar;"`, + `"a[href =~ \"//example.com\"]#foo"`, + `"Hello, \u003cb\u003eWorld\u003c/b\u003e \u0026amp;tc!"`, + `" dir=\"ltr\""`, + // Not escaped. + `c && alert("Hello, World!");`, + // Escape sequence not over-escaped. + `"Hello, World & O'Reilly\u0021"`, + `"greeting=H%69,\u0026addressee=(World)"`, + `"greeting=H%69,\u0026addressee=(World) 2x, https://golang.org/favicon.ico 500.5w"`, + `",foo/,"`, + }, + }, + { + ` + +
    +{{end}} diff --git a/go.dev/_templates/pullquote.tmpl b/go.dev/_templates/pullquote.tmpl new file mode 100644 index 00000000..3cf8443f --- /dev/null +++ b/go.dev/_templates/pullquote.tmpl @@ -0,0 +1,34 @@ +{{define "pullquote info" -}} +{{- with (yaml .info)}} + +{{- end}} +{{end}} + diff --git a/go.dev/_templates/quote.tmpl b/go.dev/_templates/quote.tmpl new file mode 100644 index 00000000..523e34ee --- /dev/null +++ b/go.dev/_templates/quote.tmpl @@ -0,0 +1,21 @@ +{{define "quote info" -}} +{{- with (yaml .info)}} +
    +

    + {{.quote | markdownify}} +

    + {{- if .author}} + + {{- end}} +
    +{{- end}} +{{end}} diff --git a/go.dev/_templates/toolsblurbs.tmpl b/go.dev/_templates/toolsblurbs.tmpl new file mode 100644 index 00000000..299858c5 --- /dev/null +++ b/go.dev/_templates/toolsblurbs.tmpl @@ -0,0 +1,18 @@ +{{define "toolsblurbs"}} +
    + {{- range (yaml .)}} +
    + + {{.title}} + {{.title}} + + {{- range .paragraphs}} +

    + {{.}} +

    + {{- end}} +
    + {{- end}} +
    + +{{end}} diff --git a/go.dev/archetypes/default.md b/go.dev/archetypes/default.md deleted file mode 100644 index 00e77bd7..00000000 --- a/go.dev/archetypes/default.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "{{ replace .Name "-" " " | title }}" -date: {{ .Date }} -draft: true ---- - diff --git a/go.dev/assets/css/styles.css b/go.dev/assets/css/styles.css deleted file mode 100644 index ab6525d6..00000000 --- a/go.dev/assets/css/styles.css +++ /dev/null @@ -1,3485 +0,0 @@ -*, -:before, -:after { - box-sizing: border-box; -} -body { - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, - 'Apple Color Emoji', 'Segoe UI Emoji'; - max-height: 100%; -} -button, -input, -select, -textarea { - font: inherit; -} -code, -pre { - font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace; -} -html, -.Site { - max-height: 100%; - scroll-behavior: smooth; - scroll-padding-top: 4.6875rem; -} -a, -a:link, -a:visited { - color: #007d9c; - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -.Site { - display: flex; - flex-direction: column; - margin: 0; -} -.bluebg { - background: #007d9c; -} -.SiteContent { - flex: 1; -} -.SiteContent--default { - margin-top: 3.5rem; -} -.SiteContent--lower { - margin-top: calc(3.5rem + 9.75rem); -} -.Site-footer { - border-top: 0.0625rem solid #dcdee0; - color: #fff; - font-size: 0.875rem; -} -.Site-header { - background: #007d9c; - border-bottom: none; - box-shadow: 0 0.0625rem 0.125rem rgba(171, 171, 171, 0.3); - position: fixed; - top: 0; - width: 100%; - z-index: 10; -} -.CaseStudy-aboutBlock { - border: 0.0625rem solid #dcdee0; - border-radius: 0.25rem; - box-sizing: border-box; - padding: 3.75rem 2rem 3.75rem; -} -.CaseStudy-aboutBlockTitle { - color: #202224; - font-size: 1.125rem; - font-weight: 500; - line-height: 3rem; - margin-bottom: 0.6875rem; -} -.CaseStudy-aboutBlockImg { - display: block; - margin: 0 auto; - max-height: 3.125rem; -} -.CaseStudy-aboutBlockBody { - color: #464a4d; - font-size: 1rem; - letter-spacing: 0.0063rem; - line-height: 1.5rem; -} -/** - * Only show on wide viewports so the - * text never wraps or gets cut off. - */ -.Banner { - background-color: #202224; - display: none; -} -.Banner-inner { - align-items: center; - display: flex; - justify-content: space-between; - margin: 0 auto; - max-width: 75.75rem; - min-height: 2.5rem; - padding: 0.5rem 1.5rem; -} -.Banner-message { - color: #fff; - margin-right: 1.25rem; -} -.Banner-action:link, -.Banner-action:visited { - color: #fff; - text-decoration: underline; - white-space: nowrap; -} -@media only screen and (min-width: 48rem) { - .Banner { - display: block; - } - .SiteContent--default { - /* fixed header height + banner height */ - margin-top: calc(3.5rem + 2.475rem); - } - .SiteContent--lower { - margin-top: calc(3.5rem + 4.875rem); - } -} -.UseCase-halfColumn { - color: #3e4042; - display: inline-block; - font-size: 1rem; - letter-spacing: 0.0063rem; - line-height: 1.5rem; - width: 100%; -} -@media only screen and (min-width: 48rem) { - .UseCase-halfColumn { - padding-right: 1.25rem; - width: 50%; - } -} -.UseCase-halfColumn > h2 { - line-height: 1.55; -} -.Header, -.Container { - margin: 0 auto; - max-width: 75.75rem; -} -.Container--padded { - padding: 0 1.5rem; -} -.Footer { - background-color: #253443; -} -.Footer-links { - display: flex; - flex-wrap: wrap; - justify-content: space-between; - padding: 2rem 1.5rem 2.625rem 1.5rem; -} -.Footer-linkColumn { - flex: 0 0 9.5rem; -} -a.Footer-link { - color: #fff; - display: flex; - flex: 1; - font-size: 0.875rem; - line-height: 2rem; -} -a.Footer-link--primary { - font-size: 1.125rem; - line-height: 1.75rem; - margin-bottom: 0.5rem; - margin-top: 0.75rem; -} -.Footer-bottom { - align-items: center; - border-top: 0.0625rem solid #dcdee0; - display: flex; - margin: 0 1.5rem; - min-height: 4.125rem; -} -.Footer-gopher { - align-self: flex-end; - width: 5rem; -} -.Footer-listRow { - display: flex; - flex: 1; - flex-wrap: wrap; - list-style: none; - margin: 0; - padding: 0; - text-align: center; -} -.Footer-listItem { - align-items: center; - display: flex; - flex: 1 100%; - justify-content: center; - margin: 0.4rem 0; - padding: 0 1rem; -} -.Footer-listItem a:link, -.Footer-listItem a:visited { - color: #fff; -} -@media only screen and (min-width: 52rem) { - .Footer-listItem { - flex: initial; - } - .Footer-listItem + .Footer-listItem { - border-left: 0.0625rem solid #c6c8ca; - } -} -.Footer-feedbackButton { - background: none; - border: none; - color: #fff; - font-size: 0.875rem; - padding: 0; -} -.Footer-feedbackButton:hover { - cursor: pointer; - text-decoration: underline; -} -.Footer-googleLogo { - align-self: flex-end; - height: 1.5rem; - margin-bottom: 1.3rem; - text-align: right; -} -.Footer-googleLogoImg { - height: 1.5rem; -} -.Container--fullBleed { - margin: 0; - max-width: none; -} -.Header-nav { - align-items: center; - display: flex; - height: 3.5rem; - justify-content: space-between; -} -.Header-rightContent { - align-items: center; - display: flex; - height: 100%; - justify-content: flex-end; - width: 100%; -} -.Header--dark { - border-bottom: none; - color: #fff; -} -.Header-logo { - display: block; - height: 2rem; - margin-right: 2.25rem; - width: 5.125rem; -} -.Header-logo--hidden { - display: none; -} -.Header-logo--hidden { - display: none; -} -.Header-menuItem { - display: none; -} -.Header-menu { - align-items: stretch; - display: flex; - height: 100%; - list-style: none; - margin: 0; - padding: 0; -} - -h1, -h2 { - font-weight: 600; - letter-spacing: 0.03rem; -} - -h3 { - font-size: 1.125rem; -} - -h3, -h4 { - letter-spacing: 0.08rem; -} -h5, -h6 { - font-weight: 500; - letter-spacing: 0.08rem; -} - -@media only screen and (min-width: 57.7rem) { - .Header { - padding: 0 1.5rem; - } - .Header-menuItem { - align-items: stretch; - display: inline-flex; - flex: none; - } - .Header-menu { - justify-content: flex-end; - } - .Header-navOpen { - display: none; - } -} -.Header-menuItem a:link, -.Header-menuItem a:visited { - align-items: center; - border-bottom: 0.1875rem solid transparent; - border-top: 0.1875rem solid transparent; /* To ensure the text remains centered. */ - color: #3e4042; - display: inline-flex; - margin: 0 0.3125rem; - padding: 0 0.9375rem; - text-align: center; - text-decoration: none; - width: 100%; -} -.Header--dark .Header-menuItem a:link, -.Header--dark .Header-menuItem a:visited { - color: #fff; -} -.Header-menuItem--active a:link, -.Header-menuItem--active a:visited { - border-bottom-color: #00add8; - font-weight: bold; -} -.Header-menuItem a:hover { - border-bottom-color: #fff; - color: #3e4042; -} -.Header-navOpen { - background: no-repeat center/2rem url('/images/menu-24px.svg'); - border: none; - height: 2.5rem; - margin: auto 1rem; - width: 2.5rem; -} -.Header-navOpen--white { - background: no-repeat center/2rem url('/images/menu-24px-white.svg'); -} -.NavigationDrawer { - background: #fff; - height: 100%; - left: auto; - max-width: 27rem; - position: fixed; - right: 0; - top: 0; - transform: translateX(100%); - transition: transform 100ms ease-in-out; - width: 85%; - z-index: 20; -} -.NavigationDrawer.is-active { - transform: translateX(0); -} -.NavigationDrawer-header { - align-items: center; - display: flex; - justify-content: space-between; -} -.NavigationDrawer-logo { - display: block; - height: 2rem; - margin: 1rem 1rem; - width: 5.125rem; -} -.NavigationDrawer-list { - list-style: none; - margin: 0; - padding: 0; -} -.NavigationDrawer-listItem { - font-size: 1.125rem; - margin: 0 0.5rem; -} -.NavigationDrawer-listItem a:link, -.NavigationDrawer-listItem a:visited { - display: block; - margin: 0 1rem; - padding: 0.5rem; -} -.NavigationDrawer-listItem--active { - background-color: #bfeaf4; - border-radius: 0.4rem; -} -.NavigationDrawer-scrim { - display: none; - height: 100%; - left: 0; - position: fixed; - top: 0; - width: 100%; - z-index: 5; -} -.NavigationDrawer.is-active + .NavigationDrawer-scrim { - background-color: rgba(0, 0, 0, 0.32); - display: block; -} -.Article { - color: #202224; - margin: 0 auto 1.875rem; - max-width: 45rem; - padding: 0 1.5rem; -} -.Article--solutions { - max-width: 75.75rem; -} -.Article-author, -.Article-date { - font-size: 0.875rem; - line-height: 1.375rem; -} -.Article-date { - color: #6e7072; -} -.Article h1, -.Article h2, -.Article h3, -.Article h4, -.Article h5, -.Article h6 { - color: #202224; -} -.Article h1 { - font-size: 2.25rem; - font-weight: 400; - line-height: 3rem; - margin: 1rem 0 1rem; -} -.Article h2 { - font-size: 1.4rem; - font-weight: normal; - line-height: 2rem; - margin-top: 2.25rem; -} -.Article h3 { - font-size: 1.125rem; - font-weight: 500; -} -.Article h4, -.Article h5, -.Article h6 { - font-size: 1rem; -} -.Article p, -.Article ul, -.Article ol { - color: #3e4042; - font-size: 1rem; - font-style: normal; - font-weight: normal; - letter-spacing: 0.0063rem; - line-height: 1.75rem; -} -.Article p:last-of-type { - margin-bottom: 0; -} -.Article ol .Article pre { - background-color: #fafafa; - border: 0.0625rem solid #dcdee0; - border-radius: 0.375rem; - color: #3e4042; - font-size: 1rem; - line-height: 1.45; - overflow-x: auto; - padding: 1.5rem; -} -.Article pre, -.Article code { - color: #3e4042; -} -@media only screen and (min-width: 57.7rem) { - .Article h1, - .Article h2, - .Article h4, - .Article h5, - .Article h6 { - margin: initial; - } - .Article h2 + h3 { - margin-top: 1.5rem; - } - .Article h3 { - margin-top: 1.875rem; - } - .Article h2 { - font-size: 1.5rem; - font-weight: 500; - line-height: 2.25rem; - } -} -.BreadcrumbNav-inner { - display: flex; - justify-content: start; - list-style: none; - margin: 0 auto; - max-width: 75.75rem; - padding: 0 0 1rem; -} -.BreadcrumbNav-li { - align-items: center; - display: flex; - white-space: nowrap; -} -a.BreadcrumbNav-link { - color: #202224; - font-size: 0.875rem; - text-decoration: none; -} -.BreadcrumbNav-li:last-child { - padding-right: 0.812rem; - white-space: normal; -} -.BreadcrumbNav-li:not(:last-child):after { - background: url('/images/icons/arrow-forward.svg') no-repeat; - content: ' '; - display: block; - height: 1rem; - margin: 0 0.8125rem; - width: 1rem; -} -@media only screen and (min-width: 57.7rem) { - .BreadcrumbNav-inner { - margin-top: 0; - } -} -.SubHero-gridContainer, -.WhoUses-gridContainer, -.WhoUsesHero-gridContainer, -.WhoUsesCaseStudyList-gridContainer, -.WhyGo-gridContainer, -.UseCases-gridContainer, -.LearnGo-gridContainer { - display: flex; - flex-direction: column; - flex-wrap: wrap; - margin: 0 auto; - max-width: 75.75rem; -} -.SubHero-gridContainer, -.WhoUses-gridContainer, -.WhoUsesHero-gridContainer, -.WhyGo-gridContainer, -.UseCases-gridContainer, -.LearnGo-gridContainer { - padding: 3rem 1.5rem 1rem; -} -.WhoUsesHero-gridContainer { - align-items: center; -} -@media only screen and (min-width: 28rem) { - .WhoUses-gridContainer, - .WhoUsesHero-gridContainer, - .WhoUsesCaseStudyList-gridContainer, - .WhyGo-gridContainer, - .UseCases-gridContainer, - .LearnGo-gridContainer { - flex-direction: row; - justify-content: space-between; - } - .WhoUsesHero-gridContainer { - align-items: start; - } -} -.WhyGo, -.WhoUses { - background-color: #fff; -} -.LearnGo, -.UseCases { - background-color: #fafafa; -} -.WhoUses-header, -.WhyGo-header, -.LearnGo-header { - flex: 0 0 100%; - text-align: center; -} -.WhoUses-headerH2, -.WhyGo-headerH2, -.GettingStartedGo-headerH2, -.LearnGo-header h2 { - font-size: 1.25rem; - font-style: normal; - font-weight: 500; - letter-spacing: 0.188rem; - line-height: 1.75rem; - margin-bottom: 1.5rem; - margin-bottom: 0.5rem; - margin-top: 0; -} -@media only screen and (min-width: 57.7rem) { - .WhoUses-headerH2, - .WhyGo-headerH2, - .GettingStartedGo-headerH2, - .LearnGo-header h2 { - font-size: 2.25rem; - line-height: 2.625rem; - margin-bottom: 1.5rem; - } -} -.GoCarousel { - background-color: #fafafa; - display: flex; - justify-items: center; - overflow-x: hidden; - position: relative; -} -.GoCarousel-wrapper { - margin: auto; - max-width: 62.5rem; - overflow: hidden; - position: relative; - width: 90vw; - z-index: 1; -} -.GoCarousel-slide { - border-radius: 0.125rem; - cursor: pointer; - display: flex; - position: relative; - transition: all 1s; -} -.GoCarousel-controlPrev, -.GoCarousel-controlNext { - background-color: #fff; - border-radius: 1.25rem; - border-width: 0; - box-shadow: 0 0.0625rem 0.1875rem rgba(60, 64, 67, 0.15), - 0 0.0625rem 0.125rem rgba(60, 64, 67, 0.3); - color: #848688; - display: inline-block; - font-size: 2.5rem; - height: 2rem; - line-height: 2.5rem; - outline: none; - padding: 0 0.375rem 0 0.25rem; - position: absolute; - transition: transform 100ms; - width: 2rem; - z-index: 2; -} -.GoCarousel-controlPrev:focus, -.GoCarousel-controlNext:focus { - box-shadow: 0 0.0625rem 0.5rem rgba(60, 64, 67, 0.25), - 0 0.0625rem 0.25rem rgba(60, 64, 67, 0.4); - color: #555759; -} -.GoCarousel-controlPrev[hidden], -.GoCarousel-controlNext[hidden] { - display: none; -} -.GoCarousel-icon { - user-select: none; -} -.GoCarousel-controlPrev, -.GoCarousel-controlNext { - cursor: pointer; - font-size: 1.6875rem; - text-align: center; - top: 50%; - transform: translateY(-50%); -} -.GoCarousel-controlPrev { - left: 1rem; -} -.GoCarousel-controlNext { - right: 1rem; -} -.GoCarousel-controlPrev:active, -.GoCarousel-controlNext:active { - transform: translateY(-50%) scale(0.9); -} -.GoCarousel-controlsContainer { - display: block; - margin: 0 auto; - max-width: 75.75rem; - position: relative; - width: auto; - width: 100%; -} -.GettingStartedGo-gridContainer { - display: flex; - flex-direction: column; - flex-wrap: wrap; - margin: 0 auto; - max-width: 75.75rem; - padding: 3.75rem 1.5rem 2.625rem; -} -@media only screen and (min-width: 57.7rem) { - .GettingStartedGo-gridContainer { - flex-direction: row; - } - .GoCarousel-controlPrev, - .GoCarousel-controlNext { - top: 50%; - } -} -.GettingStartedGo-header { - border-right: 0; - flex: 0 37%; - margin-bottom: 2rem; - padding-right: 0; -} -@media only screen and (min-width: 57.7rem) { - .GettingStartedGo-header { - border-right: 0.0133rem solid #f0f1f2; - margin-bottom: 0; - padding-right: 3.375rem; - } -} -.GettingStartedGo-headerDesc { - color: #3e4042; - letter-spacing: 0.0063rem; - line-height: 1.5rem; -} -.GettingStartedGo-ctas { - font-size: 0.875rem; - font-weight: normal; - letter-spacing: 0.0164rem; - line-height: 1rem; - margin-top: 1rem; -} -a.GettingStartedGo-primaryCta { - background: #007d9c; - border-radius: 0.125rem; - color: #fff; - display: inline-block; - margin-right: 1.3125rem; - padding: 0.4375rem 1.3125rem; - text-decoration: none; -} -.GettingStartedGo-resourcesSection { - display: flex; - flex: 1; - flex-direction: column; -} -@media only screen and (min-width: 38rem) { - .GettingStartedGo-resourcesSection { - flex-direction: row; - } -} -.GettingStartedGo-resourcesList { - flex: 50%; - list-style: none; - margin: 0; - padding-left: 0; - padding-right: 2.375rem; -} -@media only screen and (min-width: 57.7rem) { - .GettingStartedGo-resourcesList { - padding-left: 3.375rem; - padding-right: 0; - } -} -.GettingStartedGo-resourcesHeader { - color: #555759; - font-size: 0.6875rem; - letter-spacing: 0.0625rem; - margin-bottom: 1rem; - text-transform: uppercase; -} -.GettingStartedGo-resourceItem { - margin-bottom: 1rem; -} -a.GettingStartedGo-resourceItemTitle { - color: #202224; - font-weight: 500; - line-height: 1.5rem; -} -.GettingStartedGo-resourceItemDescription { - color: #555759; - font-size: 0.8125rem; - line-height: 1.5rem; -} -.WhoUses-header h4, -.WhyGo-headerH4, -.LearnGo-header h4, -.WhoUses-subheader { - color: #3e4042; - font-size: 0.875rem; - font-style: normal; - font-weight: normal; - letter-spacing: 0.006rem; - line-height: 1.125rem; - margin-bottom: 1.5rem; - margin-top: 0; -} -@media only screen and (min-width: 38rem) { - .WhoUses-header h4, - .WhyGo-headerH4, - .LearnGo-header h4, - .WhoUses-subheader { - font-size: 1rem; - line-height: 1.5rem; - } -} -.Hero { - color: #fff; -} -.Hero h1 { - font-size: 2.625rem; - font-weight: 500; - letter-spacing: 0.3rem; - margin: 1rem 0; -} -.Hero h2 { - font-size: 1.5rem; - font-weight: 400; - letter-spacing: 0.011rem; - max-width: 40rem; -} -.Hero-gridContainer { - column-gap: 1rem; - display: grid; - grid-template-columns: 3fr minmax(6.25rem, 1fr); - margin: 0 auto; - max-width: 40rem; - padding: 1rem 1.5rem 0; -} -.Hero-actions { - display: flex; - flex: 3 1; - flex-direction: column; - flex-wrap: wrap; - grid-column: 1 / 3; - margin-top: 1rem; -} -.Hero-actions > div { - display: flex; - width: 100%; -} -.Hero-actions a, -.Hero-actions a:visited, -.Hero-actions a:hover { - color: #fff; - margin: 0.5rem 0; - max-width: 13.75rem; - padding: 1rem 0; - text-align: center; - text-decoration: underline; -} -.Hero-actions a.Primary, -.Hero-actions a.Secondary { - align-items: center; - border-radius: 0.25rem; - display: flex; - flex-wrap: nowrap; - font-size: 0.875rem; - height: 2.5rem; - justify-content: center; - line-height: 1.3125rem; - margin: 0; - text-decoration: none; - width: 100%; -} -.Hero-actions a.Primary { - margin: 0 1.3125rem 0 0; -} -.Hero-actions a.Primary { - background-color: #fddd00; - border: 0.0625rem solid #fddd00; - box-shadow: 0 0.125rem 0.3125rem 0 rgba(0, 0, 0, 0.2); - color: #202224; -} -.Hero-actions a.Secondary { - border: 0.0625rem solid #fff; - color: #fff; -} -.DownloadBtn-versionNum { - font-size: 0.6875rem; - font-weight: 300; -} -.Hero-gopher { - align-items: flex-end; - display: flex; - grid-column: 2 / 3; - grid-row: 1 / 2; - justify-content: flex-end; -} -.Hero-gopherLadder { - bottom: 0; - height: 15rem; - max-width: 8rem; - object-fit: cover; - object-position: 100% 0; - right: 0; - width: 100%; -} -.Hero-blurb { - grid-column: 1 / 2; - margin: 0 auto; -} -.Hero-blurb h1 { - font-size: 1.375rem; - font-weight: 500; - letter-spacing: 0.0019rem; - margin-top: 0; -} -.Hero-blurbList { - font-size: 0.8125rem; - list-style: none; - margin-bottom: 0; - margin-top: 1rem; - padding: 0; -} -.Hero-blurbList li { - line-height: 1.125rem; - margin-bottom: 0.5rem; - padding-left: 1.5rem; - position: relative; -} -.Hero-blurbList svg { - left: 0; - margin-right: 0.6875rem; - position: absolute; - top: 0.3125rem; -} -.Hero-footnote { - flex-direction: column; - font-size: 0.8125rem; - letter-spacing: 0.007rem; - margin: 0.5rem 0 1.5rem; -} -.Hero-footnote p { - margin: 0; -} -.Hero-footnote p + p { - margin-top: 0.75rem; -} -.Hero-footnote a { - color: #fff; - text-decoration: underline; -} -.SubHero-gridContainer { - display: grid; - gap: 0 5vw; - grid-template-columns: 1fr; -} -.SubHero-blurb { - margin: 0 auto 0; - max-width: 25rem; -} -.SubHero-blurb:not(:last-of-type) { - margin: 0 auto 4rem; -} -.SubHero-blurb h3 { - margin-top: 0; - text-align: center; -} -.SubHero-blurb p { - margin-bottom: 0; -} -@media only screen and (min-width: 38rem) { - .Hero-blurb { - margin: auto; - } -} -@media only screen and (min-width: 48rem) { - .Hero-gridContainer { - gap: 0 5vw; - grid-template-columns: 2.5fr minmax(auto, 16.25rem); - max-width: 75.75rem; - } - .Hero-gopherLadder { - height: 23rem; - max-width: 11.5rem; - } - .Hero-actions { - align-items: flex-start; - flex: 1 1; - flex-direction: row; - grid-column: 1 / 2; - justify-content: initial; - } - .Hero-actions a, - .Hero-actions a:visited, - .Hero-actions a:hover { - max-width: 17.5rem; - } - .Hero-actions a.Primary, - .Hero-actions a.Secondary { - font-size: 1.5rem; - height: 4rem; - line-height: 1.75rem; - } - .Hero-actions a.Secondary { - margin: 0; - } - .Hero-footnote { - margin: 1rem 0 1.5rem; - } - .Hero-blurb { - grid-column: 1 / 2; - margin: 2.5rem auto 0; - } - .Hero-gopher { - grid-row: 1 / 3; - } - .Hero-blurb h1 { - font-size: 2.45rem; - font-weight: 500; - } - .Hero-blurbList { - font-size: 1rem; - } - .SubHero-gridContainer { - grid-template-columns: 1fr 1fr 1fr; - } - .SubHero-blurb { - margin: 0 auto; - } - .DownloadBtn-versionNum { - font-size: 1rem; - font-weight: 300; - } -} -.WhoUsesHero { - background-color: #fafafa; -} -.WhoUses-subheader { - color: #3e4042; - margin-bottom: 0; - margin-left: auto; - margin-right: auto; - max-width: 25rem; -} -.WhoUsesHero-gridContainer { - display: flex; - justify-content: space-between; - width: 100%; -} -.WhoUses-heroImg { - max-width: 38.75rem; - width: 100%; -} -.WhoUses-heroInnerLeft { - line-height: 1.5rem; - margin-bottom: 2rem; - margin-right: 0; - max-width: 19.625rem; - text-align: center; - width: 90%; -} -@media only screen and (min-width: 57.7rem) { - .WhoUses-heroInnerLeft { - margin-right: 2rem; - text-align: start; - width: 19.625rem; - } - .WhoUses-subheader { - max-width: none; - } -} -.WhoUses-heroInnerLeft h3 { - font-size: 1.5rem; - font-weight: normal; - margin: 1.375rem 0; -} -.WhoUses-heroInnerLeft p { - color: #6e7072; - font-size: 0.875rem; - margin-bottom: 1.188rem; -} -.WhoUsesCaseStudyList { - align-content: center; - display: flex; - flex: 0 0 100%; - justify-content: space-evenly; - list-style: none; -} -.WhoUsesCaseStudyList-gridContainer { - display: grid; - gap: 0.8rem; - grid-template-columns: repeat(3, minmax(0, 33.333%)); - margin: 1.5rem auto 3.75rem; - padding: 0; - width: 100%; -} -.WhoUsesCaseStudyList-caseStudy { - align-items: center; - display: flex; - flex: 0 1 50%; - height: 3.8512rem; - justify-content: center; - position: relative; -} -.WhoUsesCaseStudyList-caseStudy p { - display: none; -} -.WhoUsesCaseStudyList-caseStudyLink:link, -.WhoUsesCaseStudyList-caseStudyLink:visited { - color: #6e7072; - flex-direction: column; - text-align: center; - text-decoration: none; - transition: box-shadow 0.2s ease-in-out; -} -.WhoUsesCaseStudyList-caseStudyLink:link:hover { - box-shadow: 0 -0.0625rem 0.3125rem rgba(128, 134, 139, 0.09), - 0 0.1875rem 0.3125rem rgba(128, 134, 139, 0.06), - 0 0.0625rem 0.125rem rgba(60, 64, 67, 0.3), - 0 0.0625rem 0.1875rem rgba(60, 64, 67, 0.15); -} -.WhoUsesCaseStudyList-caseStudyLink img { - height: auto; -} -@media only screen and (max-width: 38rem) { - .WhoUsesCaseStudyList-caseStudyLink img { - max-height: 2rem; - max-width: 100%; - } -} -.WhoUsesCaseStudyList-logo { - margin: auto; - max-height: 4rem; - max-width: 9.375rem; - width: auto; -} -.WhoUsesCaseStudyList-caseStudyLink:link, -.WhoUsesCaseStudyList-caseStudyLink:visited { - border-radius: 0.25rem; - box-shadow: #f0f1f2 0 0.0625rem 0.25rem; - display: flex; - height: 100%; - padding: 0 0.3rem; - width: 100%; -} -.WhoUsesCaseStudyList-seeAll { - display: inline-block; - margin-left: 1rem; -} -.WhoUsesCaseStudyList-seeAll:hover { - text-decoration: none; -} -@media only screen and (min-width: 32rem) { - .WhoUsesCaseStudyList-gridContainer { - gap: 1rem 1.125rem; - } - .WhoUsesCaseStudyList-caseStudyLink { - padding: 0 1.5rem; - } - .WhoUsesCaseStudyList-caseStudy { - height: 5.9375rem; - } -} -@media only screen and (min-width: 57.7rem) { - .WhoUsesCaseStudyList-gridContainer { - grid-template-columns: repeat(4, minmax(0, 25%)); - } - .WhoUsesCaseStudyList-caseStudyLink:link, - .WhoUsesCaseStudyList-caseStudyLink:visited { - color: transparent; - } - .WhoUses-caseStudy a:link:hover, - .WhoUses-caseStudy a:visited:hover { - box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); - } - .WhoUsesCaseStudyList-caseStudyLink:link:hover - .WhoUsesCaseStudyList-caseStudyLink:visited:hover { - color: #6e7072; - transition: all 0.2s ease-in-out; - } -} -@media only screen and (min-width: 66.75rem) { - .WhoUsesCaseStudyList-gridContainer { - grid-template-columns: repeat(6, 1fr); - } - .WhoUsesCaseStudyList-caseStudy { - flex: 0 1 1fr; - } -} -.FeaturedUsers { - margin: 2.375rem auto 3.75rem; -} -.FeaturedUsers table { - border-collapse: collapse; - margin-bottom: 1.5rem; -} -.FeaturedUsers table thead { - background-color: #fafafa; -} -.FeaturedUsers table thead th { - color: #555759; - font-size: 1rem; - font-weight: 500; - line-height: 1.5rem; - padding: 0.75rem 0; -} -.FeaturedUsers table thead th:not(:nth-child(1)) { - text-align: left; -} -.FeaturedUsers table td th:not(:nth-child(1)) { - text-align: left; -} -.FeaturedUsers table tr td, -.FeaturedUsers table tr th { - padding: 1rem 0.3rem; - width: 30%; -} -.FeaturedUsers table tr td:first-of-type { - padding-left: 1rem; -} -.FeaturedUsers table tr td:first-of-type, -.FeaturedUsers table tr th:first-of-type { - width: 15%; -} -.FeaturedUsers table tr td:nth-of-type(2), -.FeaturedUsers table tr th:nth-of-type(2) { - width: 40%; -} -.FeaturedUsers table td { - color: #3e4042; - font-size: 0.875rem; - letter-spacing: 0.0117rem; - line-height: 1.5rem; - vertical-align: top; -} -.FeaturedUsers table td ul { - margin-top: 0; - padding-left: 1rem; -} -.FeaturedUsers table td ul li { - font-size: 0.875rem; - letter-spacing: 0.0117rem; - line-height: 1.5rem; -} -.FeaturedUsers table thead { - color: #555759; - font-size: 1rem; - font-weight: 500; - line-height: 1.5rem; -} -.FeaturedUsers table tbody tr { - border-bottom: 0.0625rem solid #dcdee0; -} -.FeaturedUsers table tbody tr td { - margin: 0; -} -.FeaturedUsers table tbody tr td img { - width: 5rem; -} -.FeaturedUsers-moreProjectsBtn { - background: transparent; - border: none; - color: #5dc9e2; - cursor: pointer; - font-size: 0.875rem; - padding: 0.5rem 0; - position: relative; -} -.FeaturedUsers--hiddenDesktop { - display: block; - height: 3rem; - margin-bottom: 1rem; - width: auto; -} -.FeaturedUsers--hiddenMobile, -.FeaturedUsers--hiddenMobile { - display: none; -} -@media only screen and (max-width: 48rem) { - .FeaturedUsers table tbody tr td:last-of-type { - padding-left: 1rem; - padding-top: 5rem; - } -} -@media only screen and (min-width: 48rem) { - .FeaturedUsers--hiddenMobile, - .FeaturedUsers--hiddenMobile { - display: table-cell; - } - .FeaturedUsers table tr td { - padding: 1rem 2rem 1rem 0; - width: 30%; - } - .FeaturedUsers--hiddenDesktop { - display: none; - } -} -.WhoUsesCaseStudy-librariesWrapper { - margin-bottom: 2.25rem; - margin-top: 1.875rem; -} -a.WhoUsesCaseStudy-librariesViewMoreLink { - color: #007d9c; - font-size: 0.875rem; -} -.WhoUsesCaseStudy-libraryTitle { - font-weight: 400; -} -.WhoUsesCaseStudy-librariesList { - column-gap: 7.375rem; - display: grid; - grid-template-columns: 1fr; - list-style: none; - margin: 1.5rem 0 0; - padding: 0; -} -.WhoUsesCaseStudy-librariesList h3 { - font-weight: 500; -} -.WhoUsesCaseStudy-library { - margin: 0 0 1.5rem; -} -.WhoUsesCaseStudy-library p { - color: #3e4042; - font-size: 1rem; - letter-spacing: 0.0111rem; - line-height: 1.1875rem; - margin: 0.5rem 0 0; -} -.WhoUsesCaseStudy-view-more { - margin-bottom: 2.5rem; -} -.WhoUsesCaseStudy-view-more a { - color: #3e4042; - font-size: 0.875rem; - font-style: normal; - font-weight: 500; - letter-spacing: 0.0156rem; - line-height: 1rem; - margin-bottom: 2.5rem; - text-align: center; -} -@media only screen and (min-width: 38rem) { - .WhoUsesCaseStudy-librariesList { - column-gap: 4rem; - grid-template-columns: 1fr 1fr; - } -} -.UseCases-gridContainer { - flex-direction: row; - justify-content: space-around; - margin: -1rem 0 0 -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ -} -.UseCase { - flex: 1 0 15.625rem; - margin-top: 1rem; - max-width: 15.625rem; - padding: 1rem 0 0 1rem; /* Gutter between grid cells. */ -} -.UseCase-logo { - align-items: center; - background: linear-gradient(10.64deg, #007d9c 0%, #00a29c 100%); - border-radius: 50%; - display: flex; - height: 3.75rem; - justify-content: center; - margin: auto; - width: 3.75rem; -} -.UseCase-logo img { - height: 2.625rem; - width: 2.625rem; -} -.UseCase-title { - text-align: center; -} -.UseCase-action { - font-size: 1.125rem; - line-height: 2.5rem; - text-align: center; -} -.WhyGo-gridContainer { - align-items: center; - justify-content: center; -} -.WhyGo-reasons { - column-gap: 3.313rem; - display: grid; - grid-template-columns: repeat(1, 1fr); - justify-content: space-between; - list-style: none; - padding-left: 0; - row-gap: 2rem; -} -.WhyGo-forwardArrowIcon, -.Solutions-forwardArrowIcon { - font-size: 1rem; -} -@media only screen and (min-width: 57.7rem) { - .WhyGo-reasons { - grid-template-columns: repeat(2, 1fr); - } -} -@media only screen and (min-width: 72.75rem) { - .WhyGo-reasons { - grid-template-columns: repeat(3, 1fr); - } -} -.WhyGo-reason { - border: 0.063rem solid #dcdee0; - border-radius: 0.25rem; - display: flex; - flex: 0 30%; - flex-direction: column; - height: 100%; - justify-content: space-between; - margin-bottom: 1.5rem; - margin-top: 0; - max-width: 40rem; -} -.WhyGo-reasonDetails { - padding: 2rem 2rem 0.188rem; -} -.WhyGo-reasonFooter { - background-color: rgba(246, 248, 248, 0.35); - padding: 1rem 2rem 2rem; -} -.WhyGo-reasonIcon { - margin-bottom: 1rem; - text-align: left; -} -.WhyGo-reasonIcon img { - height: 2.25rem; -} -.WhyGo-reasonLearnMoreLink { - margin-top: 1.5rem; -} -.WhyGo-reasonLearnMoreLink a { - align-items: center; - display: flex; - font-size: 0.875rem; - letter-spacing: 0.016rem; - text-decoration: none; -} -.WhyGo-reasonPackages { - color: #3e4042; - font-size: 0.875rem; - letter-spacing: 0.055rem; -} -.WhyGo-reasonPackagesHeader { - margin-bottom: 0.688rem; -} -.WhyGo-reasonPackagesHeader img { - height: 0.938rem; - margin-right: 0.376rem; - padding: 0.063rem 0 0.063rem; - vertical-align: bottom; -} -.WhyGo-reasonPackagesList { - display: flex; - flex-direction: row; - flex-wrap: wrap; - padding: 0; -} -.WhyGo-reasonPackage { - border: 0.063rem solid #bfeaf4; - border-radius: 0.125rem; - box-sizing: border-box; - color: #007d9c; - font-size: 0.688rem; - letter-spacing: 0.0129rem; - line-height: 0.813rem; - list-style: none; - margin: 0.125rem 0.5rem 0.5rem 0; - padding: 0.188rem 0.188rem; - - text-align: center; -} -.WhyGo-reasonShowMoreImgWrapper { - align-items: center; - background-color: #fafafa; - border-radius: 50%; - display: flex; - height: 14.313rem; - margin: 2.5rem auto 1.375rem; - width: 14.313rem; -} -.WhyGo-reasonShowMoreImg { - margin-left: 5%; - width: 100%; -} -.WhyGo-reasonShowMoreLink { - font-size: 0.875rem; - letter-spacing: 0.0164rem; - text-align: center; -} -.WhyGo-reasonShowMoreLink a { - border: 0.063rem solid #bfeaf4; - border-radius: 0.125rem; - box-sizing: border-box; - display: inline-block; - padding: 0.275rem 1.063rem 0.275rem 0.275rem; - text-decoration: none; -} -.WhyGo-reasonShowMoreLink a i { - padding-bottom: 0.063rem; - vertical-align: middle; -} -.WhyGo-reasonText p { - color: #3e4042; - font-size: 1rem; - font-weight: normal; - letter-spacing: 0.006rem; - line-height: 1.5rem; -} -.WhyGo-reasonTitle { - color: #202224; - font-size: 1.125rem; - font-weight: 500; - line-height: 1.5rem; -} -.WhyGo-gopher { - flex: 1; - max-width: 28.4375rem; - text-align: center; -} -.WhyGo-gopher img { - width: 100%; -} - -.headerWithLink { - display: flex; - justify-content: space-between; - width: 100%; -} - -.headerWithLink h3 { - font-weight: 500; - margin-bottom: 0; -} -.headerLink { - align-self: center; - font-size: 1.125rem; - font-weight: 600; - margin: 0; -} -.LearnGo-subHeader { - display: flex; - justify-content: space-between; - width: 100%; -} -.LearnGo-subHeader h3 { - color: #6e7072; - font-size: 1rem; - font-weight: normal; -} -.LearnGo-courses { - display: flex; - flex: 1 0 100%; - flex-direction: row; - flex-wrap: wrap; - justify-content: space-around; - list-style: none; - margin: 0 0 1rem -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ - padding-left: 0; -} -@media only screen and (min-width: 72.75rem) { - .LearnGo-courses { - justify-content: space-between; - } -} -.LearnGo-courseItem { - align-items: center; - display: flex; - flex-wrap: wrap; - justify-content: center; - padding: 1rem 0 0 1rem; /* Gutter between grid cells. */ -} -.LearnGo-courseItem a { - color: #3e4042; -} -.LearnGo-courseTitle { - text-align: center; -} -.LearnGo-courseImage { - align-items: center; - background-color: #fff; - border-radius: 0.3125rem; - box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); - display: flex; - height: 11rem; - justify-content: center; - margin: auto; - max-width: 16.5rem; - width: 16.5rem; -} -.LearnGo-courseImage img { - max-height: 100%; - max-width: 100%; -} -.GoCarousel-eventsWrapper { - margin: auto; - max-width: 68rem; - overflow: hidden; - position: relative; - width: 84vw; -} -.GoCarousel-eventsSlides { - display: flex; - left: 0; - list-style: none; - margin: 0; - padding: 0; - position: relative; - top: 0; - transition: left 0.2s ease-out; - width: 625rem; -} -.GoCarousel-eventGroup { - align-items: flex-start; - border-radius: 0.125rem; - cursor: pointer; - display: flex; - margin: 1rem 0; - padding: 1rem; - position: relative; - transition: all 1s; - width: 84vw; -} -.GoCarousel-eventsSlidesingleItem { - display: flex; - flex: 1; - margin-right: 2rem; -} -.GoCarousel-eventThumbnail { - background-color: #fff; - border: 0.0625rem solid #dcdee0; - border-radius: 0.5rem; - display: flex; - height: 100%; - margin-right: 1.3125rem; - width: 6.625rem; -} -.GoCarousel-eventThumbnail img { - align-self: center; - height: auto; - object-fit: contain; - padding: 1rem; - width: 100%; -} -.GoCarousel-eventBody { - display: inline-flex; - flex: 1; - flex-direction: column; - height: 100%; - min-width: 0; - position: relative; -} -.GoCarousel-eventDate { - display: flex; - flex-wrap: wrap; - justify-content: space-between; -} -.GoCarousel-eventDate p { - color: #555759; - font-size: 0.8125rem; - font-style: normal; - line-height: 1rem; - margin: 0 0 1.5rem 0; -} -.GoCarousel-eventHeader { - color: #555759; - font-size: 0.6875rem; - font-weight: 500; - letter-spacing: 0.0625rem; - line-height: 1rem; - margin: 0 0 0.875rem; - text-transform: uppercase; -} -.GoCarousel-eventName { - margin: 0 0 0.25rem 0; - width: 100%; -} -.GoCarousel-eventName a { - -webkit-box-orient: vertical; - color: #202224; - display: -webkit-box; - font-weight: 500; - -webkit-line-clamp: 2; - line-height: 1.5rem; - overflow: hidden; - text-overflow: ellipsis; -} -.LearnGo-eventDescription { - -webkit-box-orient: vertical; /* See webkit-line-clamp */ - display: -webkit-box; /* See webkit-line-clamp */ - -webkit-line-clamp: 4; /* Elide flex text. webkit-line-clamp is broadly compatible with browsers. */ -} -.GoCarousel-viewMore { - bottom: 0; - font-size: 0.875rem; - letter-spacing: 0.026rem; - line-height: 1rem; - margin: 0; - min-width: 6.25rem; - position: absolute; -} -@media only screen and (min-width: 48rem) { - .GoCarousel-eventGroup { - width: 42vw; - } -} -@media only screen and (min-width: 66.75rem) { - .GoCarousel-eventThumbnail img { - display: block; - margin: auto; - } - .GoCarousel-eventDate { - flex: 0; - flex-direction: row; - justify-content: flex-start; - min-width: 9rem; - } - .GoCarousel-eventText { - display: flex; - flex-direction: column; - height: 100%; - min-width: 0; - position: relative; - } - .GoCarousel-viewMore { - text-align: left; - width: 15.625rem; - } - .GoCarousel-eventBody { - display: flex; - flex-direction: column; - } - .GoCarousel-eventGroup { - max-width: 22.66rem; - width: 28vw; - } -} - -.Learn-hero { - background-color: #fafafa; - background-image: radial-gradient( - 60.0625rem 60.0625rem, - #bfeaf4 50%, - #fafafa 50% - ); - background-position: top -50rem left -9rem; - background-repeat: no-repeat; - background-size: 75rem 75rem; - padding: 0 2.25rem 0; -} - -.Learn-hero .Container { - max-width: 68.125rem; - position: relative; - z-index: 1; -} - -.Learn-heroInner { - display: flex; - flex-direction: column-reverse; -} - -.Learn-heroGopher { - display: flex; - justify-content: flex-end; - padding-top: 1.25rem; -} - -.Learn-heroGopher img { - height: 13.5625rem; - width: auto; -} - -.Learn-heroContent { - padding-top: 1.125rem; -} - -.Learn-heroContent a:not(.js-downloadBtn) { - text-decoration: underline; -} - -.Learn-heroContent h1 { - font-size: 1.5rem; - font-style: normal; - font-weight: normal; - line-height: 2rem; -} - -.Learn-heroContent p { - color: #6e7072; - font-size: 0.875rem; - line-height: 1.5rem; - max-width: 27.1875rem; -} - -.Learn-heroAction { - align-items: center; - background-color: #007d9c; - border-radius: 0.25rem; - display: flex; - height: 2.5rem; - justify-content: center; - width: 10.5rem; -} - -.Learn-heroAction a, -.Learn-heroAction a:hover, -.Learn-heroAction a:visited { - color: #fff; - font-size: 0.875rem; - font-weight: 500; - line-height: 1rem; - text-decoration: none; -} - -.Learn-heroAction span { - font-weight: normal; -} - -/* Learn page grid rules */ - -.LearnGo-gridContainer { - display: flex; - justify-content: center; - padding: 0rem 0rem 1rem; -} - -.Learn-cardList { - column-gap: 3.313rem; - display: grid; - grid-template-columns: repeat(1, 1fr); - justify-content: space-between; - list-style: none; - padding-left: 0; - row-gap: 2rem; -} - -.Learn-card { - height: 23.375rem; - max-width: 40rem; -} - -@media only screen and (min-width: 48rem) { - .Learn-cardList { - grid-template-columns: repeat(2, 1fr); - } -} -@media only screen and (min-width: 72.75rem) { - .Learn-cardList { - grid-template-columns: repeat(4, 1fr); - } -} - -/* End Learn page grid rules */ - -/* Learn quickstart grid */ - -.Learn-hero .Learn-quickstarts { - margin: 0; - margin-top: 4rem; -} - -.Learn-hero .Learn-quickstart { - height: auto; -} - -.Learn-hero .LearnGo-gridContainer { - padding: 3rem 0rem 3rem; -} - -@media only screen and (min-width: 48rem) { - .Learn-hero .Learn-cardList { - grid-template-columns: repeat(2, 1fr); - } -} - -@media only screen and (min-width: 57.7rem) { - .Learn-hero .Learn-cardList { - grid-template-columns: repeat(3, 1fr); - } -} -@media only screen and (min-width: 72.75rem) { - .Learn-hero .Learn-cardList { - grid-template-columns: repeat(3, 1fr); - } -} - -/* Learn hero section */ - -@media only screen and (min-width: 57.7rem) { - .Learn-hero { - background-position: top -35rem left 30rem; - } - - .Learn-heroInner { - flex-direction: row; - justify-content: space-between; - } - - .Learn-heroContent { - padding-top: 3.75rem; - } - - .Learn-heroGopher { - flex: 1; - justify-content: center; - padding-top: 2.625rem; - } - - .Learn-heroGopher img { - height: 21.0625rem; - } - - .Learn-heroAction { - height: 4rem; - width: 16.5625rem; - } - - .Learn-heroAction a, - .Learn-heroAction a:hover, - .Learn-heroAction a:visited { - font-size: 1.5rem; - line-height: 1.75rem; - } - - .Learn-heroAction span { - font-size: 1rem; - } -} - -@media only screen and (min-width: 91rem) { - .Learn-hero { - background-position: top -35rem left 50rem; - } -} - -.Learn-guided, -.Learn-online, -.Learn-selfPaced, -.Learn-books, -.Learn-inPersonTraining, -.Learn-meetups { - margin-top: 3.75rem; - padding: 0 1.5rem; -} - -.Learn-learningResources { - align-items: center; - display: flex; - flex-direction: column; - margin: 3.75rem 0; -} - -.Learn-learningResources h2, -.Learn-learningResourcesHeader h3 { - margin: 0; -} - -.Learn-learningResources h2 { - font-size: 2rem; - font-weight: 500; - letter-spacing: 0.1875rem; - line-height: 2.3125rem; -} - -.Learn-learningResourcesHeader { - display: flex; - justify-content: center; -} - -.Learn-learningResourcesHeader h3 { - font-size: 1.5rem; - font-weight: bold; - letter-spacing: normal; - line-height: 2.25rem; -} - -.Learn-selfPaced .Learn-card .Card-content { - justify-content: space-between; -} - -.Learn-online .Card-thumbnail { - background-position: 1.5rem center; - background-repeat: no-repeat; - background-size: auto 1.5rem; - height: 7.5625rem; -} - -.Learn-selfPaced .Learn-card { - height: 20.3125rem; -} - -@media only screen and (min-width: 48rem) { - .Learn-learningResourcesHeader { - display: flex; - justify-content: flex-start; - } - - .Learn-learningResourcesHeader h2 { - font-size: 2.25rem; - line-height: 2.625rem; - } -} - -.Learn-cardList.Learn-bookList { - grid-template-columns: repeat(1, 1fr); - width: 100%; -} - -.Learn-card.Learn-book { - height: auto; -} - -@media only screen and (min-width: 48rem) { - .Learn-cardList.Learn-bookList { - grid-template-columns: repeat(3, 1fr); - } - - .Learn-card.Learn-book { - max-width: 13.125rem; - } -} - -@media only screen and (min-width: 57.7rem) { - .Learn-cardList.Learn-bookList { - grid-template-columns: repeat(4, 1fr); - } -} - -@media only screen and (min-width: 72.75rem) { - .Learn-cardList.Learn-bookList { - grid-template-columns: repeat(5, 1fr); - } -} - -.Learn-inPersonList { - display: flex; - flex: 1 0 100%; - flex-direction: row; - flex-wrap: wrap; - justify-content: space-between; - list-style: none; - margin: 1.875rem 0 1.875rem -1rem; /* Offset gutters for the leftmost and top cells in the grid. */ - padding-left: 0; -} - -.Learn-inPerson { - border-bottom: 0.0625rem solid #dcdee0; - flex: 1 1 31.25rem; - margin: 0 0 0 1rem; /* Gutter between grid cells. */ - max-width: 31rem; - padding-bottom: 1.25rem; -} - -.Learn-inPerson:nth-child(1), -.Learn-inPerson:nth-child(2) { - border-top: 0.0625rem solid #dcdee0; -} -.Learn-inPersonTitle { - font-size: 1.25rem; -} -.Learn-inPersonBlurb { - margin: 0; -} - -.Learn-events { - flex: 1 0 100%; - list-style: none; - margin: 0.5rem 0 1.875rem; - padding: 0; - width: 100%; -} -.Learn-eventItem { - align-items: flex-start; - display: flex; - flex-direction: column; - padding: 1.875rem 0 0.175rem 0; -} -.Learn-eventItem + .Learn-eventItem { - border-top: 0.0625rem solid #dcdee0; -} - -.Learn-eventThumbnail { - align-self: center; - display: flex; - flex: 0 0 3rem; - height: auto; - margin-bottom: 1rem; -} -.Learn-eventThumbnail--noimage { - background-color: #fff; -} -.Learn-eventThumbnail img { - height: auto; - - object-fit: cover; - width: 100%; -} -.Learn-eventAttendees { - display: flex; -} -.Learn-eventAttendeesItem img { - border-radius: 100%; - height: 2rem; - width: 2rem; -} -.Learn-eventBody { - display: flex; - flex: 1; - flex-direction: column; - max-width: 100%; - min-width: 0; -} -.Learn-eventDate { - display: flex; - flex-wrap: wrap; - justify-content: space-between; - - margin-bottom: 1rem; -} -.Learn-eventDate p { - color: #6e7072; - margin: 0; -} -.Learn-eventName { - color: #202224; - font-size: 1.25rem; - font-weight: 500; - margin: 0; - - margin-bottom: 1rem; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.Learn-eventName a { - color: #202224; - text-decoration: none; -} -.Learn-eventDescription { - -webkit-box-orient: vertical; /* See webkit-line-clamp */ - display: -webkit-box; /* See webkit-line-clamp */ - -webkit-line-clamp: 4; /* Elide flex text. webkit-line-clamp is broadly compatible with browsers. */ - line-height: 24px; - overflow: hidden; - text-overflow: ellipsis; -} -.Learn-eventText { - margin-bottom: 0.5rem; -} -.Learn-viewMore { - align-items: center; - display: flex; - font-size: 0.875rem; - margin: 0; - min-width: 6.25rem; -} -.Learn-viewMore:hover { - text-decoration: none; -} -.Learn-viewMore span { - font-size: 1rem; - margin-left: 0.48rem; -} -@media only screen and (min-width: 33.75rem) { - .Learn-eventItem { - flex-direction: row; - } - - .Learn-eventBody { - max-width: 46.825rem; - } - .Learn-eventThumbnail { - height: 8rem; - margin-bottom: 0; - margin-right: 1rem; - min-width: 8rem; - } - .Learn-eventThumbnail img { - height: 8rem; - object-fit: contain; - width: 8rem; - } - .Learn-eventDate { - flex: 0; - flex-direction: column; - justify-content: center; - min-width: 9rem; - } - .Learn-eventText { - display: flex; - flex-direction: column; - min-width: 0; - padding-right: 2rem; - } - .Learn-eventDescription { - -webkit-line-clamp: 2; /* see non-media-query definition. */ - margin: 0 0 0.5rem; - } - .Learn-viewMore { - align-self: center; - text-align: right; - } - .Learn-eventItem { - padding: 1.875rem 0; - } -} - -.Learn-tile a { - width: 100%; -} - -.Learn-tileList { - display: grid; - gap: 2rem; - grid-template-columns: repeat(2, minmax(0, 1fr)); - list-style: none; - padding: 0; -} -@media only screen and (min-width: 38rem) { - .Learn-tileList { - grid-template-columns: repeat(4, minmax(0, 1fr)); - } -} -@media only screen and (min-width: 48rem) { - .Learn-tileList { - justify-content: space-between; - } - .Learn-tileList { - column-gap: 3rem; - } -} -.Learn-tile { - display: flex; - flex-wrap: wrap; - justify-content: center; -} -.Learn-tile a { - color: #3e4042; -} -.Learn-tileTitle { - display: block; - font-size: 0.75rem; - font-style: normal; - font-weight: normal; - letter-spacing: 0.01rem; - line-height: 0.875rem; - margin: 1.5rem auto 0; - overflow-wrap: break-word; - text-align: center; -} -.Learn-tileThumbnail { - align-items: center; - background-color: #fff; - border-radius: 0.3125rem; - box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); - display: flex; - justify-content: center; - margin: auto; - width: 100%; -} -.Learn-tileThumbnail img { - max-height: 100%; - max-width: 100%; -} -.Learn-tileThumbnail--book img { - max-height: 100%; - max-width: 100%; -} - -.Solutions-title, -.Solutions-useCases, -.Solutions-caseStudies { - margin: auto; - max-width: 75.75rem; -} -.Solutions-title, -.Solutions-useCases, -.Solutions-caseStudies { - padding: 0 1.5rem; -} -.SolutionsHeroCarousel-wrapper { - max-width: 68rem; - width: 76vw; -} -.SolutionsHeroCarousel-slides { - transition: left 0.2s ease-out; -} -.GoCarousel-controlNext-solutionsHero { - right: 0.5rem; -} -.GoCarousel-controlPrev-solutionsHero { - left: 0.5rem; -} -.SolutionsHeroCarousel-slides { - display: flex; - left: 0; - list-style: none; - margin: 0; - padding: 0; - position: relative; - top: 0; - width: 625rem; -} -.SolutionsHeroCarousel-slide { - display: flex; - flex-direction: column; - justify-content: center; - max-width: 68rem; - padding: 0 0.2rem; - position: relative; - width: 76vw; -} -@media only screen and (min-width: 38rem) { - .SolutionsHeroCarousel-wrapper, - .SolutionsHeroCarousel-slide { - width: 82vw; - } - .GoCarousel-controlPrev-solutionsHero { - left: 2rem; - } - .GoCarousel-controlNext-solutionsHero { - right: 2rem; - } -} -.Solutions-headline .Container { - display: flex; -} -.Solutions-useCases, -.Solutions-caseStudies { - margin-bottom: 6.25rem; -} -.Solutions-title { - padding: 5rem 1.5rem 3rem; -} -.Solutions-title h1, -.WhoUsesSubPage-heroInner--caseStudy h1, -.WhoUsesSubPage-heroInner--useCase h1 { - font-size: 1.5rem; - font-style: normal; - font-weight: normal; - line-height: 2rem; - margin-bottom: 0.5rem; -} -.WhoUsesSubPage-heroInner--caseStudy h1 { - margin-top: 0; -} -.WhoUsesSubPage-heroInner--useCase h1 { - margin-top: 1rem; -} -.Solutions-title h1 { - text-align: center; -} -.Solutions-title h3 { - color: #3e4042; - font-size: 1rem; - font-weight: normal; - letter-spacing: 0.0063rem; - line-height: 1.5rem; - margin-bottom: 0; - text-align: center; -} -.Solutions-headlineText { - display: inline-block; -} -.Solutions-headlineImg { - margin-top: 1.5rem; - position: relative; - width: 100%; -} -.Solutions-headlineImg img { - display: block; - width: 100%; -} -.Solutions-headlineBody { - align-items: flex-start; - color: #6e7072; - display: flex; - flex-direction: column; - font-size: 0.875rem; - font-weight: normal; - line-height: 1.5rem; - margin-bottom: 1.5rem; -} -.Solutions-headlineBody a { - align-items: center; - display: flex; - margin-top: 1rem; - text-decoration: none; -} -.Solutions-headlineBody a i, -.WhyGo-reasonLearnMoreLink a i, -.WhyGo-reasonShowMoreLink a i { - margin-left: 0.2rem; - text-decoration: none; - transition: transform 100ms ease-in-out; -} -.Solutions-headlineBody a:hover i, -.WhyGo-reasonLearnMoreLink a:hover i, -.WhyGo-reasonShowMoreLink a:hover i { - transform: translateX(0.2rem); -} -.Solutions-headlineNotification { - color: #6e7072; - font-size: 0.75rem; - font-style: normal; - font-weight: 500; - line-height: 2.25rem; - margin: 1.5rem 0; -} -.Solutions-headline { - background-color: #fafafa; -} -.Solutions-headline h2 { - color: #202224; - font-size: 1.5rem; - font-style: normal; - font-weight: normal; - line-height: 2rem; - margin-bottom: 1rem; -} -@media only screen and (min-width: 66.75rem) { - .SolutionsHeroCarousel-slide { - align-items: center; - flex-direction: row-reverse; - justify-content: space-between; - } - .Solutions-headlineText { - width: 33%; - } - .Solutions-headlineImg { - height: 100%; - margin-bottom: 0; - width: 60%; - } - .Solutions-headlineImg img { - max-height: 100%; - position: absolute; - right: 0; - top: 50%; - transform: translate(0, -50%); - } -} -.SolutionsTabs-tabList { - margin-top: 4rem; - width: 100%; -} -.SolutionsTabs-tabList hr { - border: 0.0625rem solid #c6c8ca; - margin: -0.0625rem 0 2rem; -} -.SolutionsTabs-tab { - background-color: #fff; - border-style: none; - color: #202224; - cursor: pointer; - font-size: 1rem; - font-weight: 500; - line-height: 2.25rem; - margin-right: 1.625rem; - outline: none; - padding: 0.375rem 0; -} -.SolutionsTabs-tab:focus { - border-bottom: 0.25rem solid #c6c8ca; -} -.SolutionsTabs-tab:last-of-type { - margin-right: 0; -} -.SolutionsTabs-tab[aria-selected='true'] { - border-bottom: 0.25rem solid #007d9c; -} -@media only screen and (min-width: 48rem) { - .SolutionsTabs-tab { - font-size: 1.125rem; - margin-right: 4rem; - } -} -.Solutions-useCasesHeader h2, -.Solutions-caseStudiesHeader h2 { - letter-spacing: 0.125rem; -} -.Solutions-cardList, -.Solutions-caseStudyList { - display: grid; - grid-gap: 1.5rem; - grid-template-columns: repeat(1, 1fr); - list-style: none; - padding-left: 0; -} -.Solutions-cardList[hidden] { - display: none; -} -.Solutions-caseStudiesList { - margin: 0 0 1rem 0; -} -.Solutions-card { - background: #fff; - border: 0.0625rem solid #c6c8ca; - border-radius: 0.625rem; - box-sizing: border-box; - flex: 0 100%; -} -@media only screen and (min-width: 38rem) { - .Solutions-cardList { - grid-template-columns: repeat(2, 1fr); - } -} -@media only screen and (min-width: 57.7rem) { - .Solutions-card { - box-shadow: none; - flex: 0 48%; - } - .Solutions-card:hover { - box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); - transition: all 0.2s ease-in-out; - } - .Solutions-cardList { - grid-template-columns: repeat(3, 1fr); - } -} -@media only screen and (min-width: 62.5rem) { - .Solutions-card { - box-shadow: none; - flex: 0 30%; - } -} -.Solutions-useCaseLogo { - height: 5rem; - margin: 0 2rem; - width: 100%; -} -.Solutions-card a:link, -.Solutions-card a:visited { - color: #202224; - display: block; - text-decoration: none; -} -.Solutions-useCaseAction { - bottom: 1rem; - color: #007d9c; - font-size: 1rem; - font-weight: normal; - letter-spacing: 0.0063rem; - line-height: 1.5rem; - position: absolute; -} -.Solutions-useCaseAction { - align-items: center; - display: flex; -} -.Solutions-useCaseAction i { - margin-left: 0.5rem; -} -.Solutions-useCaseDescription { - color: #6e7072; - font-size: 1rem; - font-style: normal; - font-weight: normal; - letter-spacing: 0.0063rem; - line-height: 1.5rem; -} -.Solutions-useCaseTitle { - color: #202224; - font-size: 1.125rem; - font-weight: 500; - line-height: 1.5rem; -} -.Solutions-useCaseBody { - flex: 1; - justify-content: center; - margin-bottom: 2.5rem; -} - -.Solutions-useCaseLogo { - display: flex; - flex: 1; - justify-content: center; - margin: 0; -} - -.Solutions-useCaseLogo img { - align-self: center; - max-height: 4rem; - max-width: 11rem; -} -.Solutions-useCaseLink { - height: 100%; - padding: 2rem 2rem 3rem; - position: relative; -} -.Solutions-footer { - margin: 2rem 0 2.875rem; -} -.Solutions-footer p { - color: #202224; - font-size: 1.125rem; - font-weight: normal; - letter-spacing: 0.007rem; - line-height: 1.5rem; -} -.TestimonialsGo-quotes { - display: flex; - left: 0; - list-style: none; - margin: 0; - padding: 0; - position: relative; - top: 0; - transition: left 0.2s ease-out; - width: 625rem; -} -.TestimonialsGo-quoteGroup { - align-items: flex-start; - display: flex; - margin: 0 0; - max-width: 62.5rem; - padding: 3.75rem 2rem 2.25rem; - width: 90vw; -} -.TestimonialsGo-quoteSingleItem { - display: flex; - flex: 1; -} -.TestimonialsGo-quoteContainer { - display: inline-flex; - flex: 1; - flex-direction: column; - min-width: 0; -} -.TestimonialsGo-quoteSection { - display: flex; - flex-wrap: wrap; - justify-content: space-between; -} -.TestimonialsGo-quoteSection p { - color: #202224; - font-size: 0.875rem; - letter-spacing: 0.0082rem; - line-height: 1.5rem; - text-align: center; -} -.TestimonialsGo-author { - color: #3e4042; - font-size: 0.8rem; - font-style: normal; - font-weight: normal; - line-height: 1.5rem; - text-align: right; - width: 100%; -} -.PullQuote-title, -.BackgroundQuote-title { - display: flex; - flex-wrap: wrap; - justify-content: flex-end; -} -.NoWrapSpan { - white-space: nowrap; -} -@media only screen and (min-width: 52rem) { - .TestimonialsGo-quote { - font-size: 1.3125rem; - } - .TestimonialsGo-author { - font-size: 1rem; - } - .TestimonialsGo-quoteSection p { - font-size: 1.3125rem; - letter-spacing: 0.0082rem; - line-height: 2.25rem; - } -} -.PullQuote { - color: #6e7072; - margin-bottom: 2rem; -} -.PullQuote-body { - margin: 1.5rem 0 1rem; -} -.PullQuote-link, -p.PullQuote-body, -p.BackgroundQuote-body { - color: inherit; -} -.PullQuote-author, -.BackgroundQuote-author { - display: flex; - flex-wrap: wrap; - font-style: normal; - font-weight: 500; - justify-content: flex-end; - margin-left: auto; - margin-top: 1rem; -} -.PullQuote-author { - font-size: 0.875rem; -} -.BackgroundQuote { - background-color: #007d9c; - color: #fff; - margin: 1.5rem auto; - padding: 2rem 1.5rem; -} -p.BackgroundQuote-body { - font-size: 1.3125rem; - line-height: 2.25rem; -} -.QuoteBlock { - border-bottom: 0.25rem solid #007d9c; - border-top: 0.25rem solid #007d9c; - display: block; - float: none; - margin-bottom: 1.5rem; - margin-left: 0; - margin-right: 0; - margin-top: 1.5rem; - padding-bottom: 0.5rem; - width: 100%; -} -@media only screen and (min-width: 48rem) { - .QuoteBlock { - float: right; - margin-top: 0; - width: 46%; - } - .PullQuote-body { - font-size: 1.125rem; - line-height: 1.75rem; - margin: 1.5rem 0 1rem; - } - .BackgroundQuote-body { - margin-top: 0; - } - .BackgroundQuote { - padding: 3rem 4rem 2rem; - } - .PullQuote-author { - font-size: 1rem; - } -} -.QuoteBlock-body { - color: #3e4042; - font-size: 1.125rem; - letter-spacing: 0.007rem; - line-height: 2rem; -} -.QuoteBlock-author { - color: #3e4042; - font-size: 1rem; - font-style: normal; - font-weight: 500; - line-height: 3rem; -} -.QuoteBlock-link { - color: #6e7072; -} -.LargeMedia { - align-items: flex-start; - display: flex; - padding: 2.125rem 0.5rem; -} -.LargeMedia + .LargeMedia { - border-top: 0.0625rem solid #dcdee0; -} -.LargeMedia-image { - height: 5rem; - margin-right: 1rem; - object-fit: contain; - width: 5rem; -} -.LargeMedia-body { - flex: 1; -} - -.SmallMedia-image { - height: 3rem; - margin-right: 1rem; - object-fit: contain; - width: 3rem; -} - -.XLargeMedia-image { - height: 8rem; - margin-right: 1rem; - object-fit: contain; - width: 8rem; -} - -@media only screen and (min-width: 48rem) { - .LargeMedia { - align-items: center; - } - .SmallMedia-image { - height: 9rem; - margin-right: 5.5rem; - width: 9rem; - } - .LargeMedia-image { - height: 12.5rem; - margin-right: 5.5rem; - width: 12.5rem; - } - .XLargeMedia-image { - height: 18rem; - margin-right: 1rem; - object-fit: contain; - width: 18rem; - } -} -.MediaList { - display: flex; - flex-wrap: wrap; - justify-content: space-around; - list-style: none; - padding: 0; -} -.MediaList-item { - flex: 0 1 14rem; - justify-content: space-around; - text-align: center; -} -.MediaList-itemImage { - height: 10rem; - object-fit: contain; - width: 10rem; -} -.MediaList-itemTitle { - color: #202224; -} -.MediaList-itemBody { - color: #555759; -} -@media only screen and (min-width: 48rem) { - .MediaList { - margin-left: -2rem; /* First item of each row should have no left gutter */ - } - .MediaList-item { - flex: 0 0 12rem; - margin-left: 2rem; /* Gutter between items */ - } -} -.MediaList-itemBox { - background-color: #f8f8f8; - box-shadow: 0 0.125rem 0.5rem 0 rgba(0, 0, 0, 0.22); - flex: 0 1 33.125rem; - justify-content: space-around; - margin-top: 2rem; - padding: 1.5rem; -} -.MediaList-itemBoxHeader-top { - align-items: center; - flex-direction: column; - margin: auto; - text-align: center; - width: 10.75rem; -} -.MediaList-itemBoxHeader { - align-items: center; - display: flex; - flex-direction: column; - margin: auto; - text-align: center; - width: 10.75rem; -} -.MediaList-itemBoxImage { - height: 5.125rem; - object-fit: contain; - width: 5.125rem; -} -.MediaList-itemBox .MediaList-itemBoxTitle { - color: #202224; - font-size: 1.5rem; - font-weight: normal; - margin: 0.5rem 0 0 0; -} -.MediaList-itemBox .MediaList-itemBoxBody { - align-self: flex-end; - color: #555759; - flex: 1; -} -.MediaList-itemBox .MediaList-itemBoxBody-top { - align-self: flex-start; - color: #555759; - flex: 1; - margin: auto !important; -} -@media only screen and (min-width: 48rem) { - .MediaList-itemBoxHeader { - justify-content: flex-end; - margin: 0 1rem 1.5rem 0; - } - .MediaList-itemBox { - display: flex; - flex: 0 0 33.125rem; - margin: 2rem 0 0 2rem; /* Gutter between grid cells. */ - min-height: 15.0625rem; - } - .MediaList-itemBox .MediaList-itemBoxBody { - margin: 0 1.3rem 2rem 0; - } -} -.StarItem { - align-items: flex-start; - display: flex; -} -.StarItem-icon { - align-items: center; - background: linear-gradient(10.64deg, #007d9c 0%, #00a29c 100%); - border-radius: 50%; - display: flex; - height: 1.5rem; - justify-content: center; - margin: 1.1rem 1.25rem 0 0; - width: 1.5rem; -} -.StarItem-image { - height: 1.25rem; - object-fit: contain; - width: 1.25rem; -} -.StarItem-body { - flex: 1; -} -.StarItem-title { - margin: 1rem 0; -} - -.Right { - float: right; - margin-left: 1rem; -} -.Left { - float: left; - margin-right: 1rem; -} -.SearchForm { - align-items: center; - background-color: transparent; - border-radius: 0.25rem; - display: flex; - flex: 1; - font-size: 1rem; - height: 2rem; - margin: 0.6875rem 0; - max-width: 2rem; - transition: max-width 200ms; -} -.SearchForm--open { - background-color: #fff; - margin-left: 1.5rem; - max-width: 100%; -} -.SearchForm svg { - fill: #fff; -} -.SearchForm--open svg { - fill: #555759; - margin-right: 0.5rem; -} -.SearchForm-input { - height: 100%; - opacity: 0; - padding: 0; - transition: width 200ms, padding 200ms, opacity 200ms; - width: 0; -} -.SearchForm--open .SearchForm-input { - flex: 1; - opacity: 1; - padding: 0.5rem; - transition: width 200ms, padding 200ms; - width: 100%; -} -.SearchForm-input::placeholder { - color: #848688; -} -.SearchForm-input { - background-color: transparent; - border: none; - box-sizing: border-box; - font: inherit; - opacity: 0; - outline: none; -} -.SearchForm-submit { - background-color: transparent; - border: none; - box-sizing: border-box; - cursor: pointer; - display: flex; - outline: 0; - padding: 0; -} -.SearchForm svg { - box-sizing: border-box; - cursor: pointer; - margin-left: 0.5rem; - width: 1.4375rem; -} -@media only screen and (min-width: 32rem) { - .Header-rightContent { - width: 100%; - } - .SearchForm { - background-color: #fff; - margin: 0.6rem 1.4rem 0.6rem 0; - max-width: none; - } - .SearchForm-input { - opacity: 1; - padding: initial; - width: 100%; - } - .SearchForm svg { - fill: #555759; - margin-right: 0.5rem; - } -} -.Series-list { - list-style: none; - padding: 0; -} -.Series-listItem { - display: flex; -} -.Series-listItem a { - display: flex; - flex: 1; - padding: 1.25rem 0; -} -.Series-listItem + .Series-listItem { - border-top: 0.0625rem solid #dcdee0; -} -.Series-listItemIcon { - margin-right: 1rem; -} -.Series-listItemIcon img { - width: 4rem; -} -.Series-listItemText { - flex: 1; -} -.Series-listItemPrimary { - display: block; - font-size: 1.125rem; - margin: 0; -} -.Series-listItemSecondary { - color: #202224; - display: inline-block; - margin-bottom: 0; - text-decoration: none; -} -.UseCaseSubNav { - background-color: #fff; - box-shadow: 0 0.125rem 0.125rem rgba(171, 171, 171, 0.405239); - position: fixed; - width: 100%; - z-index: 10; -} -.UseCaseSubNav--default { - top: 3.5rem; -} -.UseCaseSubNav--lower { - top: calc(3.5rem + 9.75rem); -} -.UseCaseSubNav-menu { - background-color: #fff; - box-shadow: 0 0.125rem 0.125rem rgba(171, 171, 171, 0.405239); - max-height: 0; - overflow: hidden; - padding-left: 1rem; - position: absolute; - transition: max-height 100ms ease-in-out; - width: 100%; -} -.UseCaseSubNav-menuHeader { - align-items: center; - background: transparent; - border: none; - color: #555759; - cursor: pointer; - display: flex; - font-size: 0.875rem; - justify-content: space-between; - outline: none; - padding: 0.8125rem 1rem 0.8125rem 1.6875rem; - width: 100%; -} -.UseCaseSubNav-menuIcon { - pointer-events: none; - transition: transform 100ms ease-in-out; -} -.UseCaseSubNav-menuIcon--open { - transform: rotate(180deg); -} -.UseCaseSubNav-menu--open { - max-height: 25rem; - padding-bottom: 2rem; -} -.UseCase-content { - display: flex; - flex-direction: row; -} -.CaseStudy-content { - display: grid; - gap: 2rem; - grid-template-columns: 1fr; -} -.CaseStudy-contentBody img { - width: 100%; -} -.CaseStudy-contentBody hr { - border: 0.0625rem solid #c6c8ca; - margin: 2rem 0 2rem; -} -.CaseStudy-contentAside { - flex: 0 0 33.33%; - min-width: 18.75rem; -} -.UseCase-contentAside { - display: none; -} -.UseCase-content { - margin-top: 2rem; -} -.UseCase-contentBody { - flex: 0 0 100%; - margin-top: 1rem; - max-width: 47.8125rem; - width: 100%; -} -.UseCase-contentBody h2:first-of-type, -.UseCase-contentBody h3:first-of-type { - margin-top: 0; -} -.UseCase-contentBody h2, -.FeaturedUsers h2:first-of-type { - margin-bottom: 1.5rem; - margin-top: 3rem; -} -@media only screen and (min-width: 57.7rem) { - .CaseStudy-content { - grid-template-columns: 2fr 1fr; - } - .UseCase-contentAside { - display: block; - flex: 0 0 20%; - position: sticky; - } - .UseCaseSubNav { - display: none; - } - .UseCase-contentBody { - flex: 0 0 80%; - order: 1; - width: 80%; - } - .CaseStudy-contentAside { - order: 2; - } - .CaseStudy-contentBody { - order: 1; - } -} -.UseCaseSubNav-anchorLinks { - align-items: flex-start; - display: flex; - flex-direction: column; -} -.UseCaseSubNav-anchorLinks--sticky { - position: fixed; - top: 5.5rem; -} -a.UseCase-anchorLink { - background: transparent; - border: none; - color: #202224; - font-size: 1.125rem; - font-weight: 400; - line-height: 1.5rem; - margin-top: 1rem; - padding-left: 0.5rem; - position: relative; -} -a.UseCase-anchorLink:first-of-type { - margin-top: 1.5rem; -} -a.UseCase-anchorLink.selected { - font-weight: 500; -} -a.UseCase-anchorLink.selected::before { - background-color: #007d9c; - border-radius: 1rem; - content: ' '; - display: inline-block; - height: 0.3rem; - left: -0.5rem; - position: absolute; - top: 0.5rem; - width: 0.3rem; -} -.WhoUsesSubPage-hero--useCase { - margin-top: 2.625rem; -} -.WhoUsesSubPage-heroInner--caseStudy, -.WhoUsesSubPage-heroInner--useCase { - display: flex; - flex-direction: column; - justify-content: center; - margin-bottom: 1.5rem; - position: relative; -} -.WhoUsesSubPage-heroInner--useCase { - background-color: #fafafa; - padding-bottom: 2.5rem; - padding-top: 3.5rem; -} -.WhoUsesSubPage-heroInner--caseStudy > div { - justify-content: center; -} -.WhoUsesSubPage-heroContent--caseStudy { - display: flex; - flex-direction: column-reverse; - max-width: 75.75rem; - position: relative; - z-index: 1; -} -.WhoUsesSubPage-heroContent--useCase { - margin: auto; - max-width: 75.75rem; - width: 100%; -} -.WhoUsesSubPage-heroText--caseStudy, -.WhoUsesSubPage-heroText--useCase { - display: flex; - flex-direction: column; - justify-content: center; - width: 100%; -} -.WhoUsesSubPage-heroText--caseStudy { - padding: 2rem 1.5rem; -} -.WhoUsesSubPage-heroText--useCase { - padding: 0 1.5rem; -} -.WhoUsesSubPage-heroImg { - background: -webkit-linear-gradient(0deg, #fafafa 50vw, #bfeaf4 50vw); - display: flex; - max-width: 75.75rem; - padding-left: 1.5rem; - position: relative; - width: 100%; - z-index: 1; -} -.WhoUsesSubPage-heroImg img { - height: auto; - max-height: 10.625rem; - min-height: 8rem; - width: auto; -} -@media only screen and (min-width: 38rem) { - .Solutions-title h1, - .WhoUsesSubPage-heroInner--caseStudy h1, - .WhoUsesSubPage-heroInner--useCase h1 { - font-size: 2.25rem; - line-height: 3rem; - } - .WhoUsesSubPage-heroImg { - background: -webkit-linear-gradient(0deg, #fafafa 40vw, #bfeaf4 40vw); - } - .WhoUsesSubPage-heroImg img { - max-height: 15.625rem; - min-height: 10.625rem; - } -} -@media only screen and (min-width: 57.7rem) { - .WhoUsesSubPage-hero--useCase { - margin-top: 0; - } - .WhoUsesSubPage-heroInner--caseStudy { - background: -webkit-linear-gradient(0deg, #fafafa 70vw, #bfeaf4 70vw); - flex-direction: row; - } - .WhoUsesSubPage-heroContent--caseStudy { - align-items: center; - flex-direction: row; - } - .WhoUsesSubPage-heroImg { - background: transparent; - min-width: 37.75rem; - padding: 0; - width: 55%; - } - .WhoUsesSubPage-heroText--caseStudy { - width: 45%; - } - .WhoUsesSubPage-heroImg img { - max-height: none; - min-height: 18.75rem; - width: 100%; - } - .WhoUsesSubPage-heroInner--useCase h1 { - margin-top: 3rem; - } -} -.ToolsBlurbs { - display: grid; - gap: 2rem 3.4375rem; - grid-template-columns: 1fr; - margin-top: 1.5rem; -} -.ToolsBlurbs-blurb { - background-color: #fff; - border: 0.0625rem solid #dcdee0; - border-radius: 0.25rem; - padding: 1.5rem 1rem; -} -.ToolsBlurbs-blurbHeader { - align-items: center; - display: flex; -} -.ToolsBlurbs-blurbIcon { - height: 1.5rem; - margin-right: 1rem; - width: 1.5rem; -} -@media only screen and (min-width: 48rem) { - .ToolsBlurbs { - grid-template-columns: 1fr 1fr; - } -} -img.PullQuote-image { - width: 2.625rem; -} - -.Card { - background-color: #fff; - border: 0.0625rem solid #c6c8ca; - border-radius: 0.25rem; - height: 100%; -} - -.Card a, -.Card a:visited, -.Card a:hover { - text-decoration: none; -} - -.Card-inner { - display: flex; - flex-direction: column; - height: 100%; -} - -.Card-thumbnail { - background-position: center; - background-size: cover; - height: 9.5625rem; -} - -.Card-content { - display: flex; - flex: 1; - flex-direction: column; - padding: 1.5rem; -} - -.Card-contentTitle, -.Card-contentBody { - line-height: 1.5rem; -} - -.Card-contentTitle { - color: #202224; - font-size: 1.125rem; - font-weight: 500; -} - -.Card-contentBody { - color: #6e7072; - flex: auto; - font-size: 0.875rem; - margin-top: 1rem; -} - -.Card-contentCta { - align-items: center; - display: flex; -} - -.Card-contentCta span { - margin-right: 0.6875rem; -} - -.Card-selfPacedFooter { - display: flex; -} - -.Card-selfPacedCredits { - color: #6e7072; - flex: 1; - font-size: 0.75rem; -} - -.Card-selfPacedRating { - width: 5rem; -} - -.Card-starRating { - background-image: url('/images/learn/star-rating.png'); - background-position: left; - background-repeat: no-repeat; - height: 1rem; -} - -.Book a, -.Book a:visited, -.Book a:hover { - text-decoration: none; -} - -.Book-inner { - align-items: flex-start; - display: flex; - justify-content: space-between; -} - -.Book-thumbnail { - width: 6.625rem; -} - -.Book-thumbnail img { - width: 100%; -} - -.Book-content { - flex: 1; - margin-left: 1.6875rem; -} - -.Book-title { - color: #202224; - font-size: 1.125rem; - font-weight: 500; - line-height: 1.5rem; - margin: 0 0 0.5rem; -} - -.Book-description { - color: #6e7072; - font-size: 0.875rem; - line-height: 1.5rem; -} - -.Book-cta { - align-items: center; - display: flex; - height: 1.5rem; -} - -.Book-cta span { - margin-right: 0.6875rem; -} - -@media only screen and (min-width: 48rem) { - .Book-inner { - flex-direction: column; - } - - .Book-thumbnail { - width: 100%; - } - - .Book-content { - margin: 1rem 0 0; - } -} diff --git a/go.dev/cloudbuild.ci.yaml b/go.dev/cloudbuild.ci.yaml index 0dece69e..3c494efe 100644 --- a/go.dev/cloudbuild.ci.yaml +++ b/go.dev/cloudbuild.ci.yaml @@ -8,4 +8,4 @@ steps: entrypoint: bash args: - -c - - go run ./cmd/events/ > ./data/events.yaml + - go run ./cmd/events/ > ./_content/events.yaml diff --git a/go.dev/cloudbuild.staging.yaml b/go.dev/cloudbuild.staging.yaml index 1ad6f161..f6f473d2 100644 --- a/go.dev/cloudbuild.staging.yaml +++ b/go.dev/cloudbuild.staging.yaml @@ -3,7 +3,7 @@ steps: entrypoint: bash args: - -c - - go run ./cmd/events/ > ./data/events.yaml + - go run ./cmd/events/ > ./_content/events.yaml - name: "gcr.io/cloud-builders/gcloud" args: ["app", "deploy", "app.staging.yaml"] - name: "gcr.io/cloud-builders/gcloud" diff --git a/go.dev/cloudbuild.yaml b/go.dev/cloudbuild.yaml index e7db927a..bdf18ad3 100644 --- a/go.dev/cloudbuild.yaml +++ b/go.dev/cloudbuild.yaml @@ -3,7 +3,7 @@ steps: entrypoint: bash args: - -c - - go run ./cmd/events/ > ./data/events.yaml + - go run ./cmd/events/ > ./_content/events.yaml - name: "gcr.io/cloud-builders/gcloud" args: ["app", "deploy"] - name: "gcr.io/cloud-builders/gcloud" diff --git a/go.dev/cmd/events/main.go b/go.dev/cmd/events/main.go index 1ccc9e44..1b1e7a0d 100644 --- a/go.dev/cmd/events/main.go +++ b/go.dev/cmd/events/main.go @@ -26,7 +26,7 @@ const ( // eventsHeader is a header comment for the output content. eventsHeader = `# DO NOT EDIT: Autogenerated from cmd/events. # To update, run: -# go run github.com/godevsite/go.dev/cmd/events > data/events.yaml` +# go run github.com/godevsite/go.dev/cmd/events > _content/events.yaml` ) func main() { diff --git a/go.dev/cmd/frontend/main.go b/go.dev/cmd/frontend/main.go index fd37d05b..93572e43 100644 --- a/go.dev/cmd/frontend/main.go +++ b/go.dev/cmd/frontend/main.go @@ -22,7 +22,7 @@ var discoveryHosts = map[string]string{ func main() { dir := "../.." - if _, err := os.Stat("content"); err == nil { + if _, err := os.Stat("_content"); err == nil { // Running in repo root. dir = "." } diff --git a/go.dev/cmd/internal/site/page.go b/go.dev/cmd/internal/site/page.go index c9930270..f7226e61 100644 --- a/go.dev/cmd/internal/site/page.go +++ b/go.dev/cmd/internal/site/page.go @@ -48,7 +48,7 @@ type Page struct { // loadPage loads the site's page from the given file. // It returns the page but also adds the page to site.pages and site.pagesByID. func (site *Site) loadPage(file string) (*Page, error) { - id := strings.TrimPrefix(file, "content/") + id := strings.TrimPrefix(file, "_content/") if strings.HasSuffix(id, "/_index.md") { id = strings.TrimSuffix(id, "/_index.md") } else if strings.HasSuffix(id, "/index.md") { @@ -56,7 +56,7 @@ func (site *Site) loadPage(file string) (*Page, error) { } else { id = strings.TrimSuffix(id, ".md") } - if file == "content/index.md" { + if file == "_content/index.md" { id = "" } @@ -68,7 +68,7 @@ func (site *Site) loadPage(file string) (*Page, error) { // Determine section. for dir := path.Dir(file); dir != "."; dir = path.Dir(dir) { if _, err := os.Stat(site.file(dir + "/_index.md")); err == nil { - p.section = strings.TrimPrefix(dir, "content/") + p.section = strings.TrimPrefix(dir, "_content/") break } } @@ -77,9 +77,9 @@ func (site *Site) loadPage(file string) (*Page, error) { p.parent = p.section if p.parent == p.id { p.parent = "" - for dir := path.Dir("content/" + p.id); dir != "."; dir = path.Dir(dir) { + for dir := path.Dir("_content/" + p.id); dir != "."; dir = path.Dir(dir) { if _, err := os.Stat(site.file(dir + "/_index.md")); err == nil { - p.parent = strings.TrimPrefix(dir, "content/") + p.parent = strings.TrimPrefix(dir, "_content/") break } } @@ -148,11 +148,11 @@ func (p *Page) renderHTML() error { } // Load base template. - base, err := ioutil.ReadFile(p.site.file("layouts/site.tmpl")) + base, err := ioutil.ReadFile(p.site.file("_templates/layouts/site.tmpl")) if err != nil { return err } - t := p.site.clone().New("layouts/site.tmpl") + t := p.site.clone().New("_templates/layouts/site.tmpl") if err := tmplfunc.Parse(t, string(base)); err != nil { return err } @@ -162,7 +162,7 @@ func (p *Page) renderHTML() error { if layout == "" { layout = "default" } - data, err := ioutil.ReadFile(p.site.file("layouts/" + layout + ".tmpl")) + data, err := ioutil.ReadFile(p.site.file("_templates/layouts/" + layout + ".tmpl")) if err != nil { return err } diff --git a/go.dev/cmd/internal/site/site.go b/go.dev/cmd/internal/site/site.go index 0e4773df..23fa3b3c 100644 --- a/go.dev/cmd/internal/site/site.go +++ b/go.dev/cmd/internal/site/site.go @@ -9,7 +9,6 @@ package site import ( "bytes" - "crypto/sha256" "fmt" "io" "io/ioutil" @@ -30,7 +29,6 @@ type Site struct { URL string Title string - data map[string]interface{} pages []*Page pagesByID map[string]*Page dir string @@ -54,58 +52,16 @@ func Load(dir string) (*Site, error) { } // Read site config. - data, err := ioutil.ReadFile(site.file("data/site.yaml")) + data, err := ioutil.ReadFile(site.file("_content/site.yaml")) if err != nil { return nil, err } if err := yaml.Unmarshal(data, &site); err != nil { - return nil, fmt.Errorf("parsing data/site.yaml: %v", err) - } - - // Load site data files. - // site.data is a directory tree in which each key points at - // either another directory tree (a subdirectory) - // or a parsed yaml file. - site.data = make(map[string]interface{}) - root := site.file("data") - err = filepath.Walk(root, func(name string, info os.FileInfo, err error) error { - if err != nil { - return err - } - if name == root { - name = "." - } else { - name = name[len(root)+1:] - } - if info.IsDir() { - site.data[name] = make(map[string]interface{}) - return nil - } - if strings.HasSuffix(name, ".yaml") { - data, err := ioutil.ReadFile(filepath.Join(root, name)) - if err != nil { - return err - } - var d interface{} - if err := yaml.Unmarshal(data, &d); err != nil { - return fmt.Errorf("unmarshaling %v: %v", name, err) - } - - elems := strings.Split(name, "/") - m := site.data - for _, elem := range elems[:len(elems)-1] { - m = m[elem].(map[string]interface{}) - } - m[strings.TrimSuffix(elems[len(elems)-1], ".yaml")] = d - } - return nil - }) - if err != nil { - return nil, fmt.Errorf("loading data: %v", err) + return nil, fmt.Errorf("parsing _content/site.yaml: %v", err) } // Load site pages from md files. - err = filepath.Walk(site.file("content"), func(name string, info os.FileInfo, err error) error { + err = filepath.Walk(site.file("_content"), func(name string, info os.FileInfo, err error) error { if err != nil { return err } @@ -174,34 +130,29 @@ func (site *Site) newPage(short string) *Page { return p } +// data parses the named yaml file and returns its structured data. +func (site *Site) data(name string) (interface{}, error) { + data, err := ioutil.ReadFile(site.file("_content/" + name + ".yaml")) + if err != nil { + return nil, err + } + var d interface{} + if err := yaml.Unmarshal(data, &d); err != nil { + return nil, err + } + return d, nil +} + // Open returns the content to serve at the given path. // This function makes Site an http.FileServer, for easy HTTP serving. func (site *Site) Open(name string) (http.File, error) { name = strings.TrimPrefix(name, "/") switch ext := path.Ext(name); ext { case ".css", ".jpeg", ".jpg", ".js", ".png", ".svg", ".txt": - if f, err := os.Open(site.file("content/" + name)); err == nil { - return f, nil - } - if f, err := os.Open(site.file("static/" + name)); err == nil { + if f, err := os.Open(site.file("_content/" + name)); err == nil { return f, nil } - // Maybe it is name.hash.ext. Check hash. - // We will stop generating these eventually, - // so it doesn't matter that this is slow. - prefix := name[:len(name)-len(ext)] - hash := path.Ext(prefix) - prefix = prefix[:len(prefix)-len(hash)] - if len(hash) == 1+64 { - file := site.file("assets/" + prefix + ext) - if data, err := ioutil.ReadFile(file); err == nil && fmt.Sprintf(".%x", sha256.Sum256(data)) == hash { - if f, err := os.Open(file); err == nil { - return f, nil - } - } - } - case ".html": id := strings.TrimSuffix(name, "/index.html") if name == "index.html" { diff --git a/go.dev/cmd/internal/site/tmpl.go b/go.dev/cmd/internal/site/tmpl.go index d0a9c546..887f4182 100644 --- a/go.dev/cmd/internal/site/tmpl.go +++ b/go.dev/cmd/internal/site/tmpl.go @@ -5,9 +5,6 @@ package site import ( - "crypto/sha256" - "encoding/base64" - "encoding/hex" "fmt" "os" "path" @@ -24,9 +21,8 @@ import ( func (site *Site) initTemplate() error { funcs := template.FuncMap{ - "data": func() interface{} { return site.data }, + "data": site.data, "dict": dict, - "fingerprint": fingerprint, "first": first, "isset": isset, "list": list, @@ -34,7 +30,6 @@ func (site *Site) initTemplate() error { "path": pathFn, "replace": replace, "replaceRE": replaceRE, - "resources": site.resources, "safeHTML": safeHTML, "sort": sortFn, "where": where, @@ -42,7 +37,7 @@ func (site *Site) initTemplate() error { } site.base = template.New("site").Funcs(funcs) - if err := tmplfunc.ParseGlob(site.base, site.file("templates/*.tmpl")); err != nil && !strings.Contains(err.Error(), "pattern matches no files") { + if err := tmplfunc.ParseGlob(site.base, site.file("_templates/*.tmpl")); err != nil && !strings.Contains(err.Error(), "pattern matches no files") { return err } return nil @@ -69,23 +64,6 @@ func toString(x interface{}) string { } } -type Fingerprint struct { - r *Resource - Data struct { - Integrity string - } - RelPermalink string -} - -func fingerprint(r *Resource) *Fingerprint { - f := &Fingerprint{r: r} - sum := sha256.Sum256(r.data) - ext := path.Ext(r.RelPermalink) - f.RelPermalink = "/" + strings.TrimSuffix(r.RelPermalink, ext) + "." + hex.EncodeToString(sum[:]) + ext - f.Data.Integrity = "sha256-" + base64.StdEncoding.EncodeToString(sum[:]) - return f -} - func first(n int, list reflect.Value) reflect.Value { if !list.IsValid() { return list @@ -276,7 +254,7 @@ func (r *PageResources) GetMatch(name string) (*Resource, error) { for _, rs := range r.p.TheResources { if name == rs.Name { if rs.data == nil { - rs.RelPermalink = strings.TrimPrefix(filepath.ToSlash(filepath.Join(r.p.file, "../"+rs.Src)), "content") + rs.RelPermalink = strings.TrimPrefix(filepath.ToSlash(filepath.Join(r.p.file, "../"+rs.Src)), "_content") data, err := os.ReadFile(r.p.site.file(r.p.file + "/../" + rs.Src)) if err != nil { return nil, err @@ -297,18 +275,6 @@ type Resource struct { Params map[string]string } -func (site *Site) resources() Resources { return Resources{site} } - -type Resources struct{ site *Site } - -func (r Resources) Get(name string) (*Resource, error) { - data, err := os.ReadFile(r.site.file("assets/" + name)) - if err != nil { - return nil, err - } - return &Resource{data: data, RelPermalink: name}, nil -} - func yamlFn(s string) (interface{}, error) { var d interface{} if err := yaml.Unmarshal([]byte(s), &d); err != nil { diff --git a/go.dev/content/about.md b/go.dev/content/about.md deleted file mode 100644 index 15c9fbc0..00000000 --- a/go.dev/content/about.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: 'About' -layout: article -date: 2019-06-25T17:51:23-04:00 ---- - -[Go.dev](https://go.dev) is a companion website to [golang.org](https://golang.org). [Golang.org](https://golang.org) is the home of the open source project and distribution, while [go.dev](https://go.dev) is the hub for Go users providing centralized and curated resources from across the Go ecosystem. - -{{gopher ` - color: pink - align: right -`}} -Go.dev provides: - -1. Centralized information for Go packages and modules published on index.golang.org. -2. Essential learning resources -3. Critical use cases & case studies - -Go.dev is currently in [MVP](https://en.wikipedia.org/wiki/Minimum_viable_product) status. We're proud of what we've built and excited to share it with the community. We hope you find value and joy in using go.dev. Go.dev only has a small portion of features we intend to build, and we are actively seeking feedback. If you have any ideas, suggestions or issues, please let us know. - -## Adding a package -Data for the site is downloaded from [proxy.golang.org](https://proxy.golang.org/). We monitor the [Go Module Index](https://index.golang.org/index) regularly for new packages to add to pkg.go.dev. If you don’t see a package on pkg.go.dev, you can add it by doing one of the following: - -* Visiting that page on pkg.go.dev, and clicking the "Request" button. For example:
    https://pkg.go.dev/example.com/my/module - -* Making a request to proxy.golang.org for the module version, to any endpoint specified by the [Module proxy protocol](https://golang.org/cmd/go/#hdr-Module_proxy_protocol). For example:
    https://proxy.golang.org/example.com/my/module/@v/v1.0.0.info - -* Downloading the package via the [go command](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them). For example:
    GOPROXY=https://proxy.golang.org GO111MODULE=on go get example.com/my/module@v1.0.0 - -## Removing a package -If you are the author of a package and would like to have it removed from pkg.go.dev, please [file an issue](https://golang.org/s/pkgsite-feedback) on the Go Issue Tracker with the path that you want to remove. - -Note that we can only remove a module entirely from the site. We cannot remove it just for specific versions. - -## Documentation - -Documentation is generated based on Go source code downloaded from the Go Module Mirror at `proxy.golang.org//@v/.zip`. New module versions are fetched from index.golang.org and added to pkg.go.dev site every few minutes. - -The [guidelines for writing documentation](https://blog.golang.org/godoc) for the godoc tool apply to pkg.go.dev. - -It’s important to write a good summary of the package in the first sentence of the package comment. The go.dev site indexes the first sentence and displays it in search results. - -### Build Context - -Most Go packages look and behave the same regardless of the machine architecture -or operating system. But some have different documentation, even different -exported symbols, for different architectures or OSes. Some packages may not even -exist for some architectures. - -Go calls an OS/architecture pair a "build context" and writes it with a slash, -like `linux/amd64`. You may also see the terms `GOOS` and `GOARCH` for the OS -and architecture respectively, because those are the names of the environment -variables that the go command uses. (See the [go command -documentation](https://golang.org/cmd/go) for more information.) - -If a package exists at only one build context, pkg.go.dev displays that build -context at the upper right corner of the documentation. For example, -https://pkg.go.dev/syscall/js displays "js/wasm". - -If a package is different in different build contexts, then pkg.go.dev will -display one by default and provide a dropdown control at the upper right so you -can select a different one. - -For packages that are the same across all build contexts, pkg.go.dev does not -display any build context information. - -Although there are many possible OS/architecture pairs, pkg.go.dev considers -only a -[handful](https://go.googlesource.com/pkgsite/+/master/internal/build_context.go#29) -of them. So if a package only exists for unsupported build contexts, pkg.go.dev -will not display documentation for it. - -### Source Links - -Most of the time, pkg.go.dev can determine the location of a package's source -files, and provide links from symbols in the documentation to their definitions -in the source. If your package's source is not linked, try one of the following -two approaches. - -If pkg.go.dev finds a `go-source` meta tag on your site that follows the -[specified format](https://github.com/golang/gddo/wiki/Source-Code-Links), it -can often determine the right links, even though the format doesn't take -versioning into account. - -If that doesn't work, you will need to add your repo or code-hosting site to -pkg.go.dev's list of patterns (see [Go Issue 40477](https://golang.org/issues/40477) for context). -Read about how to [contribute to pkg.go.dev](https://go.googlesource.com/pkgsite#contributing), -then produce a CL that adds a pattern to the -[`internal/source`](https://go.googlesource.com/pkgsite/+/refs/heads/master/internal/source/source.go) -package. - -## Best practices - -Pkg.go.dev surfaces details about Go packages and modules in order to help provide guidelines for best practices with Go. - -Here are the details we surface: - -* Has go.mod file - * The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go. A module version is defined by a tree of source files, with a go.mod file in its root. [More information about the go.mod file](https://golang.org/cmd/go/#hdr-The_go_mod_file). - -* Redistributable license - * Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed. For more information on how pkg.go.dev determines if a license is redistributable, see our [license policy](http://pkg.go.dev/license-policy). - -* Tagged version - * When the go get command resolves modules by default it prioritizes tagged versions. When no tagged versions exist, go get looks up the latest known commit. Modules with tagged versions give importers more predictable builds. See [semver.org](https://semver.org) and [Keeping Your Modules Compatible](https://blog.golang.org/module-compatibility) for more information. - -* Stable version - * Projects at v0 are assumed to be experimental. When a project reaches a stable version — major version v1 or higher — breaking changes must be done in a new major version. Stable versions give developers the confidence that breaking changes won’t occur when they upgrade a package to the latest minor version. See [Go Modules: v2 and Beyond](https://blog.golang.org/v2-go-modules) for more information. - -## Creating a badge - -The pkg.go.dev badge provides a way for Go users to learn about the pkg.go.dev page associated with a given Go package or module. You can create a badge using the [badge generation tool](https://pkg.go.dev/badge). The tool will generate html and markdown snippets that you can use on your project website or in a README file. - -[![PkgGoDev](https://pkg.go.dev/badge/golang.org/x/pkgsite)](https://pkg.go.dev/golang.org/x/pkgsite) - -## Adding links - -You can add links to your README files and package documentation that will be -shown on the right side of the pkg.go.dev page. For details, see [this -issue](https://golang.org/issue/42968). - -## Keyboard Shortcuts - -There are keyboard shortcuts for navigating package documentation pages. Type '?' on a package page for help. - -## Bookmarklet - -The pkg.go.dev bookmarklet navigates from pages on source code hosts, such as GitHub, Bitbucket, Launchpad etc., to the package documentation. To install the bookmarklet, click and drag the following link to your bookmark bar: Pkg.go.dev Doc - -## License policy -Information for a given package or module may be limited if we are not able to detect a suitable license. See our [license policy](https://pkg.go.dev/license-policy) for more information. - -## Feedback - -Share your ideas, feature requests, and bugs on the [Go Issue Tracker](https://golang.org/s/discovery-feedback) For questions, please post on the #tools slack channel on the [Gophers Slack](https://invite.slack.golangbridge.org/), or email the [golang-dev mailing list](https://groups.google.com/group/golang-dev). diff --git a/go.dev/content/copyright.md b/go.dev/content/copyright.md deleted file mode 100644 index dd1befe5..00000000 --- a/go.dev/content/copyright.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Copyright" -layout: article -date: 2019-11-05T15:50:08-05:00 ---- - -Except as noted, the contents of this site -are licensed under the Creative Commons Attribution 3.0 -License, and code is licensed under a BSD license. diff --git a/go.dev/content/index.md b/go.dev/content/index.md deleted file mode 100644 index 3d2c2deb..00000000 --- a/go.dev/content/index.md +++ /dev/null @@ -1,329 +0,0 @@ ---- -title: go.dev ---- - -
    -
    -
    -

    Build fast, reliable, and efficient software at scale

    -
      -
    • - - - - Go is an open source programming language supported by Google -
    • -
    • - - - - Easy to learn and get started with -
    • -
    • - - - - Built-in concurrency and a robust standard library -
    • -
    • - - - - Growing ecosystem of partners, communities, and tools -
    • -
    -
    -
    - -
    -

    - Download packages for - Windows 64-bit, - macOS, - Linux, and - more -

    -

    - The go command by default downloads and authenticates - modules using the Go module mirror and Go checksum database run by - Google. Learn more. -

    -
    -
    -
    - Go Gopher climbing a ladder. -
    -
    -
    -
    - {{$solutions := index (where .Pages "Section" "solutions") 0}} -
    -
    -

    Companies using Go

    -

    Organizations in every industry use Go to power their software and services - - View all stories - -

    -
    -
    -
      - {{range where $solutions.Pages "Params.series" "Case Studies"}} - {{if .Params.link }} - {{if .Params.inLandingPageGrid }} -
    • - {{$logo := .Resources.GetMatch "logo"}} - - - -
    • - {{end}} - {{else}} -
    • - - -

      View case study

      -
      -
    • - {{end}} - {{end}} -
    -
    -
    -
    -
    -
    -
    -
      - {{ range $index, $element := data.testimonials.all }} -
    • -
      -
      -

      {{.quote | safeHTML}}

      -
      — {{.name}}, - {{.title}} - at {{.company}} -
      -
      -
      -
    • - {{end}} -
    -
    - - -
    -
    -
    - -
    -
    -
    -

    What’s possible with Go

    -

    - Use Go for a variety of software development purposes -

    -
    -
      - {{ range first 4 data.resources.resources }} -
    • -
      - -
      -

      {{.title}}

      -

      - {{.description}} -

      -
      -
      -
      -
      -
      - Packages. - Popular Packages: -
      - -
      - -
      -
    • - {{end}} - {{ if (gt (data.resources.resources | len) 3) }} -
    • - -
    • - {{end}} -
    -
    -
    -
    - -
    -
    -
    -
    -

    Get started with Go

    -

    - Explore a wealth of learning resources, including guided journeys, courses, books, and more. -

    - -
    -
    - -
      -
    • - In-Person Trainings -
    • - {{range first 4 data.learn.inPerson.links }} -
    • - - {{.title}} - -
      - {{.blurb}} -
      -
    • - {{end}} -
    -
    -
    -
    diff --git a/go.dev/content/learn/_index.md b/go.dev/content/learn/_index.md deleted file mode 100644 index 2bbced12..00000000 --- a/go.dev/content/learn/_index.md +++ /dev/null @@ -1,293 +0,0 @@ ---- -title: "Getting Started" ---- - -
    -
    -
    -
    - {{breadcrumbs .}} -

    Install the latest version of Go

    -

    - Install the latest version of Go. For instructions to download and install - the Go compilers, tools, and libraries, - - view the install documentation. - -

    - -

    - Download packages for - Windows 64-bit, - macOS, - Linux, and - more. -

    -
    -
    - Go Gopher riding a motorcycle -
    -
    -
    -
      - {{ range first 3 data.learn.quickstart.links }} -
    • - {{template "learn-card" .}} -
    • - {{end}} -
    -
    -
    -
    - -
    -

    Learning Resources

    -
    - -
    -
    -
    -

    Guided learning journeys

    -
    -
    -
      - {{ range first 4 data.learn.guidedLearning.links }} -
    • - {{template "learn-card" .}} -
    • - {{ end }} -
    -
    -
    -
    - -
    -
    -
    -

    Online learning

    -
    -
    -
      - {{ range first 4 data.learn.courses.links }} -
    • - {{template "learn-card" .}} -
    • - {{ end }} -
    -
    -
    -
    - -
    -
    -
    -

    Google Cloud Self-Paced Labs

    -
    -
    -
      - {{ range first 4 data.learn.cloud.links }} -
    • - {{template "learn-self-paced-card" .}} -
    • - - {{ end }} -
    -
    -
    -
    - - - -
    -
    -
    -

    In-person training

    -
    -
    -
      - {{range first 4 data.learn.inPerson.links}} -
    • -

      - {{.title}} -

      -

      {{.blurb}}

      -
    • - {{end}} -
    -
    -
    -
    - -
    -
    -
    -

    Meetups

    -

    - View more events > -

    -
    -
      - {{range first 3 data.events.all}} -
    • -
      - {{if .photourl}} - {{.name}} group photo - {{else}} - meetup logo - {{end}} -
      -
      -
      -

      {{.local_date}} · {{.city}}, {{.state}} {{.country}}

      -
      -
      -

      - {{.name}} -

      -

      {{.description | safeHTML}}

      -
      -
      - {{ with .attendees }} - {{range first 5 .}} -
      - {{.name}} -
      - {{end}} - {{end}} -
      -
      -
    • - {{end}} -
    -
    -
    - -{{define "learn-card"}} -
    -
    - {{if .thumbnail}} -
    - {{end}} -
    -
    {{.title}}
    -

    {{.content | safeHTML}}

    - -
    -
    -
    -{{end}} - -{{define "learn-self-paced-card"}} - -{{end}} - -{{define "learn-book"}} - -{{end}} diff --git a/go.dev/content/solutions/_index.md b/go.dev/content/solutions/_index.md deleted file mode 100644 index 7e89116c..00000000 --- a/go.dev/content/solutions/_index.md +++ /dev/null @@ -1,180 +0,0 @@ ---- -title: Why Go ---- - -
    - -
    -
    -
    -
    - - -
    -
    - - - -
    -
    diff --git a/go.dev/content/solutions/americanexpress/amex-logo.png b/go.dev/content/solutions/americanexpress/amex-logo.png deleted file mode 100644 index 298ccf6e..00000000 Binary files a/go.dev/content/solutions/americanexpress/amex-logo.png and /dev/null differ diff --git a/go.dev/content/solutions/americanexpress/index.md b/go.dev/content/solutions/americanexpress/index.md deleted file mode 100644 index b1141508..00000000 --- a/go.dev/content/solutions/americanexpress/index.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "American Express Uses Go for Payments & Rewards" -layout: solution -company: American Express -logoSrc: american-express.svg -heroImgSrc: go_amex_case_study_logo.png -carouselImgSrc: go_amex_case_study.png -date: 2019-12-19 -series: Case Studies -quote: Go provides American Express with the speed and scalability it needs for both its payment and rewards networks. ---- - -{{pullquote ` - author: Glen Balliet - title: Engineering Director of loyalty platforms - company: American Express - quote: | - What makes Go different from other programming languages is cognitive load. You can do more with less code, which makes it easier to reason about and understand the code that you do end up writing. - - The majority of Go code ends up looking quite similar, so, even if you’re working with a completely new codebase, you can get up and running pretty quickly. -`}} - -## Go Improves Microservices and Speeds Productivity - -Founded in 1850, American Express is a globally integrated payments company offering charge and credit card products, merchant acquisition and processing services, network services, and travel-related services. - -American Express’ payment processing systems have been developed over its long history and have been updated across multiple architectural evolutions. Foremost in any update, payment processing needs to be fast, especially at very large transaction volumes, with resilience built across systems that must all be compliant with security and regulatory standards. With Go, American Express gains the speed and scalability it needs for both its payment and rewards networks. - -### Modernizing American Express systems - -American Express understands that the programming language landscape is changing drastically. The company's existing systems were purpose-built for high concurrency and low latency, but knowing that those systems would be re-platformed in the near future. The payments platform team decided to take the time to identify what languages were ideal for American Express' evolving needs. - -The payments and rewards platform teams at American Express were among the first to start evaluating Go. These teams were focused on microservices, transaction routing, and load-balancing use cases, and they needed to modernize their architecture. Many American Express developers were familiar with the language’s capabilities and wanted to pilot Go for their high concurrency and low latency applications (such as custom transactional load balancers). With this goal in mind, the teams began lobbying senior leadership to deploy Go on the American Express payment platform. - -"We wanted to find the optimal language for writing fast and efficient applications for payment processing," says Benjamin Cane, vice president and principal engineer at American Express. "To do so, we started an internal programming language showdown with the goal of seeing which language best fit our design and performance needs." - -### Comparing languages - -For their assessment, Cane's team chose to build a microservice in four different programming languages. They then compared the four languages for speed/performance, tooling, testing, and ease of development. - -For the service, they decided on an ISO8583 to JSON converter. ISO8583 is an international standard for financial transactions, and it’s commonly used within American Express' payment network. For the programming languages, they chose to compare C++, Go, Java and Node.js. With the exception of Go, all of these languages were already in use within American Express. - -From a speed perspective, Go achieved the second-best performance at 140,000 requests per second. Go showed that it excels when used for backend microservices. - -While Go may not have been the fastest language tested, its powerful tooling helped bolster its overall results. Go's built-in testing framework, profiling capabilities, and benchmarking tools impressed the team. "It is easy to write effective tests in Go," says Cane. "The benchmarking and profiling features make it simple to tune our application. Coupled with its fast build times, Go makes it easy to write well-tested and optimized code." - -Ultimately, Go was selected by the team as the preferred language for building high-performance microservices. The tooling, testing frameworks, performance, and language simplicity were all key contributors. - -### Go for infrastructure - -"Many of our services are running in Docker containers within our Kubernetes-based internal cloud platform" says Cane. Kubernetes is an open-source container-orchestration system written in Go. It provides clusters of hosts to run container based workloads, most notably Docker containers. Docker is a software product, also written in Go, that uses operating system level virtualization to provide portable software runtimes called containers. - -American Express also collects application metrics via Prometheus, an open-source monitoring and alerting toolkit written in Go. Prometheus collects and aggregates real-time events and metrics for monitoring and alerts. - -This triumvirate of Go solutions—Kubernetes, Docker, and Prometheus—has helped modernize American Express infrastructure. - -### Improving performance with Go - -Today, scores of developers are programming with Go at American Express, with most working on platforms designed for high availability and performance. - -"Tooling has always been a critical area of need for our legacy code base," says Cane. "We have found that Go has excellent tooling, plus built-in testing, benchmarking, and profiling frameworks. It is easy to write efficient and resilient applications." - -{{backgroundquote ` - author: Benjamin Cane - title: Vice President and Principal Engineer - company: American Express - quote: | - After working on Go, most of our developers don't want to go back to other languages. -`}} - -American Express is just beginning to see the benefits of Go. For example, Go was designed from the ground up with concurrency in mind – using lightweight “goroutines” rather than heavier-weight operating system threads – making it practical to create hundreds of thousands of goroutines in the same address space. Using goroutines, American Express has seen improved performance numbers in its real-time transaction processing. - -Go’s garbage collection is also a major improvement over other languages, both in terms of performance and ease of development. “We saw far better results of garbage collection in Go than we did in other languages, and garbage collection for real time transaction processing is a big deal.” says Cane. “Tuning garbage collection in other languages can be very complicated. With Go you don’t tune anything.” - -To learn more, read ["Choosing Go at American Express"](https://americanexpress.io/choosing-go/) which goes into more depth about American Express' Go adoption. - -### Getting your enterprise started with Go - -Just as American Express is using Go to modernize its payment and rewards networks, dozens of other large enterprises are adopting Go as well. - -There are over one million developers using Go worldwide—spanning banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as [PayPal](https://go.dev/solutions/paypal), [Mercado Libre](https://go.dev/solutions/mercadolibre), Capital One, Dropbox, IBM, Mercado Libre, Monzo, New York Times, Salesforce, Square, Target, Twitch, Uber, and of course Google. - -To learn more about how Go can help your enterprise build reliable, scalable software as it does at American Express, visit [go.dev](https://go.dev) today. diff --git a/go.dev/content/solutions/armut/index.md b/go.dev/content/solutions/armut/index.md deleted file mode 100644 index 08d3a58e..00000000 --- a/go.dev/content/solutions/armut/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -linkTitle: "How Armut Labs use Go " -description: "Learn about how Armut Labs reduced resource consumption and API response time after moving from C# and .net core to Go." -layout: solution -company: Armut -logoSrc: armut.png -series: Case Studies -link: https://labs.armut.com/how-we-decreased-one-of-our-apis-response-time-by-87-and-used-less-resources-ce847e83308 -inLandingPageGrid: false ---- diff --git a/go.dev/content/solutions/capital-one/index.md b/go.dev/content/solutions/capital-one/index.md deleted file mode 100644 index 2f0e7af4..00000000 --- a/go.dev/content/solutions/capital-one/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -linkTitle: "Capital One - A Serverless and Go Journey" -description: "At the time, no single team member knew Go, but within a month, everyone was writing in Go and we were building out the endpoints. It was the flexibility, how easy it was to use, and the really cool concept behind Go (how Go handles native concurrency, garbage collection, and of course safety+speed.) that helped engage us during the build. Also, who can beat that cute mascot!" -layout: solution -company: Capital One -logoSrc: capital-one.svg -series: Case Studies -link: https://medium.com/capital-one-tech/a-serverless-and-go-journey-credit-offers-api-74ef1f9fde7f -inLandingPageGrid: true ---- diff --git a/go.dev/content/solutions/capital-one/logo.svg b/go.dev/content/solutions/capital-one/logo.svg deleted file mode 100644 index 5c3fdda2..00000000 --- a/go.dev/content/solutions/capital-one/logo.svg +++ /dev/null @@ -1,2 +0,0 @@ - -image/svg+xml diff --git a/go.dev/content/solutions/clis/CLI-green.svg b/go.dev/content/solutions/clis/CLI-green.svg deleted file mode 100644 index 01fed5b7..00000000 --- a/go.dev/content/solutions/clis/CLI-green.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/content/solutions/clis/cli-white.svg b/go.dev/content/solutions/clis/cli-white.svg deleted file mode 100644 index a08127d7..00000000 --- a/go.dev/content/solutions/clis/cli-white.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/content/solutions/clis/index.md b/go.dev/content/solutions/clis/index.md deleted file mode 100644 index d1dba8a2..00000000 --- a/go.dev/content/solutions/clis/index.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -title: "Command-line Interfaces (CLIs)" -linkTitle: "Command-line Interfaces (CLIs)" -description: "With popular open source packages and a robust standard library, use Go to create fast and elegant CLIs." -date: 2019-10-04T15:26:31-04:00 -layout: solution -series: Use Cases -resources: -- name: icon - src: CLI-green.svg - params: - alt: CLI icon -- name: icon-white - src: cli-white.svg - params: - alt: CLI icon ---- - -## Overview {#overview .sectionHeading} - -### CLI developers prefer Go for portability, performance, and ease of creation - -Command line interfaces (CLIs), unlike graphical user interfaces (GUIs), are text-only. Cloud and infrastructure applications are primarily CLI-based due to their easy automation and remote capabilities. - -## Key benefits {#key-benefits .sectionHeading} - -### Leverage fast compile times to build programs that start quickly and run on any system - -Developers of CLIs find Go to be ideal for designing their applications. Go compiles very quickly into a single binary, works across platforms with a consistent style, and brings a strong development community. From a single Windows or Mac laptop, developers can build a Go program for every one of the dozens of architectures and operating systems Go supports in a matter of seconds, no complicated build farms are needed. No other compiled language can be built as portably or quickly. Go applications are built into a single self contained binary making installing Go applications trivial. - -Specifically, **programs written in Go run on any system without requiring any existing libraries, runtimes, or dependencies**. And **programs written in Go have an immediate startup time**—similar to C or C++ but unobtainable with other programming languages. - -## Use Case {#use-case .sectionHeading} - -### Use Go for building elegant CLIs - -{{backgroundquote ` - author: Steve Domino - title: senior engineer and architect at Strala - link: https://medium.com/@skdomino/writing-better-clis-one-snake-at-a-time-d22e50e60056 - quote: | - I was tasked with building our CLI tool and found two really great projects, Cobra and Viper, which make building CLI’s easy. Individually they are very powerful, very flexible and very good at what they do. But together they will help you show your next CLI who is boss! -`}} - -{{backgroundquote ` - author: Francesc Campoy - title: VP of product at DGraph Labs and producer of Just For Func videos - link: https://www.youtube.com/watch?v=WvWPGVKLvR4 - quote: | - Cobra is a great product to write small tools or even large ones. It’s more of a framework than a library, because when you call the binary that would create a skeleton, then you would be adding code in between.” -`}} - -When developing CLIs in Go, two tools are widely used: Cobra & Viper. - -{{pkg "github.com/spf13/cobra" "Cobra"}} is both a library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go. Cobra powers most of the popular Go applications including CoreOS, Delve, Docker, Dropbox, Git Lfs, Hugo, Kubernetes, and [many more](https://pkg.go.dev/github.com/spf13/cobra?tab=importedby). With integrated command help, autocomplete and documentation “[it] makes documenting each command really simple,” says [Alex Ellis](https://blog.alexellis.io/5-keys-to-a-killer-go-cli/), founder of OpenFaaS. - - -{{pkg "github.com/spf13/viper" "Viper"}} is a complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats. Cobra and Viper are designed to work together. - -Viper [supports nested structures](https://scene-si.org/2017/04/20/managing-configuration-with-viper/) in the configuration, allowing CLI developers to manage the configuration for multiple parts of a large application. Viper also provides all of the tooling need to easily build twelve factor apps. - -"If you don’t want to pollute your command line, or if you’re working with sensitive data which you don’t want to show up in the history, it’s a good idea to work with environment variables. To do this, you can use Viper," [suggests Geudens](https://ordina-jworks.github.io/development/2018/10/20/make-your-own-cli-with-golang-and-cobra.html). - -{{projects ` - - company: Comcast - url: https://xfinity.com/ - logoSrc: comcast.svg - desc: Comcast uses Go for a CLI client used to publish and subscribe to it’s high-traffic sites. The company also supports an open source client library which is written in Go - designed for working with Apache Pulsar. - ctas: - - text: Client library for Apache Pulsar - url: https://github.com/Comcast/pulsar-client-go - - text: Pulsar CLI Client - url: https://github.com/Comcast/pulsar-client-go/blob/master/cli/main.go - - company: GitHub - url: https://github.com/ - logoSrc: github.svg - desc: GitHub uses Go for a command-line tool that makes it easier to work with GitHub, wrapping git in order to extend it with extra features and commands. - ctas: - - text: GitHub command-line tool - url: https://github.com/github/hub - - company: Hugo - url: http://gohugo.io/ - logoSrc: hugo.svg - desc: Hugo is one of the most popular Go CLI applications powering thousands of sites, including this one. One reason for it’s popularity is it’s ease of install thanks to Go. Hugo author Bjørn Erik Pedersen writes “The single binary takes most of the pain out of installation and upgrades.” - ctas: - - text: Hugo Website - url: https://gohugo.io/ - - company: Kubernetes - url: https://kubernetes.com/ - logoSrc: kubernetes.svg - desc: Kubernetes is one of the most popular Go CLI applications. Kubernetes Creator, Joe Beda, said that for writing Kubernetes, “Go was the only logical choice”. Calling Go “the sweet spot” between low level languages like C++ and high level languages like Python. - ctas: - - text: Kubernetes + Go - url: https://blog.gopheracademy.com/birthday-bash-2014/kubernetes-go-crazy-delicious/ - - company: MongoDB - url: https://mongodb.com/ - logoSrc: mongodb.svg - desc: MongoDB chose to implement their Backup CLI Tool in Go citing Go’s “C-like syntax, strong standard library, the resolution of concurrency problems via goroutines, and painless multi-platform distribution” as reasons. - ctas: - - text: MongoDB Backup Service - url: https://www.mongodb.com/blog/post/go-agent-go - - company: Netflix - url: http://netflix.com/ - logoSrc: netflix.svg - desc: Netflix uses Go to build the CLI application ChaosMonkey, an application responsible for randomly terminating instances in production to ensure that engineers implement their services to be resilient to instance failures. - ctas: - - text: Netflix Techblog Article - url: https://medium.com/netflix-techblog/application-data-caching-using-ssds-5bf25df851ef - - company: Stripe - url: https://stripe.com/ - logoSrc: stripe.svg - desc: Stripe uses Go for the Stripe CLI aimed to help build, test, and manage a Stripe integration right from the terminal. - ctas: - - text: Stripe CLI - url: https://github.com/stripe/stripe-cli - - company: Uber - url: https://uber.com/ - logoSrc: uber.svg - desc: Uber uses Go for several CLI tools, including the CLI API for Jaeger, a distributed tracing system used for monitoring microservice distributed systems. - ctas: - - text: CLI API for Jaeger - url: https://www.jaegertracing.io/docs/1.14/cli/ -`}} - -## Get Started {#get-started .sectionHeading} - -### Go books for creating CLIs - -{{books ` - - title: Powerful Command-Line Applications in Go - url: https://www.amazon.com/Powerful-Command-Line-Applications-Go-Maintainable/dp/168050696X - thumbnail: /images/books/powerful-command-line-applications-in-go.jpg - - title: Go in Action - url: https://www.amazon.com/Go-Action-William-Kennedy/dp/1617291781 - thumbnail: /images/books/go-in-action.jpg - - title: The Go Programming Language - url: https://www.gopl.io/ - thumbnail: /images/learn/go-programming-language-book.png - - title: Go Programming Blueprints - url: https://github.com/matryer/goblueprints - thumbnail: /images/learn/go-programming-blueprints.png -`}} - -{{libraries ` - - title: CLI Libraries - viewMoreUrl: https://pkg.go.dev/search?q=command%20line%20OR%20CLI - items: - - text: spf13/cobra - url: https://pkg.go.dev/github.com/spf13/cobra?tab=overview - desc: A library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go - - text: spf13/viper - url: https://pkg.go.dev/github.com/spf13/viper?tab=overview - desc: A complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats - - text: urfave/cli - url: https://pkg.go.dev/github.com/urfave/cli?tab=overview - desc: A minimal framework for creating and organizing command line Go applications - - text: delve - url: https://pkg.go.dev/github.com/go-delve/delve?tab=overview - desc: A simple and powerful tool built for programmers used to using a source-level debugger in a compiled language - - text: chzyer/readline - url: https://pkg.go.dev/github.com/chzyer/readline?tab=overview - desc: A pure Golang implementation that provides most features in GNU Readline (under MIT license) - - text: dixonwille/wmenu - url: https://pkg.go.dev/github.com/dixonwille/wmenu?tab=overview - desc: An easy-to-use menu structure for CLI applications that prompts users to make choices - - text: spf13/pflag - url: https://pkg.go.dev/github.com/spf13/pflag?tab=overview - desc: A drop-in replacement for Go’s flag package, implementing POSIX/GNU-style flags - - text: golang/glog - url: https://pkg.go.dev/github.com/golang/glog?tab=overview - desc: Leveled execution logs for Go - - text: go-prompt - url: https://pkg.go.dev/github.com/c-bata/go-prompt?tab=overview - desc: A library for building powerful interactive prompts, making it easier to build cross-platform command line tools using Go. -`}} diff --git a/go.dev/content/solutions/cloud/cloud-green.svg b/go.dev/content/solutions/cloud/cloud-green.svg deleted file mode 100644 index b143a1db..00000000 --- a/go.dev/content/solutions/cloud/cloud-green.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/go.dev/content/solutions/cloud/cloud-white.svg b/go.dev/content/solutions/cloud/cloud-white.svg deleted file mode 100644 index 6dfc4f27..00000000 --- a/go.dev/content/solutions/cloud/cloud-white.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/content/solutions/cloud/index.md b/go.dev/content/solutions/cloud/index.md deleted file mode 100644 index 67c821a6..00000000 --- a/go.dev/content/solutions/cloud/index.md +++ /dev/null @@ -1,230 +0,0 @@ ---- -title: "Go for Cloud & Network Services" -linkTitle: "Cloud & Network Services" -description: "With a strong ecosystem of tools and APIs on major cloud providers, it is easier than ever to build services with Go." -date: 2019-10-04T15:26:31-04:00 -layout: solution -series: Use Cases -resources: - - name: icon - src: cloud-green.svg - params: - alt: cloud icon - - name: icon-white - src: cloud-white.svg - params: - alt: cloud icon ---- - -## Overview {#overview .sectionHeading} - -
    -

    Go helps enterprises build and scale cloud computing systems

    -

    As applications and processing move to the cloud, concurrency becomes a very big issue. Cloud computing systems, by their very nature, share and scale resources. Coordinating access to shared resources is an issue that impacts every application processing in the cloud, and requires programming languages “explicitly geared to develop highly reliable concurrent applications.”

    -
    - -{{quote ` - author: Ruchi Malik - title: developer at Choozle - link: https://builtin.com/software-engineering-perspectives/golang-advantages - quote: | - Go makes it very easy to scale as a company. This is very important because, as our engineering team grows, each service can be managed by a different unit. -`}} - -## Key Benefits {#key-benefits .sectionHeading} - -### Address tradeoff between development cycle time and server performance - -Go was created to address exactly these concurrency needs for scaled applications, microservices, and cloud development. In fact, over 75 percent of projects in the Cloud Native Computing Foundation are written in Go. - -Go helps reduce the need to make this tradeoff, with its fast build times that enable iterative development, lower memory and CPU utilization. Servers built with Go experience instant start up times and are cheaper to run in pay-as-you-go and serverless deployments. - -### Address challenges with the modern cloud, delivering standard idiomatic APIs - -Go addresses many challenges developers face with the modern cloud, delivering standard idiomatic APIs, and built in concurrency to take advantage of multicore processors. Go’s low-latency and “no knob” tuning make Go a great balance between performance and productivity - granting engineering teams the power to choose and the power to move. - -## Use Case {#use-case .sectionHeading} - -### Use Go for Cloud Computing - -Go's strengths shine when it comes to building services. Its speed and built-in support for concurrency results in fast and efficient services, while static typing, robust tooling, and emphasis on simplicity and readability help build reliable and maintainable code. - -Go has a strong ecosystem supporting service development. The [standard library](https://golang.org/pkg/) includes packages for common needs like HTTP servers and clients, JSON/XML parsing, SQL databases, and a range of security/encryption functionality, while the Go runtime includes tools for [race detection](https://golang.org/doc/articles/race_detector.html), [benchmarking](https://golang.org/pkg/testing/#hdr-Benchmarks)/profiling, code generation, and static code analysis. - -The major Cloud providers ([GCP](https://cloud.google.com/go/home), [AWS](https://aws.amazon.com/sdk-for-go/), [Azure](https://docs.microsoft.com/en-us/azure/go/)) have Go APIs for their services, and popular open source libraries provide support for API tooling ([Swagger](https://github.com/go-swagger/go-swagger)), transport ([protocol buffers](https://github.com/golang/protobuf), [gRPC](https://grpc.io/docs/quickstart/go/)), monitoring ([OpenCensus](https://godoc.org/go.opencensus.io)), Object-Relational Mapping ([gORM](https://gorm.io/)), and authentication ([JWT](https://github.com/dgrijalva/jwt-go)). The open source community has also provided several service frameworks, including [Go Kit](https://gokit.io/[), [Go Micro](https://micro.mu/docs/go-micro.html), and [Gizmo](https://github.com/nytimes/gizmo), which can be a great way to get started quickly. - -### Go tools for Cloud Computing - -{{toolsblurbs ` - - title: Docker - url: https://www.docker.com/ - iconSrc: /images/logos/docker.svg - paragraphs: - - Docker is a platform-as-a-service that delivers software in containers. Containers bundle software, libraries, and config files, are hosted by a Docker Engine, and are run by a single operating-system kernel (utilizing less system resources than virtual machines). - - Cloud developers use Docker to manage their Go code and support multiple platforms, as Docker supports the development workflow and deployment process. - - title: Kubernetes - url: https://kubernetes.io/ - iconSrc: /images/logos/kubernetes.svg - paragraphs: - - Kubernetes is an open-source container-orchestration system, written in Go, for automating web app deployment. Web apps are often built using containers (as noted above) packaged with their dependencies and configurations. Kubernetes helps deploying and managing those containers at scale. Cloud programmers use Kubernetes to build, deliver, and scale containerized apps quickly—managing the growing complexity via APIs that controls how the containers will run. -`}} - -{{projects ` - - company: Google - url: http://cloud.google.com/go - logoSrc: google-cloud.svg - desc: Google Cloud uses Go across its ecosystem of products and tools, including Kubernetes, gVisor, Knative, Istio, and Anthos. Go is fully supported on Google Cloud across all APIs and runtimes. - ctas: - - text: Go on Google Cloud Platform - url: http://cloud.google.com/go - - company: Capital One - url: https://www.capitalone.com/ - logoSrc: capital-one.svg - desc: Capital One uses Go to power the Credit Offers API, a critical service. The engineering team is also building their serverless architecture with Go, citing Go’s speed and simplicity, and mentioning that “[they] didn’t want to go serverless without Go.” - ctas: - - text: Credit Offers API - url: https://medium.com/capital-one-tech/a-serverless-and-go-journey-credit-offers-api-74ef1f9fde7f - - company: Dropbox - url: https://www.dropbox.com/ - logoSrc: dropbox.svg - desc: Dropbox was built on Python, but in 2013 decided to migrate their performance-critical packends to Go. Today, most of the company’s infrastructure is written in Go. - ctas: - - text: Dropbox libraries - url: https://blogs.dropbox.com/tech/2014/07/open-sourcing-our-go-libraries/ - - company: Mercado Libre - url: https://www.mercadolibre.com.ar/ - logoSrc: mercadoLibre.svg - desc: MercadoLibre uses Go to scale its eCommerce platform. Go produces efficient code that readily scales as MercadoLibre’s online commerce grows. Go improves their productivity while streamlining and expanding MercadoLibre services. - ctas: - - text: MercadoLibre & Go - url: http://go.dev/solutions/mercadolibre - - company: The New York Times - url: https://www.nytimes.com/ - logoSrc: the-new-york-times-icon.svg - desc: The New York Times adopted Go “to build better back-end services”. As the usage of Go expanded with in the company they felt the need to create a toolkit to “to help developers quickly configure and build microservice APIs and pubsub daemons”, which they have open sourced. - ctas: - - text: NYTimes - Gizmo - url: https://open.nytimes.com/introducing-gizmo-aa7ea463b208 - - text: Gizmo Github - url: https://github.com/nytimes/gizmo - - company: Twitch - url: https://www.twitch.tv/ - logoSrc: twitch.svg - desc: Twitch uses Go to power many of its busiest systems that serve live video and chat to millions of users. - ctas: - - text: Go’s march to low-latency GC - url: https://blog.twitch.tv/en/2016/07/05/gos-march-to-low-latency-gc-a6fa96f06eb7/ - - company: Uber - url: https://www.uber.com/ - logoSrc: uber.svg - desc: Uber uses Go to power several of its critical services that impact the experience of millions of drivers and passengers around the world. From their real-time analytics engine, AresDB, to their microservice for Geo-querying, Geofence, and their resource scheduler, Peloton. - ctas: - - text: AresDB - url: https://eng.uber.com/aresdb/ - - text: Geofence - url: https://eng.uber.com/go-geofence/ - - text: Peloton - url: https://eng.uber.com/open-sourcing-peloton/ -`}} - -## Get Started {#get-started .sectionHeading} - -### Go books for cloud computing - -{{books ` - - title: Building Microservices with Go - url: https://www.amazon.com/Building-Microservices-Go-efficient-microservices/dp/1786468662/ - thumbnail: /images/books/building-microservices-with-go.jpg - - title: Hands-On Software Architecture with Golang - url: https://www.amazon.com/dp/1788622596/ref=cm_sw_r_tw_dp_U_x_-aZWDbS8PD7R4 - thumbnail: /images/books/hands-on-software-architecture-with-golang.jpg - - title: Building RESTful Web services with Go - url: https://www.amazon.com/Building-RESTful-Web-services-gracefully-ebook/dp/B072QB8KL1 - thumbnail: /images/books/building-restful-web-services-with-go.jpg - - title: Mastering Go Web Services - url: https://www.amazon.com/Mastering-Web-Services-Nathan-Kozyra-ebook/dp/B00W5GUKL6 - thumbnail: /images/books/mastering-go-web-services.jpg -`}} - -{{libraries ` - - title: Web frameworks - viewMoreUrl: https://pkg.go.dev/search?q=web+framework - items: - - text: Buffalo - url: https://gobuffalo.io/en/ - desc: A framework for rapid web development in Go, curating Go and JS libraries together. - - text: Echo - url: https://echo.labstack.com/ - desc: A high performance, extensible, and minimalist Go web framework - - text: Flamingo - url: https://www.flamingo.me/ - desc: A fast open-source framework based on Go with clean and scalable architecture - - text: Gin - url: https://gin-gonic.com/ - desc: A web framework written in Go, with a martini-like API. - - text: Gorilla - url: http://www.gorillatoolkit.org/ - desc: A web toolkit for the Go programming language. - - title: Routers - viewMoreUrl: https://pkg.go.dev/search?q=http%20router - items: - - text: julienschmidt/httprouter - url: https://pkg.go.dev/github.com/julienschmidt/httprouter?tab=overview - desc: A lightweight high performance HTTP request router - - text: gorilla/mux - url: https://pkg.go.dev/github.com/gorilla/mux?tab=overview - desc: A powerful HTTP router and URL matcher for building Go web servers with 🦍 - - text: Chi - url: https://pkg.go.dev/github.com/go-chi/chi?tab=overview - desc: A lightweight, idiomatic and composable router for building Go HTTP services. - - text: net/http - url: https://pkg.go.dev/net/http - desc: A standard library HTTP package - - title: Template Engines - viewMoreUrl: https://pkg.go.dev/search?q=templates - items: - - text: html/template - url: https://pkg.go.dev/html/template - desc: A standard library HTML template engine - - text: flosch/pongo2 - url: https://pkg.go.dev/github.com/flosch/pongo2?tab=overview - desc: A Django-syntax like templating-language - - title: Databases & Drivers - viewMoreUrl: https://pkg.go.dev/search?q=database%20OR%20sql - items: - - text: database/sql - url: https://pkg.go.dev/database/sql - desc: A standard library interface with driver support for MySQL, Postgres, Oracle, MS SQL, BigQuery and most SQL databases - - text: mongo-driver/mongo - url: https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo?tab=overview - desc: The MongoDB supported driver for Go - - text: olivere/elastic - url: https://pkg.go.dev/github.com/olivere/elastic?tab=overview - desc: A Elasticsearch client for Go - - text: GORM - url: https://gorm.io/ - desc: An ORM library for Go - - text: Bleve - url: http://blevesearch.com/ - desc: Full-text search and indexing for Go - - text: CockroachDB - url: https://www.cockroachlabs.com/ - desc: An evolution of the database—architected for the cloud to deliver resilient, consistent, distributed SQL at scale - - title: Web Libraries - viewMoreUrl: https://pkg.go.dev/search?q=web - items: - - text: markbates/goth - url: https://pkg.go.dev/github.com/markbates/goth?tab=overview - desc: Authentication for web apps - - text: jinzhu/gorm - url: https://pkg.go.dev/github.com/jinzhu/gorm?tab=overview - desc: An ORM library for Go - - text: dgrijalva/jwt-go - url: https://pkg.go.dev/github.com/dgrijalva/jwt-go?tab=overview - desc: A Go implementation of json web tokens - - title: Other Projects - items: - - text: gopherjs - url: https://pkg.go.dev/github.com/gopherjs/gopherjs?tab=overview - desc: A compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers. -`}} diff --git a/go.dev/content/solutions/cloudflare/index.md b/go.dev/content/solutions/cloudflare/index.md deleted file mode 100644 index a754ca10..00000000 --- a/go.dev/content/solutions/cloudflare/index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -linkTitle: Graceful upgrades in Go -description: Cloudflare speeds up and protects millions of websites, APIs, SaaS services, - and other properties connected to the Internet. “Go is at the heart of CloudFlare’s - services including handling compression for high-latency HTTP connections, our - entire DNS infrastructure, SSL, load testing and more.” -layout: solution -company: Cloudflare -series: Case Studies -logoSrc: cloudflare.svg -link: https://blog.cloudflare.com/graceful-upgrades-in-go/ -inLandingPageGrid: true ---- diff --git a/go.dev/content/solutions/cloudflare/logo.png b/go.dev/content/solutions/cloudflare/logo.png deleted file mode 100644 index 90388fca..00000000 Binary files a/go.dev/content/solutions/cloudflare/logo.png and /dev/null differ diff --git a/go.dev/content/solutions/cockroachlabs/index.md b/go.dev/content/solutions/cockroachlabs/index.md deleted file mode 100644 index 884e4a94..00000000 --- a/go.dev/content/solutions/cockroachlabs/index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -linkTitle: Cockroach Labs - Why We Chose to Build Our Database with Go -description: Go's performance benefits, garbage collection, and low barrier to entry - made it a great fit for CockroachDB. -layout: solution -company: Cockroach Labs -logoSrc: cockroach.svg -series: Case Studies -link: - https://www.cockroachlabs.com/blog/why-go-was-the-right-choice-for-cockroachdb/ -inLandingPageGrid: true ---- diff --git a/go.dev/content/solutions/cockroachlabs/logo.png b/go.dev/content/solutions/cockroachlabs/logo.png deleted file mode 100644 index 98ec96aa..00000000 Binary files a/go.dev/content/solutions/cockroachlabs/logo.png and /dev/null differ diff --git a/go.dev/content/solutions/curve/index.md b/go.dev/content/solutions/curve/index.md deleted file mode 100644 index d52ca14b..00000000 --- a/go.dev/content/solutions/curve/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -linkTitle: How Curve is getting ahead with Golang -description: Curve shares how Go's efficiency, standard library, and thriving community - help them move banking to the cloud. -layout: solution -company: Curve -logoSrc: curve.png -series: Case Studies -link: https://jaxenter.com/golang-curve-163187.html ---- diff --git a/go.dev/content/solutions/curve/logo.png b/go.dev/content/solutions/curve/logo.png deleted file mode 100644 index 194f220d..00000000 Binary files a/go.dev/content/solutions/curve/logo.png and /dev/null differ diff --git a/go.dev/content/solutions/devops/index.md b/go.dev/content/solutions/devops/index.md deleted file mode 100644 index 42cc2d90..00000000 --- a/go.dev/content/solutions/devops/index.md +++ /dev/null @@ -1,172 +0,0 @@ ---- -title: "Development Operations & Site reliability Engineering" -linkTitle: "Development Operations & Site reliability Engineering" -description: "With fast build times, lean syntax, an automatic formatter and doc generator, Go is built to support both DevOps and SRE." -date: 2019-10-03T17:16:43-04:00 -layout: solution -series: Use Cases -books: -resources: -- name: icon - src: ops-green.svg - params: - alt: ops icon -- name: icon-white - src: ops-white.svg - params: - alt: ops icon ---- - -## Overview {#overview .sectionHeading} - -### Go helps enterprises automate and scale - -Development Operations (DevOps) teams help engineering organizations automate tasks and improve their continuous -integration and continuous delivery and deployment (CI/CD) process. DevOps can topple developmental silos and implement -tooling and automation to enhance software development, deployment, and support. - -Site Reliability Engineering (SRE) was born at Google to make the company’s “large-scale sites more reliable, efficient, -and scalable,”[ writes Silvia Fressard](https://opensource.com/article/18/10/what-site-reliability-engineer), an -independent DevOps consultant. “And the practices they developed responded so well to Google’s needs that other big tech -companies, such as Amazon and Netflix, also adopted them.” SRE requires a mix of development and operations skills, and -“[empowers software developers](https://stackify.com/site-reliability-engineering/) to own the ongoing daily operation -of their applications in production.” - -Go serves both siblings, DevOps and SRE, from its fast build times and lean syntax to its security and reliability support. Go's concurrency and networking features also make it ideal for tools that manage cloud deployment—readily supporting automation while -scaling for speed and code maintainability as development infrastructure grows over time. - -DevOps/SRE teams write software ranging from small scripts, to command-line interfaces (CLI), to complex automation and services, and Go’s feature set has benefits for every situation. - -## Key Benefits {#key-benefits .sectionHeading} - -### Easily build small scripts with Go’s robust standard library and static typing -Go’s fast build and startup times. Go’s extensive standard library—including packages for -common needs like HTTP, file I/O, time, regular expressions, exec, and JSON/CSV formats—lets DevOps/SREs get right into their business logic. Plus, Go’s static type system and explicit error handling make even small scripts more robust. - -### Quickly deploy CLIs with Go’s fast build times -Every site reliability engineer has written “one-time use” scripts that turned into CLIs used by dozens of other engineers every day. And small deployment automation scripts turn into rollout management services. With Go, DevOps/SREs are in a great position to be successful when software scope inevitably creeps. Starting with Go puts you in a great position to be successful when that happens. - -### Scale and maintain larger applications with Go’s low memory footprint and doc generator -Go’s garbage collector means DevOps/SRE teams don’t have to worry about memory management. And Go’s automatic documentation generator (godoc) makes code self-documenting–lowering maintenance overhead and establishing best practices from the get-go. - -{{projects ` - - company: Docker - url: https://docker.com/ - logoSrc: docker.svg - desc: Docker is a software-as-a-service (SaaS) product, written in Go, that DevOps/SRE teams leverage to “drive secure automation and deployment at massive scale,” supporting their CI/CD efforts. - ctas: - - text: Docker CI/CD - url: https://www.docker.com/solutions/cicd - - company: Drone - url: https://github.com/drone - logoSrc: drone.svg - desc: Drone is a Continuous Delivery system built on container technology, written in Go, that uses a simple YAML configuration file, a superset of docker-compose, to define and execute Pipelines inside Docker containers. - ctas: - - text: Drone - url: https://github.com/drone - - company: etcd - url: https://github.com/etcd-io/etcd - logoSrc: etcd.svg - desc: etcd is a strongly consistent, distributed key-value store that provides a reliable way to store data that needs to be accessed by a distributed system or cluster of machines, and it's written in Go. - ctas: - - text: etcd - url: https://github.com/etcd-io/etcd - - company: IBM - url: https://ibm.com/ - logoSrc: ibm.svg - desc: IBM’s DevOps teams use Go through Docker and Kubernetes, plus other DevOps and CI/CD tools written in Go. The company also supports connection to it’s messaging middleware through a Go-specific API. - ctas: - - text: IBM Applications in Golang - url: https://developer.ibm.com/messaging/2019/02/05/simplified-ibm-mq-applications-golang/ - - company: Netflix - url: http://netflix.com/ - logoSrc: netflix.svg - desc: Netflix uses Go to handle large scale data caching, with a service called Rend, which manages globally replicated storage for personalization data. - ctas: - - text: Application Data Caching - url: https://medium.com/netflix-techblog/application-data-caching-using-ssds-5bf25df851ef - - text: Rend - url: https://github.com/netflix/rend - - company: Microsoft - url: https://microsoft.com/ - logoSrc: microsoft.svg - desc: Microsoft uses Go in Azure Red Hat OpenShift services. This Microsoft solution provides DevOps teams with OpenShift clusters to maintain regulatory compliance and focus on application development. - ctas: - - text: OpenShift - url: https://azure.microsoft.com/en-us/services/openshift/ - - company: Terraform - url: https://terraform.io/ - logoSrc: terraform-icon.svg - desc: Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. It supports a number of cloud providers such as AWS, IBM Cloud, GCP, and Microsoft Azure - and it’s written in Go. - ctas: - - text: Terraform - url: https://www.terraform.io/intro/index.html - - company: Prometheus - url: https://github.com/prometheus/prometheus - logoSrc: prometheus.svg - desc: Prometheus is an open-source systems monitoring and alerting toolkit originally built at SoundCloud. Most Prometheus components are written in Go, making them easy to build and deploy as static binaries. - ctas: - - text: Prometheus - url: https://github.com/prometheus/prometheus - - company: YouTube - url: https://youtube.com/ - logoSrc: youtube.svg - desc: YouTube uses Go with Vitess (now part of PlanetScale), its database clustering system for horizontal scaling of MySQL through generalized sharding. Since 2011 it’s been a core component of YouTube’s database infrastructure, and has grown to encompass tens of thousands of MySQL nodes. - ctas: - - text: Vitess - url: https://github.com/vitessio/vitess -`}} - -## Get Started {#get-started .sectionHeading} - -### Go books on DevOps & SRE - -{{books ` - - title: Go Programming for Network Operations - url: https://www.amazon.com/Go-Programming-Network-Operations-Automation-ebook/dp/B07JKKN34L/ref=sr_1_16 - thumbnail: /images/books/go-programming-for-network-operations.jpg - - title: Go Programming Blueprints - url: https://github.com/matryer/goblueprints - thumbnail: /images/learn/go-programming-blueprints.png - - title: Go in Action - url: https://www.amazon.com/Go-Action-William-Kennedy/dp/1617291781 - thumbnail: /images/books/go-in-action.jpg - - title: The Go Programming Language - url: https://www.gopl.io/ - thumbnail: /images/learn/go-programming-language-book.png -`}} - -{{libraries ` - - title: Monitoring and tracing - viewMoreUrl: https://pkg.go.dev/search?q=tracing - items: - - text: opentracing/opentracing-go - url: https://pkg.go.dev/github.com/opentracing/opentracing-go?tab=overview - desc: Vendor-neutral APIs and instrumentation for distributed tracing - - text: jaegertracing/jaeger-client-go - url: https://pkg.go.dev/github.com/jaegertracing/jaeger-client-go?tab=overview - desc: An open source distributed tracing system developed by Uber formats - - text: grafana/grafana - url: https://pkg.go.dev/github.com/grafana/grafana?tab=overview - desc: An open-source platform for monitoring and observability - - text: istio/istio - url: https://pkg.go.dev/github.com/istio/istio?tab=overview - desc: An open-source service mesh and integratable platform - - title: CLI Libraries - viewMoreUrl: https://pkg.go.dev/search?q=command%20line%20OR%20CLI - items: - - text: spf13/cobra - url: https://pkg.go.dev/github.com/spf13/cobra?tab=overview - desc: A library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go - - text: spf13/viper - url: https://pkg.go.dev/github.com/spf13/viper?tab=overview - desc: A complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats - - text: urfave/cli - url: https://pkg.go.dev/github.com/urfave/cli?tab=overview - desc: A minimal framework for creating and organizing command line Go applications - - title: Other projects - items: - - text: golang-migrate/migrate - url: https://pkg.go.dev/github.com/golang-migrate/migrate?tab=overview - desc: A database migration tool written in Go -`}} diff --git a/go.dev/content/solutions/devops/ops-green.svg b/go.dev/content/solutions/devops/ops-green.svg deleted file mode 100644 index d84348eb..00000000 --- a/go.dev/content/solutions/devops/ops-green.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/content/solutions/devops/ops-white.svg b/go.dev/content/solutions/devops/ops-white.svg deleted file mode 100644 index c98d8737..00000000 --- a/go.dev/content/solutions/devops/ops-white.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/content/solutions/dropbox/index.md b/go.dev/content/solutions/dropbox/index.md deleted file mode 100644 index 1503ff29..00000000 --- a/go.dev/content/solutions/dropbox/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "Dropbox - Open sourcing our Go libraries" -description: "About a year ago, we decided to migrate our performance-critical backends from Python to Go to leverage better concurrency support and faster execution speed. ... At this point, we have successfully moved major parts of our infrastructure to Go." -layout: solution -company: Dropbox -logoSrc: dropbox.png -series: Case Studies -link: https://blogs.dropbox.com/tech/2014/07/open-sourcing-our-go-libraries/ -inLandingPageGrid: true ---- diff --git a/go.dev/content/solutions/dropbox/logo.svg b/go.dev/content/solutions/dropbox/logo.svg deleted file mode 100644 index f129a229..00000000 --- a/go.dev/content/solutions/dropbox/logo.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/go.dev/content/solutions/facebook/index.md b/go.dev/content/solutions/facebook/index.md deleted file mode 100644 index 59eb3180..00000000 --- a/go.dev/content/solutions/facebook/index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -linkTitle: How Facebook built an entity framework in Go -description: - Learn about a Facebook engineering team's decision to write a new entity - framework (ORM) in Go. -layout: solution -company: Facebook -series: Case Studies -logoSrc: facebook.png -link: https://entgo.io/blog/2019/10/03/introducing-ent/ -inLandingPageGrid: true ---- diff --git a/go.dev/content/solutions/google/_index.md b/go.dev/content/solutions/google/_index.md deleted file mode 100644 index 33d3e4e2..00000000 --- a/go.dev/content/solutions/google/_index.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: 'Using Go at Google' -date: 2020-08-27 -layout: solution -company: Google -logoSrc: google.svg -heroImgSrc: go_core_data_case_study.png -carouselImgSrc: go_google_case_study_carousel.png -series: Case Studies -type: solutions -description: |- - Google is a technology company whose mission is to organize the world’s - information and make it universally accessible and useful. - - Go was created at Google in 2007 to improve programming productivity in an - era of multi-core networked machines and large codebases. Today, over 10 - years since its public announcement in 2009, Go's use inside Google has grown - tremendously. -quote: Go was created at Google in 2007, and since then, engineering teams - across Google have adopted Go to build products and services at massive scale. - ---- - -{{pullquote ` - author: Rob Pike - quote: | - Go started in September 2007 when Robert Griesemer, Ken Thompson, and I began - discussing a new language to address the engineering challenges we and our - colleagues at Google were facing in our daily work. - - When we first released Go to the public in November 2009, we didn’t know if the - language would be widely adopted or if it might influence future languages. - Looking back from 2020, Go has succeeded in both ways: it is widely used both - inside and outside Google, and its approaches to network concurrency and - software engineering have had a noticeable effect on other languages and their - tools. - - Go has turned out to have a much broader reach than we had ever expected. Its - growth in the industry has been phenomenal, and it has powered many projects at - Google. -`}} - -The following stories are a small sample of the many ways that Go is used at Google. - -### How Google's Core Data Solutions Team Uses Go - -Google's mission is “to organize the world's information and make it universally -accessible and useful.” One of the teams responsible for organizing that -information is Google’s Core Data Solutions team. The team, among other things, -maintains services to index web pages across the globe. These web indexing -services help support products like Google Search by keeping search results -updated and comprehensive, and they’re written in Go. - -[Learn more](/solutions/google/coredata/) - ---- - -### Chrome Content Optimization Service Runs on Go - -When the product Chrome comes to mind, you probably think solely of the user-installed browser. But behind the scenes, Chrome has an extensive fleet of backends. Among these is the Chrome Optimization Guide service. This service forms an important basis for Chrome’s user experience strategy, operating in the critical path for users, and is implemented in Go. - -[Learn more](/solutions/google/chrome/) - ---- - -### How the Firebase Hosting Team Scaled With Go - -The Firebase Hosting team provides static web hosting services for Google Cloud customers. They provide a static web host that sits behind a global content delivery network, and offer users tools that are easy to use. The team also develops features that range from uploading site files to registering domains to tracking usage. - -[Learn more](/solutions/google/firebase/) - ---- - -### Actuating Google Production: How Google’s Site Reliability Engineering Team Uses Go - -Google runs a small number of very large services. Those services are powered by a global infrastructure covering everything one needs: storage systems, load balancers, network, logging, monitoring, and many more. Nevertheless, it is not a static system - it cannot be. Architecture evolves, new products and ideas are created, new versions must be rolled out, configs pushed, database schema updated, and more. We end up deploying changes to our systems dozens of times per second. - -[Learn more](/solutions/google/sitereliability/) \ No newline at end of file diff --git a/go.dev/content/solutions/google/chrome.md b/go.dev/content/solutions/google/chrome.md deleted file mode 100644 index b0ee9d06..00000000 --- a/go.dev/content/solutions/google/chrome.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: "Chrome Content Optimization Service Runs on Go" -layout: solution -company: Chrome -logoSrc: chrome.svg -heroImgSrc: go_chrome_case_study.png -series: Case Studies -quote: | - Google Chrome is a more simple, secure, and faster web browser than ever, - with Google's smarts built-in. - - In this case study, the Chrome Optimization Guide - team shared how they experimented with Go, ramped up quickly, and their plans to - use Go going forward. -aliases: - - /solutions/chrome ---- - -When the product Chrome comes to mind, you probably think solely of the -user-installed browser. But behind the scenes, Chrome has an extensive fleet of -backends. Among these is the Chrome Optimization Guide service. This service -forms an important basis for Chrome's user experience strategy, operating in the -critical path for users, and is implemented in Go. - -The Chrome Optimization Guide service is designed to bring the power of Google -to Chrome by providing hints to the installed browser about what optimizations -may be performed on a page load, as well as when they can be applied most -effectively. It comprises a conjunction of real-time servers and batch logs -analysis. - -All Lite mode users of Chrome receive data via the service through the following -mechanisms: a data blob push that provides hints for well-known sites in their -geography, a check-in to Google servers to retrieve hints for hosts that the -specific user visits often, and on demand for page loads for which a hint is not -already on the device. Were the Chrome Optimization Guide service to suddenly -disappear, users might notice a dramatic change in the speed of their page loads -and the amount of data consumed while browsing the web. - -{{backgroundquote ` - author: Sophie Chang - title: Software Engineer - quote: | - Given that Go was a success for us, we plan to continue to use - it where appropriate -`}} - -When the Chrome engineering team started building the service, only a few -members had comfort with Go. Most of the team was more familiar with C++, but -they found the complex boilerplate required to stand up a C++ server to be too -much. The team shared that “[they] were pretty motivated to learn Go due to its -simplicity, fast ramp-up, and ecosystem.” and that “[their] sense of adventure -was rewarded.” Millions of users rely on this service to make their Chrome -experience better, and choosing Go was no small decision. After their experience -so far, the team also shared that “given that Go was a success for us, we plan -to continue to use it where appropriate.” - -In addition to the Chrome Optimization Guide team, engineering teams across -Google have adopted Go in their development process. Read about how the [Core -Data Solutions](/solutions/google/coredata/) and [Firebase -Hosting](/solutions/google/firebase/) teams use Go to build fast, reliable, -and efficient software at scale. - -*Editorial note: The Go team would like to thank Sophie Chang for her -contributions to this story.* diff --git a/go.dev/content/solutions/google/coredata.md b/go.dev/content/solutions/google/coredata.md deleted file mode 100644 index e9bbb0a0..00000000 --- a/go.dev/content/solutions/google/coredata.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "How Google's Core Data Solutions Team Uses Go" -layout: solution -company: Core Data -logoSrc: google.svg -heroImgSrc: go_core_data_case_study.png -series: Case Studies -quote: | - Google is a technology company whose mission is to organize the world’s - information and make it universally accessible and useful. - - In this case study, Google’s Core Data Solutions team shares their journey - with Go, including their decision to rewrite web indexing services in Go, - taking advantage of Go’s built-in concurrency, and observing how Go helps to - improve the development process. -authors: - - Prasanna Meda, Software Engineer, Core Data Solutions -aliases: - - /solutions/coredata ---- - -Google's mission is “to organize the world's information and make it universally -accessible and useful.” One of the teams responsible for organizing that -information is Google’s Core Data Solutions team. The team, among other things, -maintains services to index web pages across the globe. These web indexing -services help support products like Google Search by keeping search results -updated and comprehensive, and they’re written in Go. - -In 2015, to keep up with Google’s scale, our team needed to rewrite our indexing -stack from a single monolithic binary written in C++ to multiple components in a -microservices architecture. We decided to rewrite many indexing services in Go, -which we now use to power the majority of our architecture. - -{{backgroundquote ` - author: Minjae Hwang - title: Software Engineer - quote: | - Go’s built-in concurrency is a natural fit because engineers on the team are - encouraged to use concurrency and parallel algorithms. -`}} - -When choosing a language, our team found that several of Go’s features made it -particularly suitable. For instance, Go’s built-in concurrency is a natural fit -because engineers on the team are encouraged to use concurrency and parallel -algorithms. Engineers have also found that “Go code is more natural,” allowing -them to spend their time focusing on business logic and analysis rather than on -managing memory and optimizing performance. - -Writing code is much simpler when writing in Go, as it helps lessen cognitive -burden during the development process. For example, when working with C++, -sophisticated IDEs might, “show that the source code has no compile error when -there actually is one” whereas “in Go, [the code] will always compile when [the -IDE] says the code has no compile error,” said MinJae Hwang, a software engineer -on the Core Data Solutions team. Reducing small friction points along the -development process, such as shortening the cycle of fixing compile errors, -helped our team ship faster during the original rewrite, and has helped keep our -maintenance costs low. - -“When I’m in C++ and I want to use more packages, I have to write pieces such as -headers. When I'm writing in Go, **built-in tools allow me to use packages more -easily. My development velocity is much faster,**” Hwang also shared. - -With simple language syntax and support of Go tools, several members of our team -find it much easier to write in Go code. We’ve also found that Go does a really -good job of static type checking and that certain Go fundamentals, such as the -godoc command, have helped the team build a more disciplined culture around -writing documentation. - -{{backgroundquote ` - author: Prasanna Meda - title: Software Engineer - quote: | - ...Google’s web indexing was re-architected within a year. More impressively, - most developers on the team were rewriting in Go while also learning it. -`}} - -Working on a product used so heavily around the world is no small task and our -team’s decision to use Go wasn’t a simple one, but doing so helped us move -faster. As a result, Google’s web indexing was re-architected within a year. -More impressively, most developers on the team were rewriting in Go while also -learning it. - -In addition to the Core Data Solutions team, engineering teams across Google -have adopted Go in their development process. Read about how the -[Chrome](/solutions/google/chrome/) and [Firebase -Hosting](/solutions/google/firebase/) teams use Go to build fast, reliable, and -efficient software at scale. diff --git a/go.dev/content/solutions/google/firebase.md b/go.dev/content/solutions/google/firebase.md deleted file mode 100644 index f46fba93..00000000 --- a/go.dev/content/solutions/google/firebase.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: "How the Firebase Hosting Team Scaled With Go" -layout: solution -company: Firebase -logoSrc: firebase.svg -heroImgSrc: go_firebase_case_study.png -series: Case Studies -quote: | - Firebase is Google’s mobile platform that helps you quickly develop high-quality - apps and grow your business. - - The Firebase Hosting team shared their journey with Go, including their - backend migration from Node.js, the ease of onboarding new Go developers, and - how Go has helped them scale. -aliases: - - /solutions/firebase ---- - -The Firebase Hosting team provides static web hosting services for Google Cloud -customers. They provide a static web host that sits behind a global content -delivery network, and offer users tools that are easy to use. The team also -develops features that range from uploading site files to registering domains to -tracking usage. - -Before joining Google, Firebase Hosting’s tech stack was written in Node.js. The -team started to use Go when they needed to interoperate with several other -Google services. They decided to use Go to help them scale easily and -efficiently, knowing that “concurrency would continue to be a big need.” They -“were confident Go would be more performant,” and “liked that Go is more terse” -than other languages they were considering, said Michael Bleigh, a software -engineer on the team. - -Starting with one small service written in Go, the team migrated their entire -backend in a series of moves. The team progressively identified large features -they wanted to implement and, in the process, rewrote them in Go and moved to -Google Cloud and Google’s internal cluster management system. **Now the Firebase -Hosting team has replaced 100% of backend Node.js code with Go.** - -The team’s experience writing in Go began with one engineer. “Through -peer-to-peer learning and Go being generally easy to get started with, everyone -on the team now has Go dev experience,” said Bleigh. They’ve found that while a -majority of people who are new to the team haven’t had any experience with Go, -“most of them are productive within a couple weeks.” - -"Using Go, it's easy to see how the code is organized and what the code does," -said Bleigh, speaking for the team. “Go is generally very readable and -understandable. The language’s error handling, receivers, and interfaces are all -easy to understand due to the idioms in the language.” - -Concurrency continues to be a focus for the team as they scale. Robert Rossney, -a software engineer, shared that “Go makes it very easy to put all of the hard -concurrency stuff in one place, and everywhere else it's abstracted.” Rossney -also spoke to the benefits of using a language built with concurrency in mind, -saying that “there are also a lot of ways to do concurrency in Go. We’ve had to -learn when each route is best, how to determine when a problem is a concurrency -problem, how to debug–but that comes out of the fact that you actually can write -these patterns in Go code.” - -{{backgroundquote ` - author: Robert Rossney - title: Software Engineer - quote: | - Generally speaking, there’s not a time on the team where we’re feeling - frustrated with Go, it just kind of gets out of the way and lets you do work. -`}} - -Hundreds of thousands of customers host their websites with Firebase Hosting, -which means Go code is used to serve billions of requests per day. “Our customer -base and traffic have doubled multiple times since migrating to Go without ever -requiring fine-tuned optimizations” shared Bleigh. With Go, the team has seen -performance improvements both in the software and on the team, with excellent -productivity gains. “Generally speaking,” Rossney mentioned, “...there’s not a -time on the team where we’re feeling frustrated with Go, it just kind of gets -out of the way and lets you do work.” - -In addition to the Firebase Hosting team, engineering teams across Google have -adopted Go in their development process. Read about how the [Core Data -Solutions](/solutions/google/coredata/) and [Chrome](/solutions/google/chrome/) -teams use Go to build fast, reliable, and efficient software at scale. diff --git a/go.dev/content/solutions/google/sitereliability.md b/go.dev/content/solutions/google/sitereliability.md deleted file mode 100644 index 251a4b1b..00000000 --- a/go.dev/content/solutions/google/sitereliability.md +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: "Actuating Google Production: How Google’s Site Reliability Engineering Team Uses Go" -layout: solution -company: Google Site Reliability Engineering (SRE) -logoSrc: sitereliability.svg -heroImgSrc: go_sitereliability_case_study.png -series: Case Studies -quote: | - Google’s Site Reliability Engineering team has a mission to protect, provide for, and progress the software and systems behind all of Google’s public services — Google Search, Ads, Gmail, Android, YouTube, and App Engine, to name just a few — with an ever-watchful eye on their availability, latency, performance, and capacity. - - They shared their experience building core production management systems with Go, coming from experience with Python and C++. -authors: - - Pierre Palatin, Site Reliability Engineer -aliases: - - /solutions/sitereliability ---- - -Google runs a small number of very large services. Those services are powered -by a global infrastructure covering everything a developer needs: storage -systems, load balancers, network, logging, monitoring, and much more. -Nevertheless, it is not a static system—it cannot be. Architecture evolves, -new products and ideas are created, new versions must be rolled out, configs -pushed, database schema updated, and more. We end up deploying changes to our -systems dozens of times per second. - -Because of this scale and critical need for reliability, Google pioneered Site -Reliability Engineering (SRE), a role that many other companies have since adopted. -“SRE is what you get when you treat operations as if it’s a software problem. -Our mission is to protect, provide for, and progress the software and systems -behind all of Google’s public services with an ever-watchful eye on their -availability, latency, performance, and capacity.” -- [Site Reliability Engineering (SRE)](https://sre.google/). - -{{backgroundquote ` - quote: | - Go promised a sweet spot between performance and readability that neither of - the other languages [Python and C++] were able to offer. -`}} - -In 2013-2014, Google’s SRE team realized that our approach to production -management was not cutting it anymore in many ways. We had advanced far beyond -shell scripts, but our scale had so many moving pieces and complexities that a -new approach was needed. We determined that we needed to move toward a -declarative model of our production, called "Prodspec", driving a dedicated -control plane, called "Annealing". - -When we started those projects, Go was just becoming a viable option for -critical services at Google. Most engineers were more familiar with Python -and C++, either of which would have been valid choices. Nevertheless, Go -captured our interest. The appeal of novelty was certainly a factor of -course. But, more importantly, Go promised a sweet spot between performance -and readability that neither of the other languages were able to offer. We -started a small experiment with Go for some initial parts of Annealing and -Prodspec. As the projects progressed, those initial parts written in Go found -themselves at the core. We were happy with Go—its simplicity grew on us, the -performance was there, and concurrency primitives would have been hard to -replace. - -{{backgroundquote ` - quote: | - Now the majority of Google production is managed and maintained by our systems - written in Go. -`}} - -At no point was there ever a mandate or requirement to use Go, but we had no -desire to return to Python or C++. Go grew organically in Annealing and -Prodspec. It was the right choice, and thus is now our language of choice. -Now the majority of Google production is managed and maintained by our systems -written in Go. - -The power of having a simple language in those projects is hard to overstate. -There have been cases where some feature was indeed missing, such as the -ability to enforce in the code that some complex structure should not be -mutated. But for each one of those cases, there have undoubtedly been tens or -hundred of cases where the simplicity helped. - -{{backgroundquote ` - quote: | - Go’s simplicity means that the code is easy to follow, whether it is to spot - bugs during review or when trying to determine exactly what happened during a - service disruption. -`}} - -For example, Annealing impacts a wide variety of teams and services meaning -that we relied heavily on contributions across the company. The simplicity of -Go made it possible for people outside our team to see why some part or another -was not working for them, and often provide fixes or features themselves. This -allowed us to quickly grow. - -Prodspec and Annealing are in charge of some quite critical components. Go’s -simplicity means that the code is easy to follow, whether it is to spot bugs -during review or when trying to determine exactly what happened during a -service disruption. - -Go performance and concurrency support have also been key for our work. As our -model of production is declarative, we tend to manipulate a lot of structured -data, which describes what production is and what it should be. We have large -services so the data can grow large, often making purely sequential processing -not efficient enough. - -We are manipulating this data in many ways and many places. It is not a matter -of having a smart person come up with a parallel version of our algorithm. It -is a matter of casual parallelism, finding the next bottleneck and -parallelising that code section. And Go enables exactly that. - -As a result of our success with Go, we now use Go for every new development for -Prodspec and Annealing. - -In addition to the Site Reliability Engineering team, engineering teams across -Google have adopted Go in their development process. Read about how the -[Core Data Solutions](/solutions/google/coredata/), -[Firebase Hosting](/solutions/google/firebase/), and -[Chrome](/solutions/google/chrome/) teams use Go to build fast, reliable, -and efficient software at scale. \ No newline at end of file diff --git a/go.dev/content/solutions/grail/index.md b/go.dev/content/solutions/grail/index.md deleted file mode 100644 index b6be2ea0..00000000 --- a/go.dev/content/solutions/grail/index.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -linkTitle: Bigslice - A cluster computing system in Go -description: At GRAIL, we use the Go programming language for most of our bioinformatics, - data processing, and machine learning tasks. Go’s simplicity makes it easy for - newcomers to learn; its transparent runtime semantics makes it easy to reason - about performance; and its ability to control data layout and allocation makes - it possible to write highly performant data processing code. -layout: solution -company: GRAIL -logoSrc: grail.png -series: Case Studies -link: - https://medium.com/grail-eng/bigslice-a-cluster-computing-system-for-go-7e03acd2419b -inLandingPageGrid: false ---- \ No newline at end of file diff --git a/go.dev/content/solutions/grail/logo.png b/go.dev/content/solutions/grail/logo.png deleted file mode 100644 index 2dd9c59e..00000000 Binary files a/go.dev/content/solutions/grail/logo.png and /dev/null differ diff --git a/go.dev/content/solutions/mercadolibre/index.md b/go.dev/content/solutions/mercadolibre/index.md deleted file mode 100644 index f1044482..00000000 --- a/go.dev/content/solutions/mercadolibre/index.md +++ /dev/null @@ -1,171 +0,0 @@ ---- -title: "MercadoLibre Grows with Go" -layout: solution -company: MercadoLibre -logoSrc: mercado-libre.png -heroImgSrc: go_mercadolibre_case_study_logo.png -carouselImgSrc: go_mercadolibre_case_study.png -date: 2019-11-10T16:26:31-04:00 -series: Case Studies -quote: Go provides clean, efficient code that readily scales as MercadoLibre’s online commerce grows, and increases developer productivity by allowing their engineers to serve their ever-increasing audience while writing less code. ---- - -{{pullquote ` - author: Eric Kohan - title: Software Engineering Manager - company: MercadoLibre - quote: | - I think that **the tour of Go is by far the best introduction to a language that I’ve seen**, It’s really simple and it gives you a fair overview of probably 80 percent of the language. When we want to get developers to learn Go, and to get to production fast, we tell them to start with the tour of Go. -`}} - -## Go helps integrated ecosystem attract developers and scale eCommerce - -MercadoLibre, Inc. hosts the largest online commerce ecosystem in Latin America and is present in 18 countries. Founded -in 1999 and headquartered in Argentina, the company has turned to Go to help it scale and modernize its ecosystem. Go -provides clean, efficient code that readily scales as MercadoLibre’s online commerce grows, and increases developer -productivity by allowing their engineers to serve their ever-increasing audience while writing less code. - -### MercadoLibre taps Go for scale - -Back in 2015, there was a growing sense within MercadoLibre that their existing API framework, on Groovy and Grails, was -reaching its limits and the company needed a different platform to continue scaling. MercadoLibre’s platform was (and -continues) to expand exponentially, which created a lot of extra work for its developers: Both Groovy and Grails require -a lot of decisions from developers and Groovy is a dynamic programming language. This was not a good combination for -quickly scaling growth, as MercadoLibre needed very experienced developers in this very resource intensive environment -to develop and tune to achieve desired performance. Test execution times were slow, and build and deploy times were -slow. Thus, the need for code efficiency and scalability became as important as the need for speed in code development. - - -### Go improves system efficiency - -As one example of Go’s contributions to network efficiency, the core API team builds and maintains the largest APIs at -the center of the company’s microservices solutions. This team creates user APIs, which in turn are used by the -MercadoLibre Marketplace, by the MercadoPago FinTech platform, by MercadoLibre’s shipping and logistics solutions, and -other hosted solutions. With the high service levels demanded by these solutions—the average user API has between eight -and ten million requests per minute—the team employs Go to serve them at less than ten milliseconds per request. - -The API team also deploys Docker containers—a software-as-a-service (SaaS) product, also written in Go—to virtualize -their development and readily deploy their microservices via the Docker Engine. This system supports larger, -mission-critical APIs that handle **more than 20 million requests per minute in Go.** - -One API made important use of Go’s concurrency primitives to efficiently multiplex IDs from several services. The team -was able to accomplish this with just a few lines of Go code, and the success of this API convinced the core API team to -migrate more and more microservices to Go. The end result for MercadoLibre has been improved cost-efficiencies and -system response times. - -### Go for scalability - -Historically, much of the company’s stack was based on Grails and Groovy backed by relational databases. However this -big framework with multiple layers was soon found encountering scalability issues. - -Converting that legacy architecture to Go as a new, very thin framework for building APIs streamlined those intermediate -layers and yielded great performance benefits. For example, one large Go service is now able to **run 70,000 requests -per machine with just 20 MB of RAM.** - -{{backgroundquote ` - author: Eric Kohan - title: Software Engineering Manager - company: MercadoLibre - quote: | - Go was just marvelous for us. It’s very powerful - and very easy to learn, and with backend infrastructure, has been great for us in terms of scalability. -`}} - -Using **Go allowed MercadoLibre to cut the number of servers** they use for this service to one-eighth the original -number (from 32 servers down to four), plus each server can operate with less power (originally four CPU cores, now down -to two CPU cores). With Go, the company **obviated 88 percent of their servers and cut CPU on the remaining ones in -half**—producing a tremendous cost-savings. - -Sitting between developers and the cloud providers, MercadoLibre uses a platform called Fury—a platform-as-a-service -tool for building, deploying, monitoring, and managing services in a cloud-agnostic way. As a result, any team that -wants to create a new service in Go has access to proven templates for a variety of service types, and can quickly spin -up a repository in GitHub with starter code, a Docker image for the service, and a deployment pipeline. The end result -is a system that allows engineers to focus on building innovative services while avoiding the tedious stages of setting -up a new project—all while effectively standardizing the build and deployment pipelines. - -Today, **roughly half of Mercadolibre's traffic is handled by Go applications.** - - -### MercadoLibre uses Go for developers - -The programming _lingua francas_ for MercadoLibre’s infrastructure are currently Go and Java. Every app, every program, -every microservice is hosted on its own GitHub repository, plus the company uses an additional GitHub repository of -toolkits to solve new problems and allow clients to interact with its services. - -These extensive and well-curated Go and Java toolkits allow programmers to develop new apps quickly and with great -support. Plus, in a community of more than 2,800 developers, MercadoLibre has multiple internal groups available for -chat and guidance on deploying Go, whether across different development centers or different countries. The company also -fosters internal working groups to provide training sessions for new MercadoLibre Go developers, and hosts Go meetups -for external developers to help build a broader community of Latin American Go developers. - - -### Go as a recruiting tool - -MercadoLibre’s Go advocacy has also become a strong recruiting tool for the company. MercadoLibre was among the first -companies using Go in Argentina, and is perhaps the largest in Latin America using the language so widely in production. -Headquartered in Buenos Aires, with many start-ups and emerging technology companies nearby, MercadoLibre's adoption of -Go has shaped the market for developers across the Pampas. - -{{backgroundquote ` - author: Eric Kohan - title: Software Engineering Manager - company: MercadoLibre - quote: | - We really see eye-to-eye with the larger philosophy of the language. We love Go's simplicity, and we find that having its very explicit error handling has been a gain for developers because it results in safer, more stable code in production. -`}} - -Buenos Aires is today a very competitive market for programmers, offering computer programmers many employment options, -and the high demand for technology in the region drives great salaries, great benefits, and the ability to be selective -when choosing an employer. As such, MercadoLibre—like all employers of engineers and programmers in the region—strives -to provide an exciting workplace and strong career path. Go has proven to be a key differentiator for MercadoLibre: the -company organizes Go workshops for external developers so they can come and learn Go, and when they enjoy what they are -doing and the people they talk to, they quickly recognize MercadoLibre as an enticing place to work. - -### Go enabling developers - -MercadoLibre employs Go for its simplicity with systems at scale, but that simplicity is also why the company's -developers love Go. - -The company also uses web pages like[ Go by Example](https://gobyexample.com/) and[ Effective -Go](https://golang.org/doc/effective_go.html) to educate new programmers, and shares representative internal APIs -written in Go to speed understanding and proficiency. MercadoLibre developers get the resources they need to embrace the -language, then leverage their own skills and enthusiasm to start programming. - -{{backgroundquote ` - author: Federico Martin Roasio - title: Technical Project Lead - company: MercadoLibre - quote: | - Go has been great for writing business logic, and we are the team that writes those APIs. -`}} - -MercadoLibre leverages Go’s expressive and clean syntax to make it easier for developers to write programs that run -efficiently on modern cloud platforms. And while speed in development yields cost efficiency for the company, developers -individually benefit from the swift learning curve Go delivers. Not only are MercadoLibre's experienced engineers able -to build highly critical applications very quickly with Go, but even entry-level engineers have been able to write -services that, in other languages, MercadoLibre would only trust to more senior developers. For example, a key set of -user APIs—handling almost ten million requests per minute—were developed by entry-level software engineers, many of whom -only knew about programming from recent courses at university. Similarly, MercadoLibre has seen developers already -proficient with other programming languages (such as Java or .NET or Ruby) learn Go fast enough start writing production -services in just a few weeks. - -With Go, MercadoLibre’s **build times are three times (3x) faster** and their **test suite runs an amazing 24 times -faster**. This means the company’s developers can make a change, then build and test that change much faster than they -could before. - -And dropping MercadoLibre’s test suite runtimes from 90-seconds to **just 3-seconds with Go** was a huge boon for its -developers—allowing them to keep focus (and context) while the much faster tests complete. - -Leveraging this success, MercadoLibre is committed not only to ongoing education for its programmers, but ongoing Go -education. The company sends key engineering leaders to GopherCon and other Go events each year, MercadoLibre’s -infrastructure and security teams encourage all the development teams to keep Go versions up to date, and the company -has a team developing a _Go-meli-toolkit_: A complete Go library to interface all the services provided by Fury. - -### Getting your enterprise started with Go - -Just as MercadoLibre started with a proof-of-concept project to implement Go, dozens of other large enterprises are -adopting Go as well. - -There are over one million developers using Go worldwide—spanning banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as [American Express](https://go.dev/solutions/americanexpress), [PayPal](https://go.dev/solutions/paypal), Capital One, Dropbox, IBM, Monzo, New York Times, Salesforce, Square, Target, Twitch, Uber, and of course Google. - -To learn more about how Go can help your enterprise build reliable, scalable software as it does at MercadoLibre, visit [go.dev](https://go.dev) today. diff --git a/go.dev/content/solutions/mercadolibre/logo.svg b/go.dev/content/solutions/mercadolibre/logo.svg deleted file mode 100644 index 3fccb14c..00000000 --- a/go.dev/content/solutions/mercadolibre/logo.svg +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/go.dev/content/solutions/microsoft/index.md b/go.dev/content/solutions/microsoft/index.md deleted file mode 100644 index ddcd77ef..00000000 --- a/go.dev/content/solutions/microsoft/index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -linkTitle: How Microsoft Embraces Go -description: - Learn about how Microsoft has helped support Go and how it uses Go to power - pieces of it's cloud infrastructure. -layout: solution -company: Microsoft -series: Case Studies -logoSrc: microsoft.png -link: https://cloudblogs.microsoft.com/opensource/2018/02/21/go-lang-brian-ketelsen-explains-fast-growth/ -inLandingPageGrid: true ---- diff --git a/go.dev/content/solutions/netflix/index.md b/go.dev/content/solutions/netflix/index.md deleted file mode 100644 index 1a724077..00000000 --- a/go.dev/content/solutions/netflix/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -linkTitle: "Netflix - Application data caching using SSDs" -description: "The decision to use Go was deliberate, because we needed something that had lower latency than Java (where garbage collection pauses are an issue) and is more productive for developers than C, while also handling tens of thousands of client connections. Go fits this space well." -layout: solution -company: Netflix -logoSrc: netflix.svg -series: Case Studies -link: https://medium.com/netflix-techblog/application-data-caching-using-ssds-5bf25df851ef -inLandingPageGrid: true ---- diff --git a/go.dev/content/solutions/netflix/logo.svg b/go.dev/content/solutions/netflix/logo.svg deleted file mode 100644 index 0ce1bf48..00000000 --- a/go.dev/content/solutions/netflix/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/content/solutions/paypal/index.md b/go.dev/content/solutions/paypal/index.md deleted file mode 100644 index 96803316..00000000 --- a/go.dev/content/solutions/paypal/index.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: PayPal Taps Go to Modernize and Scale -date: 2020-06-01 -layout: solution -company: PayPal -logoSrc: paypal.svg -heroImgSrc: go_paypal_case_study_logo.png -carouselImgSrc: go_paypal_case_study.png -series: Case Studies -quote: Go’s value in producing clean, efficient code that readily scales as software deployment scales made the language a strong fit to support PayPal’s goals. ---- - -{{pullquote ` - author: Bala Natarajan - title: Sr. Director of Engineering, Developer Experience - company: PayPal - quote: | - Since our NoSQL and DB proxy used quite a bit of system details in a multi-threaded mode, the code got complex managing the different conditions, given that Go provides channels and routines to deal with complexity, we were able to structure the code to meet our requirements. -`}} - -## New code infrastructure built on Go - -PayPal was created to democratize financial services and empower people and businesses to join and thrive in the global economy. Central to this effort is PayPal’s Payments Platform, which uses a combination of proprietary and third-party technologies to efficiently and securely facilitate transactions between millions of merchants and consumers worldwide. As the Payments Platform grew larger and more complicated, PayPal sought to modernize its systems and reduce time-to-market for new applications. - -Go’s value in producing clean, efficient code that readily scales as software deployment scales made the language a strong fit to support PayPal’s goals. - -Central to the Payment Processing Platform is a proprietary NoSQL database that PayPal had developed in C++. The complexity of the code, however, was substantially decreasing its developers’ ability to evolve the platform. Go’s simple code layouts, goroutines (lightweight threads of execution) and channels (which serve as the pipes that connect concurrent goroutines), made Go a natural choice for the NoSQL development team to simplify and modernize the platform. - -As a proof of concept, a development team spent six months learning Go and reimplementing the NoSQL system from the ground up in Go, during which they also provided insights on how Go could be implemented more broadly at PayPal. As of today, thirty percent of the clusters have been migrated to use the new NoSQL database. - - -## Using Go to simplify for scale - -As PayPal’s platform becomes more intricate, Go provides a way to readily simplify the complexity of creating and running software at scale. The language provides PayPal with great libraries and fast tools, plus concurrency, garbage collection, and type safety. - -With Go, PayPal enables its developers to spend more time looking at code and thinking strategically, by freeing them from the noise of C++ and Java development. - -After the success of this newly re-written NoSQL system, more platform and content teams within PayPal began adopting Go. Natarajan’s current team is responsible for PayPal’s build, test, and release pipelines—all built in Go. The company has a large build and test farm which is completely managed using Go infrastructure to support builds-as-a-service (and tests-as-a-service) for developers across the company. - - Go gopher factory - -## Modernizing PayPal systems with Go - -With the distributed computing capabilities required by PayPal, Go was the right language to refresh their systems. PayPal needed programming that is concurrent and parallel, compiled for high performance and highly portable, and that brings developers the benefits of a modular, composable open-source architecture—Go has delivered all that and more to help PayPal modernize its systems. - -Security and supportability are key matters at PayPal, and the company’s operational pipelines are increasingly dominated by Go because the language’s cleanliness and modularity help them achieve these goals. PayPal’s deployment of Go engenders a platform of creativity for developers, allowing them to produce simple, efficient, and reliable software at scale for PayPal’s worldwide markets. - -As PayPal continues to modernize their software-defined networking (SDN) infrastructure with Go, they are seeing performance benefits in addition to more maintainable code. For example, Go now powers routers, load balances, and an increasing number of production systems. - -{{backgroundquote ` - author: Bala Natarajan - title: Sr. Director of Engineering - quote: | - In our tightly managed environments where we run Go code, we have seen a CPU reduction of approximately ten percent with cleaner and maintainable code. -`}} - -## Go increases developer productivity - -As a global operation, PayPal needs its development teams to be effective at managing two kinds of scale: production scale, especially concurrent systems interacting with many other servers (such as cloud services); and development scale, especially large codebases developed by many programmers in coordination (such as open-source development) - -PayPal leverages Go to address these issues of scale. The company’s developers benefit from Go’s ability to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. As PayPal modernizes its system, support for networked and multicore computing is critical. Go not only delivers such support but delivers quickly—it takes at most a few seconds to compile a large executable on a single computer. - -There are currently over 100 Go developers at PayPal, and future developers who choose to adopt Go will have an easier time getting the language approved thanks to the many successful implementations already in production at the company. - -Most importantly, PayPal developers have increased their productivity with Go. Go’s concurrency mechanisms have made it easy to write programs that get the most out of PayPal’s multicore and networked machines. Developers using Go also benefit from the fact that it compiles quickly to machine code and their apps gain the convenience of garbage collection and the power of run-time reflection. - -## Speeding PayPal’s time to market - -The first-class languages at PayPal today are Java and Node, with Go primarily used as an infrastructure language. While Go may never replace Node.js for certain applications, Natarajan is pushing to make Go a first-class language at PayPal. - -Through his efforts, PayPal is also evaluating moving to the Google Kubernetes Engine (GKE) to speed their new products’ time-to-market. The GKE is a managed, production-ready environment for deploying containerized applications, and brings Google's latest innovations in developer productivity, automated operations, and open source flexibility. - -For PayPal, deploying to GKE would enable rapid development and iteration by making it easier for PayPal to deploy, update, and manage its applications and services. Plus PayPal will find it easier to run Machine Learning, General Purpose GPU, High-Performance Computing, and other workloads that benefit from specialized hardware accelerators supported by the GKE. - -Most importantly for PayPal, the combination of Go development and the GKE allows the company to scale effortless to meet demand, as Kubernetes autoscaling will allow PayPal to handle increased user demand for services—keeping them available when it matters most, then scale back in the quiet periods to save money. - - -## Getting your enterprise started with Go - -PayPal’s story is not unique; dozens of other large enterprises are discovering how Go can help them ship reliable software faster. There are over one million developers using Go worldwide—spanning banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as [American Express](https://go.dev/solutions/americanexpress), [Mercado Libre](https://go.dev/solutions/mercadolibre), Capital One, Dropbox, IBM, Monzo, New York Times, Salesforce, Square, Target, Twitch, Uber, and of course Google. - -To learn more about how Go can help your enterprise build reliable, scalable software as it does at PayPal, visit [go.dev](https://go.dev) today. diff --git a/go.dev/content/solutions/paypal/logo.svg b/go.dev/content/solutions/paypal/logo.svg deleted file mode 100644 index 2923b9f5..00000000 --- a/go.dev/content/solutions/paypal/logo.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/go.dev/content/solutions/riotgames/index.md b/go.dev/content/solutions/riotgames/index.md deleted file mode 100644 index c595fd22..00000000 --- a/go.dev/content/solutions/riotgames/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -linkTitle: "Riot Games - Leveraging Golang for Game Development and Operations" -description: "Learn how Riot uses Go to develop, deploy, and operate backend microserves at scale–globally. They share thier experience across use cases, with specific examples, and speak to the value of the gopher community." -layout: solution -company: Riot Games -logoSrc: riotgames.png -series: Case Studies -link: https://technology.riotgames.com/news/leveraging-golang-game-development-and-operations -inLandingPageGrid: true ---- \ No newline at end of file diff --git a/go.dev/content/solutions/riotgames/riotgames.png b/go.dev/content/solutions/riotgames/riotgames.png deleted file mode 100644 index facb585f..00000000 Binary files a/go.dev/content/solutions/riotgames/riotgames.png and /dev/null differ diff --git a/go.dev/content/solutions/salesforce/index.md b/go.dev/content/solutions/salesforce/index.md deleted file mode 100644 index 5dbfe051..00000000 --- a/go.dev/content/solutions/salesforce/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -linkTitle: "Salesforce - From Python/C to Go" -description: "One of the big advantages is that Go's cross-platform features make porting code easy." -layout: solution -company: Salesforce -logoSrc: salesforce.svg -series: Case Studies -link: https://www.zdnet.com/article/salesforce-why-we-ditched-python-for-googles-go-language-in-einstein-analytics/ -inLandingPageGrid: true ---- diff --git a/go.dev/content/solutions/salesforce/logo.svg b/go.dev/content/solutions/salesforce/logo.svg deleted file mode 100755 index e82db677..00000000 --- a/go.dev/content/solutions/salesforce/logo.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/content/solutions/target/index.md b/go.dev/content/solutions/target/index.md deleted file mode 100644 index 3b7d54dd..00000000 --- a/go.dev/content/solutions/target/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -linkTitle: "Target - Recommending Go" -layout: solution -company: Target -logoSrc: target.svg -series: Case Studies -link: https://tech.target.com/infrastructure/2018/06/18/Recommending-GoLang-at-Target.html -description: "We loved the simplified syntax, strong standard library, great external community, and well-built and maintained libraries. We loved the fast compile times and incredibly small images we could build when deploying containers. As we continue to grow and scale our technical solutions to our guests, we find the concurrency primitives in Go particularly useful." -inLandingPageGrid: true ---- diff --git a/go.dev/content/solutions/target/logo.svg b/go.dev/content/solutions/target/logo.svg deleted file mode 100644 index 98868c57..00000000 --- a/go.dev/content/solutions/target/logo.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/go.dev/content/solutions/twitch/index.md b/go.dev/content/solutions/twitch/index.md deleted file mode 100644 index 40b34db2..00000000 --- a/go.dev/content/solutions/twitch/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -linkTitle: "Twitch - Go’s march to low latency GC" -description: "We use Go at Twitch for many of our busiest systems. Its simplicity, safety, performance, and readability make it a good tool for the problems we encounter with serving live video and chat to our millions of users." -layout: solution -company: Twitch -logoSrc: twitch.svg -series: Case Studies -link: https://blog.twitch.tv/en/2016/07/05/gos-march-to-low-latency-gc-a6fa96f06eb7/ -inLandingPageGrid: true ---- diff --git a/go.dev/content/solutions/twitch/logo.svg b/go.dev/content/solutions/twitch/logo.svg deleted file mode 100644 index 6afd8113..00000000 --- a/go.dev/content/solutions/twitch/logo.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - diff --git a/go.dev/content/solutions/twitter/index.md b/go.dev/content/solutions/twitter/index.md deleted file mode 100644 index 6e0cd1e7..00000000 --- a/go.dev/content/solutions/twitter/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "Twitter - 5 billion sessions a day in realtime" -description: "We now see about five billion sessions per day, and growing. Hundreds of millions of devices send millions of events every second to the Answers endpoint. During the time that it took you to read to here, the Answers back-end will have received and processed about 10,000,000 analytics events." -layout: solution -company: Twitter -logoSrc: twitter.svg -series: Case Studies -link: https://blog.twitter.com/engineering/en_us/a/2015/handling-five-billion-sessions-a-day-in-real-time.html -inLandingPageGrid: true ---- diff --git a/go.dev/content/solutions/twitter/logo.svg b/go.dev/content/solutions/twitter/logo.svg deleted file mode 100755 index 2832e7b5..00000000 --- a/go.dev/content/solutions/twitter/logo.svg +++ /dev/null @@ -1 +0,0 @@ -Twitter_Logo_Blue \ No newline at end of file diff --git a/go.dev/content/solutions/uber/index.md b/go.dev/content/solutions/uber/index.md deleted file mode 100644 index 50485fd2..00000000 --- a/go.dev/content/solutions/uber/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "Uber - GPU-power analytics engine in Go" -description: "AresDB [,written in Go,] is widely used at Uber to power our real-time data analytics dashboards, enabling us to make data-driven decisions at scale about myriad aspects of our business." -layout: solution -company: Uber -logoSrc: uber.svg -series: Case Studies -link: https://eng.uber.com/aresdb/ -inLandingPageGrid: true ---- diff --git a/go.dev/content/solutions/uber/logo.svg b/go.dev/content/solutions/uber/logo.svg deleted file mode 100644 index 7950b0b8..00000000 --- a/go.dev/content/solutions/uber/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/go.dev/content/solutions/webdev/index.md b/go.dev/content/solutions/webdev/index.md deleted file mode 100644 index b9ca83d8..00000000 --- a/go.dev/content/solutions/webdev/index.md +++ /dev/null @@ -1,214 +0,0 @@ ---- -title: "Go for Web Development" -linkTitle: "Web Development" -description: "With enhanced memory performance and support for several IDEs, Go powers fast and scalable web applications." -date: 2019-10-04T15:26:31-04:00 -layout: solution -series: Use Cases -books: -resources: -- name: icon - src: webdev-green.svg - params: - alt: web dev icon -- name: icon-white - src: webdev-white.svg - params: - alt: web dev icon ---- - -## Overview {#overview .sectionHeading} - -### Go delivers speed, security, and developer-friendly tools for Web Applications - -Go is designed to enable developers to rapidly develop scalable and secure web applications. Go ships with an easy to use, secure and performant web server and includes it own web templating library. Go has excellent support for all of the latest technologies from [HTTP/2](https://pkg.go.dev/net/http), to databases like [MySQL](https://pkg.go.dev/mod/github.com/go-sql-driver/mysql), [MongoDB](https://pkg.go.dev/mod/go.mongodb.org/mongo-driver) and [ElasticSearch](https://pkg.go.dev/mod/github.com/elastic/go-elasticsearch/v7), to the latest encryption standards including [TLS 1.3](https://pkg.go.dev/crypto/tls). Go web applications run natively on [Google App Engine](https://cloud.google.com/appengine/) and [Google Cloud Run](https://cloud.google.com/run/) (for easy scaling) or on any environment, cloud, or operating system thanks to Go’s extreme portability. - -## Key Benefits {#key-benefits .sectionHeading} - -### Deploy across platforms in record speed - -For enterprises, Go is preferred for providing rapid cross-platform deployment. With its goroutines, native compilation, and the URI-based package namespacing, Go code compiles to a single, small binary—with zero dependencies—making it very fast. - -### Leverage Go’s out-of-the-box performance to scale with ease - -Tigran Bayburtsyan, Co-Founder and CTO at Hexact Inc., summarizes five key reasons his company switched to Go: - -- **Compiles into a single binary** — “Using static linking, Go actually combining all dependency libraries and modules into one single binary file based on OS type and architecture.” - -- **Static type system** — “Type system is really important for large scale applications.” - -- **Performance** — “Go performed better because of its concurrency model and CPU scalability. Whenever we need to process some internal request, we are doing it with separate Goroutines which are 10x cheaper in resources than Python Threads.” - -- **No need for a web framework** — “In most of the cases you really don’t need any third-party library.” - -- **Great IDE support and debugging** — “After rewriting all projects to Go, we got 64 percent less code than we had earlier.” - - -{{projects ` - - company: Caddy - url: https://caddyserver.com/ - logoSrc: caddy.svg - desc: Caddy 2 is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go. Caddy offers greater memory safety than servers written in C. A hardened TLS stack powered by the Go standard library serves a significant portion of all Internet traffic. - ctas: - - text: Caddy 2 - url: https://caddyserver.com/ - - company: Cloudflare - url: https://www.cloudflare.com/en-gb/ - logoSrc: cloudflare-icon.svg - desc: Cloudflare speeds up and protects millions of websites, APIs, SaaS services, and other properties connected to the Internet. “Go is at the heart of CloudFlare’s services including handling compression for high-latency HTTP connections, our entire DNS infrastructure, SSL, load testing and more.” - ctas: - - text: Cloudflare and Go - url: https://blog.cloudflare.com/what-weve-been-doing-with-go/ - - company: gov.uk - url: https://gov.uk/ - logoSrc: govuk.svg - desc: The simplicity and safety of the Go language were a good fit for the United Kingdom’s government’s HTTP infrastructure, and some brief experiments with the excellent net/http package convinced web developers they were on the right track. “In particular, Go’s concurrency model makes it absurdly easy to build performant I/O-bound applications.” - ctas: - - text: Building a new router for gov.uk - url: https://technology.blog.gov.uk/2013/12/05/building-a-new-router-for-gov-uk/ - - text: Using Go in government - url: https://technology.blog.gov.uk/2013/12/05/building-a-new-router-for-gov-uk/ - - company: Hugo - url: http://gohugo.io/ - logoSrc: hugo.svg - desc: Hugo is a fast and modern website engine written in Go, and designed to make website creation fun again. Websites built with Hugo are extremely fast and secure and can be hosted anywhere without any dependencies. - ctas: - - text: Hugo - url: http://gohugo.io/ - - company: Mattermost - url: https://mattermost.com/ - logoSrc: mattermost.png - desc: Mattermost is a flexible, open source messaging platform that enables secure team collaboration. It’s written in Go and React. - ctas: - - text: Mattermost - url: https://mattermost.com/ - - company: Medium - url: https://medium.org/ - logoSrc: medium.svg - desc: Medium uses Go to power their social graph, their image server and several auxiliary services. “We’ve found Go very easy to build, package, and deploy. We like the type-safety without the verbosity and JVM tuning of Java.” - ctas: - - text: Medium's Go Services - url: https://medium.engineering/how-medium-goes-social-b7dbefa6d413 - - company: The Economist - url: https://economist.com/ - logoSrc: economist.svg - desc: The Economist needed more flexibility to deliver content to increasingly diverse digital channels. Services written in Go were a key component of the new system that would enable The Economist to deliver scalable, high performing services and quickly iterate new products. “Overall, it was determined that Go was the language best designed for usability and efficiency in a distributed, cloud-based system.” - ctas: - - text: The Economist's Go microservices - url: https://www.infoq.com/articles/golang-the-economist/ -`}} - -## Get Started {#get-started .sectionHeading} - -### Go books on web development - -{{books ` - - title: Web Development with Go - url: https://www.amazon.com/Web-Development-Go-Building-Scalable-ebook/dp/B01JCOC6Z6 - thumbnail: /images/books/web-development-with-go.jpg - - title: Go Web Programming - url: https://www.amazon.com/Web-Programming-Sau-Sheong-Chang/dp/1617292567 - thumbnail: /images/books/go-web-programming.jpg - - title: "Web Development Cookbook: Build full-stack web applications with Go" - url: https://www.amazon.com/Web-Development-Cookbook-full-stack-applications-ebook/dp/B077TVQ28W - thumbnail: /images/books/go-web-development-cookbook.jpg - - title: Building RESTful Web services with Go - url: https://www.amazon.com/Building-RESTful-Web-services-gracefully-ebook/dp/B072QB8KL1 - thumbnail: /images/books/building-restful-web-services-with-go.jpg - - title: Mastering Go Web Services - url: https://www.amazon.com/Mastering-Web-Services-Nathan-Kozyra-ebook/dp/B00W5GUKL6 - thumbnail: /images/books/mastering-go-web-services.jpg -`}} - -{{libraries ` - - title: Web frameworks - viewMoreUrl: https://pkg.go.dev/search?q=web+framework - items: - - text: Buffalo - url: https://gobuffalo.io/en/ - desc: A framework for rapid web development in Go, curating Go and JS libraries together. - - text: Echo - url: https://echo.labstack.com/ - desc: A high performance, extensible, and minimalist Go web framework - - text: Flamingo - url: https://www.flamingo.me/ - desc: A fast open-source framework based on Go with clean and scalable architecture - - text: Gin - url: https://gin-gonic.com/ - desc: A web framework written in Go, with a martini-like API. - - text: Gorilla - url: http://www.gorillatoolkit.org/ - desc: A web toolkit for the Go programming language. - - title: Routers - viewMoreUrl: https://pkg.go.dev/search?q=http%20router - items: - - text: julienschmidt/httprouter - url: https://pkg.go.dev/github.com/julienschmidt/httprouter?tab=overview - desc: A lightweight high performance HTTP request router - - text: gorilla/mux - url: https://pkg.go.dev/github.com/gorilla/mux?tab=overview - desc: A powerful HTTP router and URL matcher for building Go web servers with 🦍 - - text: Chi - url: https://pkg.go.dev/github.com/go-chi/chi?tab=overview - desc: A lightweight, idiomatic and composable router for building Go HTTP services. - - text: net/http - url: https://pkg.go.dev/net/http - desc: A standard library HTTP package - - title: Template Engines - viewMoreUrl: https://pkg.go.dev/search?q=templates - items: - - text: html/template - url: https://pkg.go.dev/html/template - desc: A standard library HTML template engine - - text: flosch/pongo2 - url: https://pkg.go.dev/github.com/flosch/pongo2?tab=overview - desc: A Django-syntax like templating-language - - title: Databases & Drivers - viewMoreUrl: https://pkg.go.dev/search?q=database%20OR%20sql - items: - - text: database/sql - url: https://pkg.go.dev/database/sql - desc: A standard library interface with driver support for MySQL, Postgres, Oracle, MS SQL, BigQuery and most SQL databases - - text: mongo-driver/mongo - url: https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo?tab=overview - desc: The MongoDB supported driver for Go - - text: olivere/elastic - url: https://pkg.go.dev/github.com/olivere/elastic?tab=overview - desc: A Elasticsearch client for Go - - text: GORM - url: https://gorm.io/ - desc: An ORM library for Go - - text: Bleve - url: http://blevesearch.com/ - desc: Full-text search and indexing for Go - - text: CockroachDB - url: https://www.cockroachlabs.com/ - desc: An evolution of the database—architected for the cloud to deliver resilient, consistent, distributed SQL at scale - - title: Web Libraries - viewMoreUrl: https://pkg.go.dev/search?q=web - items: - - text: markbates/goth - url: https://pkg.go.dev/github.com/markbates/goth?tab=overview - desc: Authentication for web apps - - text: jinzhu/gorm - url: https://pkg.go.dev/github.com/jinzhu/gorm?tab=overview - desc: An ORM library for Go - - text: dgrijalva/jwt-go - url: https://pkg.go.dev/github.com/dgrijalva/jwt-go?tab=overview - desc: A Go implementation of json web tokens - - title: Other Projects - items: - - text: gopherjs - url: https://pkg.go.dev/github.com/gopherjs/gopherjs?tab=overview - desc: A compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers. -`}} - -### Courses -* [Learn to Create Web Applications using Go](https://www.usegolang.com), a paid online course - -### Projects -* {{pkg "github.com/gopherjs/gopherjs" "gopherjs"}}, a compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers. -* [Hugo](https://gohugo.io/), The world’s fastest framework for building websites -* [Mattermost](https://mattermost.com/), a flexible, open source messaging platform -that enables secure team collaboration -* [Caddy](https://caddyserver.com/), a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go diff --git a/go.dev/content/solutions/webdev/webdev-green.svg b/go.dev/content/solutions/webdev/webdev-green.svg deleted file mode 100644 index b4e73efc..00000000 --- a/go.dev/content/solutions/webdev/webdev-green.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/content/solutions/webdev/webdev-white.svg b/go.dev/content/solutions/webdev/webdev-white.svg deleted file mode 100644 index 370f57e8..00000000 --- a/go.dev/content/solutions/webdev/webdev-white.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/content/solutions/wildlifestudios/index.md b/go.dev/content/solutions/wildlifestudios/index.md deleted file mode 100644 index 2f6b6176..00000000 --- a/go.dev/content/solutions/wildlifestudios/index.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -linkTitle: How Wildlife Studios builds backend systems in Go -description: Wildlife is a Brazilian native global company focused on mobile - gaming. We aim to develop games that will make billions of people happy. We - have almost 40 million daily active users, and we rely on Go as the main - language for our core platform, given its features to scale our backend - services. -logoSrc: wildlife.svg -layout: solution -company: Wildlife Studios -series: Case Studies -link: - https://medium.com/tech-at-wildlife-studios/pitaya-wildlifes-golang-go-af57865f7a11 -inLandingPageGrid: true ---- diff --git a/go.dev/content/solutions/wildlifestudios/logo.png b/go.dev/content/solutions/wildlifestudios/logo.png deleted file mode 100644 index 8d1c43b8..00000000 Binary files a/go.dev/content/solutions/wildlifestudios/logo.png and /dev/null differ diff --git a/go.dev/content/tos.md b/go.dev/content/tos.md deleted file mode 100644 index 7054d11b..00000000 --- a/go.dev/content/tos.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Terms of Service" -layout: article -date: 2019-11-05T15:47:16-05:00 ---- - -The Go website (the "Website") is hosted by Google. By using and/or visiting the Website, you consent to be bound by -Google's general Terms of Service and Google's general -Privacy Policy. diff --git a/go.dev/data/events.yaml b/go.dev/data/events.yaml deleted file mode 100644 index 12e0ba8b..00000000 --- a/go.dev/data/events.yaml +++ /dev/null @@ -1,290 +0,0 @@ -# DO NOT EDIT: Autogenerated from cmd/events. -# To update, run: -# go run github.com/godevsite/go.dev/cmd/events > data/events.yaml -all: -- city: Lehi - country: USA - description: |- - Join us on Slack!
    - The Utah Go User Group (#UTGO) is a community of people interested in software development and Google's Go programming language (Golang). Everyone is welcome.  We currently meet in Lehi. To discuss and vote on topic ideas, go to https://github.com/forgeutah/utah-go
    -
    - id: fnpgxrybcpbfb - local_date: Nov 3, 2020 - local_time: "2020-11-03T18:00:00-07:00" - localizedcountry: USA - localizedlocation: Lehi, UT - name: Utah Golang User Group (Reserve Mike Campbell) - photourl: https://secure.meetupstatic.com/photos/event/c/d/0/7/600_452692487.jpeg - state: UT - thumbnailurl: https://secure.meetupstatic.com/photos/event/c/d/0/7/thumb_452692487.jpeg - url: https://www.meetup.com/utahgophers/events/fnpgxrybcpbfb -- city: Eugene - country: USA - description: "All Gophers and curious software professionals are welcome to come - discuss Go and related topics.
    \nGo is a Google-funded language for massively-scalable - distributed systems that is statically typed and compiled. It has quickly stabilized - and is running head-to-head with C++, Java, C#, etc. (The Computer Language Benchmarks Game - Go). However, a larger-than-expected - portion of new Gophers is made up of dynamic/interpreted language users who tend - to be seeking relief from the cruft in their current languages and/or a more clear - future within the horizontally-growing landscape of modern computing.
    \nIf - you're building web apps, designing APIs, thrive on scalability, or you're - simply curious about this fun new(ish) language, let's meetup.
    \n• More - resources are available at www.euggo.org " - id: vjdnrrybcnbkb - local_date: Oct 7, 2020 - local_time: "2020-10-07T12:00:00-07:00" - localizedcountry: USA - localizedlocation: Eugene, OR - name: Book Club > Get Programming With Go - photourl: https://secure.meetupstatic.com/photos/event/2/8/1/600_453660641.jpeg - state: OR - thumbnailurl: https://secure.meetupstatic.com/photos/event/2/8/1/thumb_453660641.jpeg - url: https://www.meetup.com/EUG-Go/events/vjdnrrybcnbkb -- city: Berlin - country: Germany - description: |- - Join us on Slack: https://wwgberlin.herokuapp.com/ 
    - Follow us on Twitter: @WWGBerlin
    - Go (also known as Golang) is a great programming language to learn and develop in. We built this meetup to offer a better entry point to women who are interested in Go. We also want to provide a space for networking, learning and finding mentors. This group shall bring us together so we can continue to grow in Go.
    - You can become a WWG mentee if:
    - 1. You identify as female, publicly or privately 
    - 2. You have some interest in Go
    - Supporters of Women Who Go are welcome to join, especially as mentors. For the Go Study Groups, the mentee/learners spots will be given to women.
    - Feel free to check out our learning resources: https://github.com/wwgberlin/GoStudyGroup 
    Feel free to contribute to our resources by adding Go Tutorials to it!
    - For companies who want to host and sponsor Women Who Go Berlin: Please send us a msg through meetup or Twitter: @WWGBerlin - id: "273575858" - local_date: Oct 7, 2020 - local_time: "2020-10-07T19:00:00+02:00" - localizedcountry: Germany - localizedlocation: Berlin, Germany - name: 'Women Who Go Book club - chapter 2.1: The Parser part 2' - photourl: https://secure.meetupstatic.com/photos/event/6/6/9/3/600_452906259.jpeg - state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/6/6/9/3/thumb_452906259.jpeg - url: https://www.meetup.com/Women-Who-Go-Berlin/events/273575858 -- city: Jacksonville - country: USA - description: GoJax represents the North Florida Go community located in Duval, Baker, - Nassau,
    Clay, and St. Johns counties. There are a number of tech Meetup groups - in
    Jacksonville, but none of them address the Go programming language. We - plan on
    filling that gap. - id: "273628929" - local_date: Oct 7, 2020 - local_time: "2020-10-07T19:00:00-04:00" - localizedcountry: USA - localizedlocation: Jacksonville, FL - name: Go and Web Assembly - photourl: "" - state: FL - thumbnailurl: "" - url: https://www.meetup.com/meetup-group-fuSlbVYy/events/273628929 -- city: Orlando - country: USA - description: Orlando's first meetup group dedicated to the Go Programming Language. - All skill levels are welcome - whether you're a beginner or a full-fledged - gopher. - id: "273460434" - local_date: Oct 7, 2020 - local_time: "2020-10-07T19:00:00-04:00" - localizedcountry: USA - localizedlocation: Orlando, FL - name: Orlando Go Monthly Meetup (Online!) - Go & Web Assembly - photourl: https://secure.meetupstatic.com/photos/event/9/7/c/4/600_441638852.jpeg - state: FL - thumbnailurl: https://secure.meetupstatic.com/photos/event/9/7/c/4/thumb_441638852.jpeg - url: https://www.meetup.com/OrlanGo/events/273460434 -- city: Atlanta - country: USA - description: |- - Go Users Group Atlanta is a meeting place for people interested in developing and promoting the local Go development community.
    - Many of us hang out in #golang on Tech404 - id: "273303769" - local_date: Oct 8, 2020 - local_time: "2020-10-08T18:30:00-04:00" - localizedcountry: USA - localizedlocation: Atlanta, GA - name: October Go Virtual Meetup ft. Bill Kennedy on Go Generics - photourl: https://secure.meetupstatic.com/photos/event/a/6/8/8/600_355422632.jpeg - state: GA - thumbnailurl: https://secure.meetupstatic.com/photos/event/a/6/8/8/thumb_355422632.jpeg - url: https://www.meetup.com/Go-Users-Group-Atlanta/events/273303769 -- city: Berlin - country: Germany - description: |- - We are a group of Golang users. Our aim is to meet like minded people, share our experience with others and to promote the use of Go.
    - As Gophers and as Berliners, even if just visiting, we follow the Code of Conduct to make this a pleasant and inclusive environment for everyone:

    - https://golang.org/conduct
    http://berlincodeofconduct.org
    - Follow us on twitter: @GDGBerlinGolang
    - You can get our special group swag here: https://shop.spreadshirt.de/gdg-golang-berlin
    - id: "271795652" - local_date: Oct 14, 2020 - local_time: "2020-10-14T19:00:00+02:00" - localizedcountry: Germany - localizedlocation: Berlin, Germany - name: '[online] October Golang meetup' - photourl: https://secure.meetupstatic.com/photos/event/9/8/b/1/600_465459089.jpeg - state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/9/8/b/1/thumb_465459089.jpeg - url: https://www.meetup.com/golang-users-berlin/events/271795652 -- city: Seattle - country: USA - description: |- - The Seattle Go User Group is a community for anyone interested in the Go programming language. 

    -

    - We provide opportunities to:
    - • Discuss Go and related topics 
    - • Socialize with people who are interested in Go
    - • Find or fill Go-related jobs 
    -

    - If you want to chat all things Go, feel free to join us on the Gopher slack. 
    - Invites can be found at https://invite.slack.golangbridge.org
    - There is a #seattle channel which can be joined by anyone, so come say hi!
    -

    - Our aim is to be a welcoming environment. As such all attendees, organizers and sponsors are required to follow the code of conduct. - id: rksdvrybcnbsb - local_date: Oct 14, 2020 - local_time: "2020-10-14T13:00:00-07:00" - localizedcountry: USA - localizedlocation: Seattle, WA - name: Eastside Go Coffee - photourl: https://secure.meetupstatic.com/photos/event/a/4/b/e/600_450342174.jpeg - state: WA - thumbnailurl: https://secure.meetupstatic.com/photos/event/a/4/b/e/thumb_450342174.jpeg - url: https://www.meetup.com/golang/events/rksdvrybcnbsb -- city: Belfast - country: United Kingdom - description: |- - Belfast Gophers, aka The Go Belfast User Group (GBUG), are a Belfast-based community for anyone interested in the Go programming language. Belfast Gophers held their first Meet-up 2016, and since then the group has grown to over 300 gophers.

    - Membership of Belfast Gophers is managed via our Meetup page; everyone is welcome! We also have an active Twitter feed and we've recently set-up the #belfast channel on Gophers Slack (sign-up here).

    -

    - Contact
    - Twitter: @belfast_gopher
    - Email: info@belfastgophers.com
    -

    - Code of Conduct
    - Belfast Gophers operate under the Go Community Code of Conduct.
    -

    - Swag
    We have swag on Redbubble for anyone wanting a Belfast Gopher's t-shirt or other swag, you only pay Redbubble we don't take any fee for these. 
    -

    -

    -

    -
    - id: "273346208" - local_date: Oct 15, 2020 - local_time: "2020-10-15T18:00:00+01:00" - localizedcountry: United Kingdom - localizedlocation: Belfast, United Kingdom - name: 'Oto: Pace’s lightweight JSON/HTTP RPC thing' - photourl: "" - state: "" - thumbnailurl: "" - url: https://www.meetup.com/Belfast-Gophers/events/273346208 -- city: Guadalajara - country: Mexico - description: Comunidad enfocada en dar a conocer el lenguaje Golang y generar un - espacio donde se pueda compartir conocimientos, proyectos y experiencias entorno - a este gran lenguaje. En las reuniones se presentan un par de pláticas o talleres - relacionados con Golang. Networking al finalizar.

    Síguenos en:

    Facebook
    -
    YouTube
    - id: "273759040" - local_date: Oct 15, 2020 - local_time: "2020-10-15T18:30:00-05:00" - localizedcountry: Mexico - localizedlocation: Guadalajara, Mexico - name: Golang Guadalajara Meetup - Octubre 2020 - photourl: "" - state: "" - thumbnailurl: "" - url: https://www.meetup.com/Golang-Guadalajara/events/273759040 -- city: Leipzig - country: Germany - description: |- - We enjoy using Go and we are curious about the language, its features and applications, especially in the context of cloud computing and infrastructure.
    - Our goal is to establish a place, where people from all backgrounds interested in the Go programming language and various cloud technologies can meet, learn, share experiences, present, discuss and network.
    - We aim to be a welcoming community, respecting Gopher values, as outlined here: https://golang.org/conduct.
    -

    - Find out more on: https://golangleipzig.space/ and https://github.com/golang-leipzig

    - Since March 2019, we are part of the Go Developer Network:
    - https://blog.golang.org/go-developer-network
    -
    - id: "268785569" - local_date: Oct 16, 2020 - local_time: "2020-10-16T19:00:00+02:00" - localizedcountry: Germany - localizedlocation: Leipzig, Germany - name: 'Leipzig Golang Meetup #13' - photourl: "" - state: "" - thumbnailurl: "" - url: https://www.meetup.com/Leipzig-Golang/events/268785569 -- city: Gurgaon - country: India - description: |- - This group is for people interested in learning both the programming language Go(lang), and how to build interesting things with it. We will aim the first few sessions at beginner-intermediate levels and maybe later introduce some high-level talks.
    - WE ARE ACTIVELY LOOKING FOR MEETUP VENUES.
    - Want to help organise/volunteer? - Come say hi and meet fellow gophers on Slack. - id: szcfmrybcnbwb - local_date: Oct 17, 2020 - local_time: "2020-10-17T11:00:00+05:30" - localizedcountry: India - localizedlocation: Gurgaon, India - name: Golang Gurgaon Meetup - photourl: https://secure.meetupstatic.com/photos/event/c/e/4/5/600_473932805.jpeg - state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/c/e/4/5/thumb_473932805.jpeg - url: https://www.meetup.com/Gurgaon-Go-Meetup/events/szcfmrybcnbwb -- city: Graz - country: Austria - description: |- - Die Programmiersprache Go hat einen Grazer "Stammtisch". 
    - Wir treffen uns jeden 2. Montag im Monat bei TAO Digital am Lendplatz.
    - Schau einfach vorbei oder besuche uns online unter GoGraz!
    - id: fxlkwrybcnbzb - local_date: Oct 19, 2020 - local_time: "2020-10-19T19:00:00+02:00" - localizedcountry: Austria - localizedlocation: Graz, Austria - name: Go Language Usergroup Graz - photourl: https://secure.meetupstatic.com/photos/event/3/3/e/0/600_459373280.jpeg - state: "" - thumbnailurl: https://secure.meetupstatic.com/photos/event/3/3/e/0/thumb_459373280.jpeg - url: https://www.meetup.com/Graz-Open-Source-Meetup/events/fxlkwrybcnbzb -- city: Bournemouth - country: United Kingdom - description: |- - Golang Dorset
    - is a user group for people interested in the
    - Go programming language and assorted related technologies and methodologies (kubernetes / docker / DevOps etc)

    - We aim to meet every month in central Bournemouth.
    ---

    - We want to give everyone a chance to learn, or improve their skills with Go by practicing it, organizing workshops and talks, and mingling along like-minded individuals.
    - Any level of proficiency (or none at all) is welcome. 
    - All code and slides from examples are available in the github repo github.com/golangdorset 

    - Join us on Slack!
    - id: qfdjvrybcnbzb - local_date: Oct 19, 2020 - local_time: "2020-10-19T19:00:00+01:00" - localizedcountry: United Kingdom - localizedlocation: Bournemouth, United Kingdom - name: Golang Dorset Monthly Meetup - photourl: "" - state: "" - thumbnailurl: "" - url: https://www.meetup.com/Golang-Dorset/events/qfdjvrybcnbzb -- city: Reston - country: USA - description: |- - (from golang.org)

    -
    - The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. - id: cmkwtrybcnbcc - local_date: Oct 21, 2020 - local_time: "2020-10-21T19:00:00-04:00" - localizedcountry: USA - localizedlocation: Reston, VA - name: Golang Reston Monthly Meetup - photourl: https://secure.meetupstatic.com/photos/event/7/f/7/600_433982039.jpeg - state: VA - thumbnailurl: https://secure.meetupstatic.com/photos/event/7/f/7/thumb_433982039.jpeg - url: https://www.meetup.com/Golang-Reston/events/cmkwtrybcnbcc diff --git a/go.dev/data/learn/books.yaml b/go.dev/data/learn/books.yaml deleted file mode 100644 index 33c18391..00000000 --- a/go.dev/data/learn/books.yaml +++ /dev/null @@ -1,26 +0,0 @@ -links: - - title: The Go Programming Language - description: Alan A. A. Donovan, Brian W. Kernighan - cta: View - url: https://www.gopl.io/ - thumbnail: /images/learn/go-programming-language-book.png - - title: Get Programming with Go - description: Nathan Youngman, Roger Peppé - cta: Manning.com - url: https://www.manning.com/books/get-programming-with-go - thumbnail: /images/learn/get-programming-with-go.jpeg - - title: Go Programming Blueprints - description: This is the official source code repository for the book. - cta: View on Github - url: https://github.com/matryer/goblueprints - thumbnail: /images/learn/go-programming-blueprints.png - - title: Introducing Go - description: Caleb Doxsey - cta: View on O’Reilly.com - url: http://shop.oreilly.com/product/0636920046516.do - thumbnail: /images/learn/introducing-go-book.png - - title: Concurrency in Go - description: Katherine Cox-Buday - cta: View on O’Reilly.com - url: https://www.oreilly.com/library/view/concurrency-in-go/9781491941294/ - thumbnail: /images/learn/concurrency-in-go.png diff --git a/go.dev/data/learn/cloud.yaml b/go.dev/data/learn/cloud.yaml deleted file mode 100644 index c242cd74..00000000 --- a/go.dev/data/learn/cloud.yaml +++ /dev/null @@ -1,25 +0,0 @@ -links: - - title: Deploy Go Apps on Google Cloud Serverless Platforms - url: https://google.qwiklabs.com/focuses/10532?parent=catalog - thumbnail: /images/learn/qwiklabs.png - length: 1h 10m - credits: 5 - rating: 4.25 - - title: Use Go Code to Work with Google Cloud Data Sources - url: https://google.qwiklabs.com/focuses/10531?parent=catalog - thumbnail: /images/learn/qwiklabs.png - length: 1h 10m - credits: 5 - rating: 4.25 - - title: Getting Started with Go on App Engine - url: https://google.qwiklabs.com/focuses/2754?catalog_rank=%7B%22rank%22%3A1%2C%22num_filters%22%3A0%2C%22has_search%22%3Atrue%7D&parent=catalog&search_id=5407947 - thumbnail: /images/learn/qwiklabs.png - length: 20m - credits: 1 - rating: 4.15 - - title: HTTP Google Cloud Functions in Go - url: https://google.qwiklabs.com/focuses/5171?catalog_rank=%7B%22rank%22%3A1%2C%22num_filters%22%3A0%2C%22has_search%22%3Atrue%7D&parent=catalog&search_id=5407953 - thumbnail: /images/learn/qwiklabs.png - length: 40m - credits: 5 - rating: 4.5 diff --git a/go.dev/data/learn/courses.yaml b/go.dev/data/learn/courses.yaml deleted file mode 100644 index d69c1b23..00000000 --- a/go.dev/data/learn/courses.yaml +++ /dev/null @@ -1,25 +0,0 @@ -links: - - title: Codecademy - content: This course covers setting up a Go environment, the fundamentals of - Go, and will walk you through building a few sample projects. - url: https://www.codecademy.com/learn/learn-go?utm_source=customer_io&utm_campaign=oct_21_golaunch&utm_medium=email&utm_content=header_img - thumbnail: /images/learn/codecademy.png - cta: Learn more - - title: Exercism.io - content: Tackle community-sourced Go challenges in this interactive course, - working with other participants and mentors along the way. - url: https://exercism.io/tracks/go - thumbnail: /images/learn/exercism.png - cta: Learn more - - title: Google Developers Codelabs - content: Get started with a free codelab that walks you through using Go to - build and publish a Google Cloud Function. - url: https://codelabs.developers.google.com/codelabs/cloud-functions-go-http/#0 - thumbnail: /images/learn/codelabs.png - cta: Learn more - - title: Gophercises - content: Build your confidence in using Go with this course, where you’ll - build roughly twenty different Go applications. - url: https://gophercises.com/ - thumbnail: /images/learn/gophercises.png - cta: Learn more diff --git a/go.dev/data/learn/guidedLearning.yaml b/go.dev/data/learn/guidedLearning.yaml deleted file mode 100644 index 86b64497..00000000 --- a/go.dev/data/learn/guidedLearning.yaml +++ /dev/null @@ -1,26 +0,0 @@ -links: - - title: Web Dev - content: Go Web Examples provides easy to understand code snippets on - how to use Go for web development. - url: https://gowebexamples.com - thumbnail: /images/learn/web-dev.png - cta: Learn more - - title: CLIs - content: This workshop will walk you through building a CLI app with Go, - introducing you to basic Go principles and CLI frameworks along the way. - url: https://spf13.com/presentation/building-an-awesome-cli-app-in-go-oscon/ - thumbnail: /images/learn/clis.png - cta: Learn more - - title: New to coding? - content: Get started with this introductory course covering basic - programming principles and Go fundamentals. - url: https://www.youtube.com/watch?v=Q0sKAMal4WQ - thumbnail: /images/learn/edureka.png - cta: Learn more - - title: Go by example - content: Go by Example is a hands-on introduction to Go using annotated - example programs. It’s a great starting point to use when tackling any Go - project. - url: https://gobyexample.com/ - thumbnail: /images/learn/gobyexample.png - cta: Learn more diff --git a/go.dev/data/learn/inPerson.yaml b/go.dev/data/learn/inPerson.yaml deleted file mode 100644 index 8cbdadf5..00000000 --- a/go.dev/data/learn/inPerson.yaml +++ /dev/null @@ -1,21 +0,0 @@ -links: - - title: Ardan Labs - url: https://www.ardanlabs.com/ - thumbnail: - blurb: Offering customized on-site live training classes. - - title: Gopher Guides - url: https://www.gopherguides.com/ - thumbnail: - blurb: Customized In-person, remote, and online training classes. Training for Developers by Developers. - - title: Boss Sauce Creative - url: https://bosssauce.it/services/training - thumbnail: - blurb: Personalized or track-based Go training for teams. - - title: Shiju Varghese - url: https://github.com/shijuvar/gokit/tree/master/training - thumbnail: - blurb: On-site classroom training on Go and consulting on distributed systems architectures, in India. - - title: kkoehler - url: https://golang.kkoehler.com/ - thumbnail: - blurb: In-Person class trainings for Go in Germany, Austria and Switzerland. diff --git a/go.dev/data/learn/quickstart.yaml b/go.dev/data/learn/quickstart.yaml deleted file mode 100644 index 0578bb7b..00000000 --- a/go.dev/data/learn/quickstart.yaml +++ /dev/null @@ -1,16 +0,0 @@ -links: - - title: Documentation - content: Everything there is to know about Go. Get started on a new project - or brush up for your existing Go code. - cta: View documentation - url: https://golang.org/doc/install - - title: Tour of Go - content: An interactive introduction to Go in three sections. Each section - concludes with a few exercises so you can practice what you've learned. - cta: Take a tour - url: https://tour.golang.org - - title: Playground - content: The Playground allows anyone with a web browser to write Go code - that we immediately compile, link, and run on our servers. - cta: Go to playground - url: https://play.golang.org diff --git a/go.dev/data/menus.yaml b/go.dev/data/menus.yaml deleted file mode 100644 index e902090d..00000000 --- a/go.dev/data/menus.yaml +++ /dev/null @@ -1,63 +0,0 @@ -main: - - name: Why Go - url: https://go.dev/solutions - - name: Getting Started - url: https://learn.go.dev - - name: Discover Packages - url: https://pkg.go.dev - - name: About - url: https://go.dev/about - -footer: - - name: Why Go - url: https://go.dev/solutions - children: - - name: Use Cases - url: https://go.dev/solutions#use-cases - - name: Case Studies - url: https://go.dev/solutions#case-studies - - - name: Getting Started - url: https://go.dev/learn - children: - - name: Playground - url: https://play.golang.org - - name: Tour - url: https://tour.golang.org - - name: Stack Overflow - url: https://stackoverflow.com/questions/tagged/go?tab=Newest - - - name: Discover Packages - url: https://pkg.go.dev - - - name: About - url: https://go.dev/about - children: - - name: Download - url: https://golang.org/dl/ - - name: Blog - url: https://blog.golang.org - - name: Issue Tracker - url: https://github.com/golang/go/issues - - name: Release Notes - url: https://golang.org/doc/devel/release.html - - name: Brand Guidelines - url: https://blog.golang.org/go-brand - - name: Code of Conduct - url: https://golang.org/conduct - - - name: Connect - url: https://www.twitter.com/golang - children: - - name: Twitter - url: https://www.twitter.com/golang - - name: Github - url: https://github.com/golang - - name: Slack - url: https://invite.slack.golangbridge.org/ - - name: r/golang - url: https://reddit.com/r/golang - - name: Meetup - url: https://www.meetup.com/pro/go - - name: Golang Weekly - url: https://golangweekly.com/ diff --git a/go.dev/data/resources.yaml b/go.dev/data/resources.yaml deleted file mode 100644 index caea2c70..00000000 --- a/go.dev/data/resources.yaml +++ /dev/null @@ -1,57 +0,0 @@ -resources: - - title: Cloud & Network Services - description: "With a strong ecosystem of tools and APIs on major cloud providers, it is easier than ever to build services with Go." - link: /solutions/cloud/ - icon: /images/icons/sphere.svg - iconName: Sphere - packages: - - title: cloud.google.com/go - url: https://cloud.google.com/go/home - - title: aws/client - url: https://aws.amazon.com/sdk-for-go/ - - title: Azure/azure-sdk-for-go - url: https://github.com/Azure/azure-sdk-for-go - - title: Command-line Interfaces - description: "With popular open source packages and a robust standard library, use Go to create fast and elegant CLIs." - link: /solutions/clis/ - icon: /images/icons/command-folder.svg - iconName: Command Line - packages: - - title: spf13/cobra - url: https://github.com/spf13/cobra - - title: spf13/viper - url: https://github.com/spf13/viper - - title: urfave/cli - url: https://github.com/urfave/cli - - title: delve - url: https://github.com/go-delve/delve - - title: chzyer/readline - url: https://github.com/chzyer/readline - - title: Web Development - description: "With enhanced memory performance and support for several IDEs, Go powers fast and scalable web applications." - link: /solutions/webdev/ - icon: /images/icons/code.svg - iconName: Code - packages: - - title: net/http - url: https://golang.org/pkg/net/http/ - - title: html/template - url: https://golang.org/pkg/html/template/ - - title: flosch/pongo2 - url: https://github.com/flosch/pongo2 - - title: database/sql - url: https://golang.org/pkg/database/sql/ - - title: olivere/elastic - url: https://github.com/olivere/elastic - - title: DevOps & Site Reliability - description: "With fast build times, lean syntax, an automatic formatter and doc generator, Go is built to support both DevOps and SRE." - link: /solutions/devops/ - icon: /images/icons/gear.svg - iconName: Sphere - packages: - - title: opentracing/opentracing-go - url: https://github.com/opentracing/opentracing-go - - title: istio/istio - url: https://github.com/istio/istio - - title: urfave/cli - url: https://github.com/urfave/cli \ No newline at end of file diff --git a/go.dev/data/site.yaml b/go.dev/data/site.yaml deleted file mode 100644 index 68788756..00000000 --- a/go.dev/data/site.yaml +++ /dev/null @@ -1,2 +0,0 @@ -url: https://go.dev/ -title: go.dev diff --git a/go.dev/data/testimonials.yaml b/go.dev/data/testimonials.yaml deleted file mode 100644 index d381f6b5..00000000 --- a/go.dev/data/testimonials.yaml +++ /dev/null @@ -1,55 +0,0 @@ -all: -- name: Jaime Enrique Garcia Lopez - title: Senior Software Development Manager - company: Capital One - quote: |- - “At the time, no single team member knew Go, but - within a month, everyone was writing in Go and we were - building out the endpoints. It was the flexibility, how easy it was to use, - and the really cool concept behind Go (how Go handles native concurrency, - garbage collection, and of course safety+speed.) that helped engage us - during the build. Also, who can beat that cute mascot!” -- name: Clayton Coleman - title: Lead Engineer, Open Shift - company: RedHat - quote: |- - "A small language that compiles fast makes for a happy developer. - The Go language is small, compiles really fast, and as a result it lets your - mind focus on the actual problem and less on the tool you are using to solve - it. Code, test, debug cycles are so quick that you forget you are not - working with an interpreted language. Looking at our code, you see - less boilerplate and more business logic." -- name: Matt Boyle - title: Lead Software Engineer - company: Curve - quote: |- - “Go has excellent characteristics for scalability and services - written using it typically have very small memory footprints. - Because code is compiled into a single static binary, services can also be - containerised with ease, making it much simpler to build and deploy. These - attributes make Go an ideal choice for companies building - microservices, as you can easily deploy into a highly available and - scalable environment such as Kubernetes.” -- name: Bala Natarajan - title: Sr. Director of Engineering, Developer Experience - company: PayPal - quote: |- - "In our tightly managed environments where we run Go code, - we have seen a CPU reduction of approximately 10% - with cleaner and maintainable code." -- name: Benjamin Cane - title: Vice President and Principal Engineer - company: American Express - quote: |- - "Tooling has always been a problem with our legacy code base... but we have - found that Go has excellent tooling, plus built-in testing, benchmarking, - and profiling frameworks. It is easy to write efficient and resilient - applications. After working on Go, most of our developers don't want - to go back to other languages." -- name: John Biggs and Ben Popper - title: - company: Stack Overflow - quote: |- - "...when a programming language is designed for exactly the environment most - of us use right now—scalable, cloud-based servers that are optimized for - performance—a lot can go right." \ No newline at end of file diff --git a/go.dev/layouts/article.tmpl b/go.dev/layouts/article.tmpl deleted file mode 100644 index 1fa6431d..00000000 --- a/go.dev/layouts/article.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -{{define "layout"}} -
    -

    {{.Title}}

    - {{.Content}} -
    -{{end}} \ No newline at end of file diff --git a/go.dev/layouts/default.tmpl b/go.dev/layouts/default.tmpl deleted file mode 100644 index ae82f437..00000000 --- a/go.dev/layouts/default.tmpl +++ /dev/null @@ -1,3 +0,0 @@ -{{define "layout"}} -{{.Content}} -{{end}} diff --git a/go.dev/layouts/site.tmpl b/go.dev/layouts/site.tmpl deleted file mode 100644 index 6df7d21e..00000000 --- a/go.dev/layouts/site.tmpl +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - - - - - -{{$styles := resources.Get "css/styles.css" -}} -{{$stylesFP := $styles | fingerprint -}} - - - - - -{{.Title}}{{if not .IsHome}} - go.dev{{end}} -{{if (isset .Params "link") -}} - -{{end -}} - - - - - - - - -
    - {{- block "layout" . -}}{{- end -}} -
    - - - - -{{define "search-form"}} - -{{end}} diff --git a/go.dev/layouts/solution.tmpl b/go.dev/layouts/solution.tmpl deleted file mode 100644 index 8f219009..00000000 --- a/go.dev/layouts/solution.tmpl +++ /dev/null @@ -1,83 +0,0 @@ -{{define "layout"}} -
    -
    -
    -
    -
    - {{breadcrumbs .}} -

    {{.Title}}

    - {{range .Params.authors}} - - {{end}} - {{if isset .Params "date"}} - - {{end}} -
    - {{if isset .Params "company"}} -
    - {{.Params.company }} -
    - {{end}} -
    -
    - -
    -
    - {{if (eq .Params.Series "Case Studies") }} -
    -
    - {{.Content}} -
    -
    -
    - {{$logo := .Resources.GetMatch "logo"}} - {{.Params.company}} -

    - About {{.Params.company}} -

    - {{if isset .Params "description"}} -

    {{- .Params.description | markdownify -}}

    - {{ else }} -

    {{- .Params.quote | markdownify -}}

    - {{end}} -
    -
    -
    - {{else if (eq .Params.Series "Use Cases") }} -
    -
    - -
    -
    - - {{ if .Params.inlineMessage }} - - {{ end }} - {{.Content | replaceRE " .sectionHeading" "\" class=\"sectionHeading" | safeHTML}} -
    -
    - {{end}} -
    -
    -{{end}} diff --git a/go.dev/static/images/SCN_magnifying_glass_cloud_site.png b/go.dev/static/images/SCN_magnifying_glass_cloud_site.png deleted file mode 100644 index 17c31360..00000000 Binary files a/go.dev/static/images/SCN_magnifying_glass_cloud_site.png and /dev/null differ diff --git a/go.dev/static/images/adobe-logo.png b/go.dev/static/images/adobe-logo.png deleted file mode 100644 index 044c811b..00000000 Binary files a/go.dev/static/images/adobe-logo.png and /dev/null differ diff --git a/go.dev/static/images/books/building-microservices-with-go.jpg b/go.dev/static/images/books/building-microservices-with-go.jpg deleted file mode 100644 index 8891f281..00000000 Binary files a/go.dev/static/images/books/building-microservices-with-go.jpg and /dev/null differ diff --git a/go.dev/static/images/books/building-restful-web-services-with-go.jpg b/go.dev/static/images/books/building-restful-web-services-with-go.jpg deleted file mode 100644 index 52e65dd2..00000000 Binary files a/go.dev/static/images/books/building-restful-web-services-with-go.jpg and /dev/null differ diff --git a/go.dev/static/images/books/go-in-action.jpg b/go.dev/static/images/books/go-in-action.jpg deleted file mode 100644 index 41f613b0..00000000 Binary files a/go.dev/static/images/books/go-in-action.jpg and /dev/null differ diff --git a/go.dev/static/images/books/go-programming-for-network-operations.jpg b/go.dev/static/images/books/go-programming-for-network-operations.jpg deleted file mode 100644 index 5c0e61aa..00000000 Binary files a/go.dev/static/images/books/go-programming-for-network-operations.jpg and /dev/null differ diff --git a/go.dev/static/images/books/go-web-development-cookbook.jpg b/go.dev/static/images/books/go-web-development-cookbook.jpg deleted file mode 100644 index 3243d62b..00000000 Binary files a/go.dev/static/images/books/go-web-development-cookbook.jpg and /dev/null differ diff --git a/go.dev/static/images/books/go-web-programming.jpg b/go.dev/static/images/books/go-web-programming.jpg deleted file mode 100644 index af352b6c..00000000 Binary files a/go.dev/static/images/books/go-web-programming.jpg and /dev/null differ diff --git a/go.dev/static/images/books/hands-on-software-architecture-with-golang.jpg b/go.dev/static/images/books/hands-on-software-architecture-with-golang.jpg deleted file mode 100644 index 1b9d507e..00000000 Binary files a/go.dev/static/images/books/hands-on-software-architecture-with-golang.jpg and /dev/null differ diff --git a/go.dev/static/images/books/mastering-go-web-services.jpg b/go.dev/static/images/books/mastering-go-web-services.jpg deleted file mode 100644 index 2772ea58..00000000 Binary files a/go.dev/static/images/books/mastering-go-web-services.jpg and /dev/null differ diff --git a/go.dev/static/images/books/powerful-command-line-applications-in-go.jpg b/go.dev/static/images/books/powerful-command-line-applications-in-go.jpg deleted file mode 100644 index 548e7925..00000000 Binary files a/go.dev/static/images/books/powerful-command-line-applications-in-go.jpg and /dev/null differ diff --git a/go.dev/static/images/books/web-development-with-go.jpg b/go.dev/static/images/books/web-development-with-go.jpg deleted file mode 100644 index a93db9f2..00000000 Binary files a/go.dev/static/images/books/web-development-with-go.jpg and /dev/null differ diff --git a/go.dev/static/images/close-24px.svg b/go.dev/static/images/close-24px.svg deleted file mode 100644 index dea86781..00000000 --- a/go.dev/static/images/close-24px.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/companies-using-go-hero.svg b/go.dev/static/images/companies-using-go-hero.svg deleted file mode 100644 index 94a9d871..00000000 --- a/go.dev/static/images/companies-using-go-hero.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/go.dev/static/images/device-information.png b/go.dev/static/images/device-information.png deleted file mode 100644 index d0a33311..00000000 Binary files a/go.dev/static/images/device-information.png and /dev/null differ diff --git a/go.dev/static/images/empty_case_study.png b/go.dev/static/images/empty_case_study.png deleted file mode 100644 index 0b1fb454..00000000 Binary files a/go.dev/static/images/empty_case_study.png and /dev/null differ diff --git a/go.dev/static/images/empty_case_study_2.png b/go.dev/static/images/empty_case_study_2.png deleted file mode 100644 index 290d9a48..00000000 Binary files a/go.dev/static/images/empty_case_study_2.png and /dev/null differ diff --git a/go.dev/static/images/go-logo-blue.svg b/go.dev/static/images/go-logo-blue.svg deleted file mode 100644 index da6ea83d..00000000 --- a/go.dev/static/images/go-logo-blue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/go-logo-white.svg b/go.dev/static/images/go-logo-white.svg deleted file mode 100644 index 727a62ee..00000000 --- a/go.dev/static/images/go-logo-white.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/go_amex_case_study.png b/go.dev/static/images/go_amex_case_study.png deleted file mode 100644 index d6dba100..00000000 Binary files a/go.dev/static/images/go_amex_case_study.png and /dev/null differ diff --git a/go.dev/static/images/go_amex_case_study_logo.png b/go.dev/static/images/go_amex_case_study_logo.png deleted file mode 100644 index d2f6a223..00000000 Binary files a/go.dev/static/images/go_amex_case_study_logo.png and /dev/null differ diff --git a/go.dev/static/images/go_at&t_case_study.png b/go.dev/static/images/go_at&t_case_study.png deleted file mode 100644 index a115a3e3..00000000 Binary files a/go.dev/static/images/go_at&t_case_study.png and /dev/null differ diff --git a/go.dev/static/images/go_at_t_case_study_logo.png b/go.dev/static/images/go_at_t_case_study_logo.png deleted file mode 100644 index bb57455f..00000000 Binary files a/go.dev/static/images/go_at_t_case_study_logo.png and /dev/null differ diff --git a/go.dev/static/images/go_chrome_case_study.png b/go.dev/static/images/go_chrome_case_study.png deleted file mode 100644 index 4e22e431..00000000 Binary files a/go.dev/static/images/go_chrome_case_study.png and /dev/null differ diff --git a/go.dev/static/images/go_core_data_case_study.png b/go.dev/static/images/go_core_data_case_study.png deleted file mode 100644 index 2da16d14..00000000 Binary files a/go.dev/static/images/go_core_data_case_study.png and /dev/null differ diff --git a/go.dev/static/images/go_firebase_case_study.png b/go.dev/static/images/go_firebase_case_study.png deleted file mode 100644 index 5b35bfd2..00000000 Binary files a/go.dev/static/images/go_firebase_case_study.png and /dev/null differ diff --git a/go.dev/static/images/go_google_case_study_carousel.png b/go.dev/static/images/go_google_case_study_carousel.png deleted file mode 100644 index 885c400f..00000000 Binary files a/go.dev/static/images/go_google_case_study_carousel.png and /dev/null differ diff --git a/go.dev/static/images/go_mercadolibre_case_study.png b/go.dev/static/images/go_mercadolibre_case_study.png deleted file mode 100644 index 07679222..00000000 Binary files a/go.dev/static/images/go_mercadolibre_case_study.png and /dev/null differ diff --git a/go.dev/static/images/go_mercadolibre_case_study_logo.png b/go.dev/static/images/go_mercadolibre_case_study_logo.png deleted file mode 100644 index 822c6c39..00000000 Binary files a/go.dev/static/images/go_mercadolibre_case_study_logo.png and /dev/null differ diff --git a/go.dev/static/images/go_paypal_case_study.png b/go.dev/static/images/go_paypal_case_study.png deleted file mode 100644 index eb96d7df..00000000 Binary files a/go.dev/static/images/go_paypal_case_study.png and /dev/null differ diff --git a/go.dev/static/images/go_paypal_case_study_logo.png b/go.dev/static/images/go_paypal_case_study_logo.png deleted file mode 100644 index b1dde6e7..00000000 Binary files a/go.dev/static/images/go_paypal_case_study_logo.png and /dev/null differ diff --git a/go.dev/static/images/go_sitereliability_case_study.png b/go.dev/static/images/go_sitereliability_case_study.png deleted file mode 100644 index 51241c5d..00000000 Binary files a/go.dev/static/images/go_sitereliability_case_study.png and /dev/null differ diff --git a/go.dev/static/images/google-grey.png b/go.dev/static/images/google-grey.png deleted file mode 100644 index 36b90cc3..00000000 Binary files a/go.dev/static/images/google-grey.png and /dev/null differ diff --git a/go.dev/static/images/google-logo.png b/go.dev/static/images/google-logo.png deleted file mode 100644 index 05764e7d..00000000 Binary files a/go.dev/static/images/google-logo.png and /dev/null differ diff --git a/go.dev/static/images/google-logo.svg b/go.dev/static/images/google-logo.svg deleted file mode 100644 index 796ed0c3..00000000 --- a/go.dev/static/images/google-logo.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - diff --git a/go.dev/static/images/google-white.png b/go.dev/static/images/google-white.png deleted file mode 100644 index c55ee301..00000000 Binary files a/go.dev/static/images/google-white.png and /dev/null differ diff --git a/go.dev/static/images/gopher-footer.jpg b/go.dev/static/images/gopher-footer.jpg deleted file mode 100644 index fafe1045..00000000 Binary files a/go.dev/static/images/gopher-footer.jpg and /dev/null differ diff --git a/go.dev/static/images/gophers/biplane.svg b/go.dev/static/images/gophers/biplane.svg deleted file mode 100644 index e5101401..00000000 --- a/go.dev/static/images/gophers/biplane.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/blue.svg b/go.dev/static/images/gophers/blue.svg deleted file mode 100644 index 55055400..00000000 --- a/go.dev/static/images/gophers/blue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/factory.png b/go.dev/static/images/gophers/factory.png deleted file mode 100644 index d94dfb48..00000000 Binary files a/go.dev/static/images/gophers/factory.png and /dev/null differ diff --git a/go.dev/static/images/gophers/front.svg b/go.dev/static/images/gophers/front.svg deleted file mode 100644 index 8d7b916e..00000000 --- a/go.dev/static/images/gophers/front.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/graduate-colorized.svg b/go.dev/static/images/gophers/graduate-colorized.svg deleted file mode 100644 index 2ad4a30e..00000000 --- a/go.dev/static/images/gophers/graduate-colorized.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/graduate.svg b/go.dev/static/images/gophers/graduate.svg deleted file mode 100644 index 3aed2ea4..00000000 --- a/go.dev/static/images/gophers/graduate.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/green.svg b/go.dev/static/images/gophers/green.svg deleted file mode 100644 index c1660ba7..00000000 --- a/go.dev/static/images/gophers/green.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/grey.svg b/go.dev/static/images/gophers/grey.svg deleted file mode 100644 index d88756e3..00000000 --- a/go.dev/static/images/gophers/grey.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/happy.svg b/go.dev/static/images/gophers/happy.svg deleted file mode 100644 index 91f670de..00000000 --- a/go.dev/static/images/gophers/happy.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/headlamp-colorized.svg b/go.dev/static/images/gophers/headlamp-colorized.svg deleted file mode 100644 index 47b3de62..00000000 --- a/go.dev/static/images/gophers/headlamp-colorized.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/headlamp.svg b/go.dev/static/images/gophers/headlamp.svg deleted file mode 100644 index 3e815c9f..00000000 --- a/go.dev/static/images/gophers/headlamp.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/ladder.svg b/go.dev/static/images/gophers/ladder.svg deleted file mode 100644 index be4d5d66..00000000 --- a/go.dev/static/images/gophers/ladder.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/machine-colorized.svg b/go.dev/static/images/gophers/machine-colorized.svg deleted file mode 100644 index cb8b9831..00000000 --- a/go.dev/static/images/gophers/machine-colorized.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/machine.svg b/go.dev/static/images/gophers/machine.svg deleted file mode 100644 index 7fe82b75..00000000 --- a/go.dev/static/images/gophers/machine.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/megaphone-gopher.svg b/go.dev/static/images/gophers/megaphone-gopher.svg deleted file mode 100644 index 5f795968..00000000 --- a/go.dev/static/images/gophers/megaphone-gopher.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/go.dev/static/images/gophers/megaphone.svg b/go.dev/static/images/gophers/megaphone.svg deleted file mode 100644 index c018845d..00000000 --- a/go.dev/static/images/gophers/megaphone.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/motorcycle.svg b/go.dev/static/images/gophers/motorcycle.svg deleted file mode 100644 index e05346e4..00000000 --- a/go.dev/static/images/gophers/motorcycle.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/newscasters.png b/go.dev/static/images/gophers/newscasters.png deleted file mode 100644 index 76a17398..00000000 Binary files a/go.dev/static/images/gophers/newscasters.png and /dev/null differ diff --git a/go.dev/static/images/gophers/peach.svg b/go.dev/static/images/gophers/peach.svg deleted file mode 100644 index a13a4d4e..00000000 --- a/go.dev/static/images/gophers/peach.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/pilot-bust.svg b/go.dev/static/images/gophers/pilot-bust.svg deleted file mode 100644 index a654dc77..00000000 --- a/go.dev/static/images/gophers/pilot-bust.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/pink.svg b/go.dev/static/images/gophers/pink.svg deleted file mode 100644 index 51e456c6..00000000 --- a/go.dev/static/images/gophers/pink.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/running.svg b/go.dev/static/images/gophers/running.svg deleted file mode 100644 index 001245f3..00000000 --- a/go.dev/static/images/gophers/running.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/shopping-cart.png b/go.dev/static/images/gophers/shopping-cart.png deleted file mode 100644 index de8e0f2f..00000000 Binary files a/go.dev/static/images/gophers/shopping-cart.png and /dev/null differ diff --git a/go.dev/static/images/gophers/skateboarding.svg b/go.dev/static/images/gophers/skateboarding.svg deleted file mode 100644 index c281a39e..00000000 --- a/go.dev/static/images/gophers/skateboarding.svg +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/go.dev/static/images/gophers/slate.svg b/go.dev/static/images/gophers/slate.svg deleted file mode 100644 index 4930804d..00000000 --- a/go.dev/static/images/gophers/slate.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/violet.svg b/go.dev/static/images/gophers/violet.svg deleted file mode 100644 index 33e8bdc5..00000000 --- a/go.dev/static/images/gophers/violet.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/wrench.svg b/go.dev/static/images/gophers/wrench.svg deleted file mode 100644 index fc5789b1..00000000 --- a/go.dev/static/images/gophers/wrench.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/gophers/yellow.svg b/go.dev/static/images/gophers/yellow.svg deleted file mode 100644 index 5ecf2f27..00000000 --- a/go.dev/static/images/gophers/yellow.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/icons/arrow-forward.svg b/go.dev/static/images/icons/arrow-forward.svg deleted file mode 100644 index 25d69789..00000000 --- a/go.dev/static/images/icons/arrow-forward.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/go.dev/static/images/icons/chevron-down.svg b/go.dev/static/images/icons/chevron-down.svg deleted file mode 100644 index 8662fb7d..00000000 --- a/go.dev/static/images/icons/chevron-down.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/go.dev/static/images/icons/code.svg b/go.dev/static/images/icons/code.svg deleted file mode 100644 index 1cdcc64b..00000000 --- a/go.dev/static/images/icons/code.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/go.dev/static/images/icons/command-folder.svg b/go.dev/static/images/icons/command-folder.svg deleted file mode 100644 index 78c35585..00000000 --- a/go.dev/static/images/icons/command-folder.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/go.dev/static/images/icons/gear.svg b/go.dev/static/images/icons/gear.svg deleted file mode 100644 index a509f45f..00000000 --- a/go.dev/static/images/icons/gear.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/go.dev/static/images/icons/package.svg b/go.dev/static/images/icons/package.svg deleted file mode 100644 index 087fa092..00000000 --- a/go.dev/static/images/icons/package.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/go.dev/static/images/icons/sphere.svg b/go.dev/static/images/icons/sphere.svg deleted file mode 100644 index 91c18b74..00000000 --- a/go.dev/static/images/icons/sphere.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/go.dev/static/images/learn/clis.png b/go.dev/static/images/learn/clis.png deleted file mode 100644 index 267ff73f..00000000 Binary files a/go.dev/static/images/learn/clis.png and /dev/null differ diff --git a/go.dev/static/images/learn/codecademy.png b/go.dev/static/images/learn/codecademy.png deleted file mode 100644 index 8de4dbfd..00000000 Binary files a/go.dev/static/images/learn/codecademy.png and /dev/null differ diff --git a/go.dev/static/images/learn/codelabs.png b/go.dev/static/images/learn/codelabs.png deleted file mode 100644 index c8dabae2..00000000 Binary files a/go.dev/static/images/learn/codelabs.png and /dev/null differ diff --git a/go.dev/static/images/learn/codelabs_2.png b/go.dev/static/images/learn/codelabs_2.png deleted file mode 100644 index 7dd71cba..00000000 Binary files a/go.dev/static/images/learn/codelabs_2.png and /dev/null differ diff --git a/go.dev/static/images/learn/commandline.svg b/go.dev/static/images/learn/commandline.svg deleted file mode 100644 index fd2dcb68..00000000 --- a/go.dev/static/images/learn/commandline.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/learn/concurrency-in-go.png b/go.dev/static/images/learn/concurrency-in-go.png deleted file mode 100644 index d2c140c6..00000000 Binary files a/go.dev/static/images/learn/concurrency-in-go.png and /dev/null differ diff --git a/go.dev/static/images/learn/coursera.png b/go.dev/static/images/learn/coursera.png deleted file mode 100644 index c22729d6..00000000 Binary files a/go.dev/static/images/learn/coursera.png and /dev/null differ diff --git a/go.dev/static/images/learn/earth.png b/go.dev/static/images/learn/earth.png deleted file mode 100644 index c39758e8..00000000 Binary files a/go.dev/static/images/learn/earth.png and /dev/null differ diff --git a/go.dev/static/images/learn/edureka.png b/go.dev/static/images/learn/edureka.png deleted file mode 100644 index a047f5ed..00000000 Binary files a/go.dev/static/images/learn/edureka.png and /dev/null differ diff --git a/go.dev/static/images/learn/exercism.png b/go.dev/static/images/learn/exercism.png deleted file mode 100644 index a2fd1c33..00000000 Binary files a/go.dev/static/images/learn/exercism.png and /dev/null differ diff --git a/go.dev/static/images/learn/get-programming-with-go.jpeg b/go.dev/static/images/learn/get-programming-with-go.jpeg deleted file mode 100644 index c73d3e2e..00000000 Binary files a/go.dev/static/images/learn/get-programming-with-go.jpeg and /dev/null differ diff --git a/go.dev/static/images/learn/go-programming-blueprints.png b/go.dev/static/images/learn/go-programming-blueprints.png deleted file mode 100644 index 7ad68383..00000000 Binary files a/go.dev/static/images/learn/go-programming-blueprints.png and /dev/null differ diff --git a/go.dev/static/images/learn/go-programming-language-book.png b/go.dev/static/images/learn/go-programming-language-book.png deleted file mode 100644 index 1f5bd3a5..00000000 Binary files a/go.dev/static/images/learn/go-programming-language-book.png and /dev/null differ diff --git a/go.dev/static/images/learn/go_cdk_logo.png b/go.dev/static/images/learn/go_cdk_logo.png deleted file mode 100644 index 96155ec7..00000000 Binary files a/go.dev/static/images/learn/go_cdk_logo.png and /dev/null differ diff --git a/go.dev/static/images/learn/gobyexample.png b/go.dev/static/images/learn/gobyexample.png deleted file mode 100644 index d4f2538f..00000000 Binary files a/go.dev/static/images/learn/gobyexample.png and /dev/null differ diff --git a/go.dev/static/images/learn/gohelloworld.png b/go.dev/static/images/learn/gohelloworld.png deleted file mode 100644 index df131fef..00000000 Binary files a/go.dev/static/images/learn/gohelloworld.png and /dev/null differ diff --git a/go.dev/static/images/learn/gophercises.png b/go.dev/static/images/learn/gophercises.png deleted file mode 100644 index 5adb4760..00000000 Binary files a/go.dev/static/images/learn/gophercises.png and /dev/null differ diff --git a/go.dev/static/images/learn/helloworld.png b/go.dev/static/images/learn/helloworld.png deleted file mode 100644 index 05fd362d..00000000 Binary files a/go.dev/static/images/learn/helloworld.png and /dev/null differ diff --git a/go.dev/static/images/learn/install.png b/go.dev/static/images/learn/install.png deleted file mode 100644 index 600cb2f5..00000000 Binary files a/go.dev/static/images/learn/install.png and /dev/null differ diff --git a/go.dev/static/images/learn/introducing-go-book.png b/go.dev/static/images/learn/introducing-go-book.png deleted file mode 100644 index a24626db..00000000 Binary files a/go.dev/static/images/learn/introducing-go-book.png and /dev/null differ diff --git a/go.dev/static/images/learn/qwiklabs.png b/go.dev/static/images/learn/qwiklabs.png deleted file mode 100644 index dce02305..00000000 Binary files a/go.dev/static/images/learn/qwiklabs.png and /dev/null differ diff --git a/go.dev/static/images/learn/star-rating.png b/go.dev/static/images/learn/star-rating.png deleted file mode 100644 index 4cd252b6..00000000 Binary files a/go.dev/static/images/learn/star-rating.png and /dev/null differ diff --git a/go.dev/static/images/learn/tour.png b/go.dev/static/images/learn/tour.png deleted file mode 100644 index 912f445c..00000000 Binary files a/go.dev/static/images/learn/tour.png and /dev/null differ diff --git a/go.dev/static/images/learn/web-dev.png b/go.dev/static/images/learn/web-dev.png deleted file mode 100644 index 989357aa..00000000 Binary files a/go.dev/static/images/learn/web-dev.png and /dev/null differ diff --git a/go.dev/static/images/logos/american-express.png b/go.dev/static/images/logos/american-express.png deleted file mode 100644 index 242d9934..00000000 Binary files a/go.dev/static/images/logos/american-express.png and /dev/null differ diff --git a/go.dev/static/images/logos/american-express.svg b/go.dev/static/images/logos/american-express.svg deleted file mode 100644 index fd3a5284..00000000 --- a/go.dev/static/images/logos/american-express.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/amex-logo.png b/go.dev/static/images/logos/amex-logo.png deleted file mode 100644 index 26080b0c..00000000 Binary files a/go.dev/static/images/logos/amex-logo.png and /dev/null differ diff --git a/go.dev/static/images/logos/amex.svg b/go.dev/static/images/logos/amex.svg deleted file mode 100644 index 3f902cb3..00000000 --- a/go.dev/static/images/logos/amex.svg +++ /dev/null @@ -1,34 +0,0 @@ - - -Amercian_express - - - - - diff --git a/go.dev/static/images/logos/armut.png b/go.dev/static/images/logos/armut.png deleted file mode 100644 index 83cc4570..00000000 Binary files a/go.dev/static/images/logos/armut.png and /dev/null differ diff --git a/go.dev/static/images/logos/caddy.svg b/go.dev/static/images/logos/caddy.svg deleted file mode 100644 index d9b8a67c..00000000 --- a/go.dev/static/images/logos/caddy.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/capital-one.svg b/go.dev/static/images/logos/capital-one.svg deleted file mode 100644 index af936036..00000000 --- a/go.dev/static/images/logos/capital-one.svg +++ /dev/null @@ -1,41 +0,0 @@ - - -captial-one - - - - diff --git a/go.dev/static/images/logos/chrome.svg b/go.dev/static/images/logos/chrome.svg deleted file mode 100644 index 3a2a5a96..00000000 --- a/go.dev/static/images/logos/chrome.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/cloudflare-icon.svg b/go.dev/static/images/logos/cloudflare-icon.svg deleted file mode 100644 index 8ad9cd68..00000000 --- a/go.dev/static/images/logos/cloudflare-icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/cloudflare.png b/go.dev/static/images/logos/cloudflare.png deleted file mode 100644 index 8cd4914c..00000000 Binary files a/go.dev/static/images/logos/cloudflare.png and /dev/null differ diff --git a/go.dev/static/images/logos/cloudflare.svg b/go.dev/static/images/logos/cloudflare.svg deleted file mode 100644 index 04648af6..00000000 --- a/go.dev/static/images/logos/cloudflare.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - diff --git a/go.dev/static/images/logos/cockroach.svg b/go.dev/static/images/logos/cockroach.svg deleted file mode 100644 index 0954963d..00000000 --- a/go.dev/static/images/logos/cockroach.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/comcast.svg b/go.dev/static/images/logos/comcast.svg deleted file mode 100644 index f8ce7a1e..00000000 --- a/go.dev/static/images/logos/comcast.svg +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/go.dev/static/images/logos/curve.png b/go.dev/static/images/logos/curve.png deleted file mode 100644 index 8cfb6188..00000000 Binary files a/go.dev/static/images/logos/curve.png and /dev/null differ diff --git a/go.dev/static/images/logos/curve.svg b/go.dev/static/images/logos/curve.svg deleted file mode 100644 index 01fc55b7..00000000 --- a/go.dev/static/images/logos/curve.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/go.dev/static/images/logos/docker.svg b/go.dev/static/images/logos/docker.svg deleted file mode 100644 index 42426899..00000000 --- a/go.dev/static/images/logos/docker.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/drone.svg b/go.dev/static/images/logos/drone.svg deleted file mode 100644 index 179e6f83..00000000 --- a/go.dev/static/images/logos/drone.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/dropbox-icon.svg b/go.dev/static/images/logos/dropbox-icon.svg deleted file mode 100644 index 135a7944..00000000 --- a/go.dev/static/images/logos/dropbox-icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/dropbox.png b/go.dev/static/images/logos/dropbox.png deleted file mode 100644 index d17804a9..00000000 Binary files a/go.dev/static/images/logos/dropbox.png and /dev/null differ diff --git a/go.dev/static/images/logos/dropbox.svg b/go.dev/static/images/logos/dropbox.svg deleted file mode 100644 index ec633031..00000000 --- a/go.dev/static/images/logos/dropbox.svg +++ /dev/null @@ -1 +0,0 @@ -Dropbox \ No newline at end of file diff --git a/go.dev/static/images/logos/economist.svg b/go.dev/static/images/logos/economist.svg deleted file mode 100644 index 666cef85..00000000 --- a/go.dev/static/images/logos/economist.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - diff --git a/go.dev/static/images/logos/etcd.svg b/go.dev/static/images/logos/etcd.svg deleted file mode 100644 index 4f38f913..00000000 --- a/go.dev/static/images/logos/etcd.svg +++ /dev/null @@ -1 +0,0 @@ -etcd diff --git a/go.dev/static/images/logos/facebook.png b/go.dev/static/images/logos/facebook.png deleted file mode 100644 index 59362688..00000000 Binary files a/go.dev/static/images/logos/facebook.png and /dev/null differ diff --git a/go.dev/static/images/logos/firebase.svg b/go.dev/static/images/logos/firebase.svg deleted file mode 100644 index 421d452a..00000000 --- a/go.dev/static/images/logos/firebase.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/go.dev/static/images/logos/github.svg b/go.dev/static/images/logos/github.svg deleted file mode 100644 index 977cf9d7..00000000 --- a/go.dev/static/images/logos/github.svg +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/go.dev/static/images/logos/gokit.png b/go.dev/static/images/logos/gokit.png deleted file mode 100644 index 4c47041f..00000000 Binary files a/go.dev/static/images/logos/gokit.png and /dev/null differ diff --git a/go.dev/static/images/logos/google-cloud.png b/go.dev/static/images/logos/google-cloud.png deleted file mode 100644 index 80a47820..00000000 Binary files a/go.dev/static/images/logos/google-cloud.png and /dev/null differ diff --git a/go.dev/static/images/logos/google-cloud.svg b/go.dev/static/images/logos/google-cloud.svg deleted file mode 100644 index 49cd9f56..00000000 --- a/go.dev/static/images/logos/google-cloud.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/google-fourcolor.svg b/go.dev/static/images/logos/google-fourcolor.svg deleted file mode 100644 index 95f5e7d6..00000000 --- a/go.dev/static/images/logos/google-fourcolor.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/google-g.svg b/go.dev/static/images/logos/google-g.svg deleted file mode 100644 index 9cdb8e44..00000000 --- a/go.dev/static/images/logos/google-g.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/google.svg b/go.dev/static/images/logos/google.svg deleted file mode 100644 index 3b2e94bd..00000000 --- a/go.dev/static/images/logos/google.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/go.dev/static/images/logos/govuk.svg b/go.dev/static/images/logos/govuk.svg deleted file mode 100644 index 2814f3da..00000000 --- a/go.dev/static/images/logos/govuk.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/grail.png b/go.dev/static/images/logos/grail.png deleted file mode 100644 index 026099c2..00000000 Binary files a/go.dev/static/images/logos/grail.png and /dev/null differ diff --git a/go.dev/static/images/logos/grail.svg b/go.dev/static/images/logos/grail.svg deleted file mode 100644 index 5a3bd62c..00000000 --- a/go.dev/static/images/logos/grail.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/go.dev/static/images/logos/hugo.svg b/go.dev/static/images/logos/hugo.svg deleted file mode 100644 index 8a1a9bbc..00000000 --- a/go.dev/static/images/logos/hugo.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - Slice 1 - Created with Sketch. - - - - - - - - \ No newline at end of file diff --git a/go.dev/static/images/logos/ibm.svg b/go.dev/static/images/logos/ibm.svg deleted file mode 100644 index ad0cb64b..00000000 --- a/go.dev/static/images/logos/ibm.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/kubernetes.svg b/go.dev/static/images/logos/kubernetes.svg deleted file mode 100644 index 7d21699c..00000000 --- a/go.dev/static/images/logos/kubernetes.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/lets-encrypt-icon.svg b/go.dev/static/images/logos/lets-encrypt-icon.svg deleted file mode 100644 index 6fc1ff96..00000000 --- a/go.dev/static/images/logos/lets-encrypt-icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/lets-encrypt.svg b/go.dev/static/images/logos/lets-encrypt.svg deleted file mode 100644 index c54550e1..00000000 --- a/go.dev/static/images/logos/lets-encrypt.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/mattermost.png b/go.dev/static/images/logos/mattermost.png deleted file mode 100644 index 3a8116cf..00000000 Binary files a/go.dev/static/images/logos/mattermost.png and /dev/null differ diff --git a/go.dev/static/images/logos/medium.svg b/go.dev/static/images/logos/medium.svg deleted file mode 100644 index 76f49a3d..00000000 --- a/go.dev/static/images/logos/medium.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/mercado-libre.png b/go.dev/static/images/logos/mercado-libre.png deleted file mode 100644 index 93657b31..00000000 Binary files a/go.dev/static/images/logos/mercado-libre.png and /dev/null differ diff --git a/go.dev/static/images/logos/mercadoLibre.svg b/go.dev/static/images/logos/mercadoLibre.svg deleted file mode 100644 index 24964f4c..00000000 --- a/go.dev/static/images/logos/mercadoLibre.svg +++ /dev/null @@ -1,95 +0,0 @@ - - - -mercadoLibre - - - - - - - - - - - - - - - - - - - - diff --git a/go.dev/static/images/logos/microsoft.png b/go.dev/static/images/logos/microsoft.png deleted file mode 100644 index 5ff7c6b1..00000000 Binary files a/go.dev/static/images/logos/microsoft.png and /dev/null differ diff --git a/go.dev/static/images/logos/microsoft.svg b/go.dev/static/images/logos/microsoft.svg deleted file mode 100644 index 28ec5f11..00000000 --- a/go.dev/static/images/logos/microsoft.svg +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - diff --git a/go.dev/static/images/logos/mongodb.svg b/go.dev/static/images/logos/mongodb.svg deleted file mode 100644 index e4fe5c64..00000000 --- a/go.dev/static/images/logos/mongodb.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/netflix.svg b/go.dev/static/images/logos/netflix.svg deleted file mode 100644 index 75f2a204..00000000 --- a/go.dev/static/images/logos/netflix.svg +++ /dev/null @@ -1 +0,0 @@ -netfix \ No newline at end of file diff --git a/go.dev/static/images/logos/paypal.svg b/go.dev/static/images/logos/paypal.svg deleted file mode 100644 index 6528aee8..00000000 --- a/go.dev/static/images/logos/paypal.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/prometheus.svg b/go.dev/static/images/logos/prometheus.svg deleted file mode 100644 index 5c51f66d..00000000 --- a/go.dev/static/images/logos/prometheus.svg +++ /dev/null @@ -1,50 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/go.dev/static/images/logos/riotgames.png b/go.dev/static/images/logos/riotgames.png deleted file mode 100644 index facb585f..00000000 Binary files a/go.dev/static/images/logos/riotgames.png and /dev/null differ diff --git a/go.dev/static/images/logos/salesforce.svg b/go.dev/static/images/logos/salesforce.svg deleted file mode 100644 index a2469a8e..00000000 --- a/go.dev/static/images/logos/salesforce.svg +++ /dev/null @@ -1,62 +0,0 @@ - - - -salesforce - - - - - - - - - - - - diff --git a/go.dev/static/images/logos/sitereliability.svg b/go.dev/static/images/logos/sitereliability.svg deleted file mode 100644 index c549d69a..00000000 --- a/go.dev/static/images/logos/sitereliability.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/stripe.svg b/go.dev/static/images/logos/stripe.svg deleted file mode 100644 index cfb5c250..00000000 --- a/go.dev/static/images/logos/stripe.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/go.dev/static/images/logos/target.svg b/go.dev/static/images/logos/target.svg deleted file mode 100644 index 05974a05..00000000 --- a/go.dev/static/images/logos/target.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/terraform-icon.svg b/go.dev/static/images/logos/terraform-icon.svg deleted file mode 100644 index 0627ba16..00000000 --- a/go.dev/static/images/logos/terraform-icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/terraform.png b/go.dev/static/images/logos/terraform.png deleted file mode 100644 index 56e77473..00000000 Binary files a/go.dev/static/images/logos/terraform.png and /dev/null differ diff --git a/go.dev/static/images/logos/the-new-york-times-icon.svg b/go.dev/static/images/logos/the-new-york-times-icon.svg deleted file mode 100644 index 289ebd78..00000000 --- a/go.dev/static/images/logos/the-new-york-times-icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/logos/twitch.svg b/go.dev/static/images/logos/twitch.svg deleted file mode 100644 index d6842340..00000000 --- a/go.dev/static/images/logos/twitch.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - -twitch - - - - - - - - - diff --git a/go.dev/static/images/logos/twitter.svg b/go.dev/static/images/logos/twitter.svg deleted file mode 100644 index 8c27bd2d..00000000 --- a/go.dev/static/images/logos/twitter.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - -twitter - - diff --git a/go.dev/static/images/logos/uber-app-icon.svg b/go.dev/static/images/logos/uber-app-icon.svg deleted file mode 100644 index ca116d23..00000000 --- a/go.dev/static/images/logos/uber-app-icon.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - uber_rides_api_icon - Created with Sketch. - - - - - - - - - \ No newline at end of file diff --git a/go.dev/static/images/logos/uber.svg b/go.dev/static/images/logos/uber.svg deleted file mode 100644 index 4dfeea13..00000000 --- a/go.dev/static/images/logos/uber.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - -uber - - - - - diff --git a/go.dev/static/images/logos/vitess.png b/go.dev/static/images/logos/vitess.png deleted file mode 100644 index 7de16d2b..00000000 Binary files a/go.dev/static/images/logos/vitess.png and /dev/null differ diff --git a/go.dev/static/images/logos/wildlife.svg b/go.dev/static/images/logos/wildlife.svg deleted file mode 100644 index 39d18703..00000000 --- a/go.dev/static/images/logos/wildlife.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/go.dev/static/images/logos/youtube.svg b/go.dev/static/images/logos/youtube.svg deleted file mode 100644 index aee9af34..00000000 --- a/go.dev/static/images/logos/youtube.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/static/images/meetup.svg b/go.dev/static/images/meetup.svg deleted file mode 100644 index 98af2916..00000000 --- a/go.dev/static/images/meetup.svg +++ /dev/null @@ -1,47 +0,0 @@ - - - - diff --git a/go.dev/static/images/menu-24px-white.svg b/go.dev/static/images/menu-24px-white.svg deleted file mode 100644 index b7e5807b..00000000 --- a/go.dev/static/images/menu-24px-white.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/go.dev/static/images/menu-24px.svg b/go.dev/static/images/menu-24px.svg deleted file mode 100644 index 14f99cd1..00000000 --- a/go.dev/static/images/menu-24px.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/go.dev/static/images/quote.svg b/go.dev/static/images/quote.svg deleted file mode 100644 index 1b5a8122..00000000 --- a/go.dev/static/images/quote.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/go.dev/static/images/sap-logo.png b/go.dev/static/images/sap-logo.png deleted file mode 100644 index df5ce9a1..00000000 Binary files a/go.dev/static/images/sap-logo.png and /dev/null differ diff --git a/go.dev/static/images/star-24px.svg b/go.dev/static/images/star-24px.svg deleted file mode 100644 index ead6a268..00000000 --- a/go.dev/static/images/star-24px.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/go.dev/static/images/walmart-logo.png b/go.dev/static/images/walmart-logo.png deleted file mode 100644 index 16358bd3..00000000 Binary files a/go.dev/static/images/walmart-logo.png and /dev/null differ diff --git a/go.dev/static/js/carousels.js b/go.dev/static/js/carousels.js deleted file mode 100644 index c2d5d9fa..00000000 --- a/go.dev/static/js/carousels.js +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/** - * Handles Carousel logic. Hides right/left buttons if user is at the end of the - * list of slides. Transitions the movement with CSS, and blocks slide changes - * during the transitions with `allowShift`. - */ -(() => { - 'use strict'; - - /** TODO: refactor to slide container using transformX instead of left, - * in order to leverage GPU rendering - */ - - function initCarousel(container, prev, next, breakpoints) { - const slides = Array.from(container.children); - let posInitial; - const slidesCount = container.children.length; - let distanceToMove = Math.floor( - container.children[0].getBoundingClientRect().width - ); - let index = 0; - let allowShift = true; - let groupCountAdjustment = getGroupCountAdjustment(); - - adjustTabbableSlides(breakpoints); - - // Click events. - prev.addEventListener('click', () => { - shiftSlide(-1); - }); - next.addEventListener('click', () => { - shiftSlide(1); - }); - - // Transition events. - container.addEventListener('transitionend', handleTransitionEnd); - - window.addEventListener( - 'resize', - debounce(() => { - // the next 3 lines reinitializes the slide container node - container.style.display = 'none'; - container.offsetHeight; - container.style.display = 'flex'; - - groupCountAdjustment = getGroupCountAdjustment(); - distanceToMove = Math.floor( - container.children[0].getBoundingClientRect().width - ); - container.style.left = -(distanceToMove * index) + 'px'; - }) - ); - - function shiftSlide(dir, action) { - container.classList.add('shifting'); - if (allowShift) { - if (!action) { - posInitial = container.offsetLeft; - } - if (dir === 1) { - prev.removeAttribute('hidden'); - container.style.left = posInitial - distanceToMove + 'px'; - index++; - } else if (dir === -1) { - next.removeAttribute('hidden'); - container.style.left = posInitial + distanceToMove + 'px'; - index--; - } else { - container.style.left = posInitial + 'px'; - } - if (index === 0) { - prev.setAttribute('hidden', true); - } else if (index === slidesCount - 1 - groupCountAdjustment) { - next.setAttribute('hidden', true); - } - } - allowShift = false; - adjustTabbableSlides(breakpoints); - } - - /** - * Only allow visible slides to be tabbable - */ - function adjustTabbableSlides(breakpoints) { - let count = 1; - if (breakpoints) { - for (const bp of breakpoints) { - if (window.innerWidth > bp.px) { - count = bp.groupCount; - } - } - } - slides.forEach((slide, i) => { - const links = slide.querySelectorAll('a'); - if (i >= index && i < index + count) { - links.forEach(link => (link.tabIndex = 0)); - } else { - links.forEach(link => (link.tabIndex = -1)); - } - }); - } - - function handleTransitionEnd() { - container.classList.remove('shifting'); - allowShift = true; - } - - function getGroupCountAdjustment() { - let groupCountAdjustment = 0; - - if (breakpoints) { - for (const bp of breakpoints) { - if (window.innerWidth > bp.px) { - groupCountAdjustment = bp.groupCount - 1; - } - } - } - return groupCountAdjustment; - } - } - - // Build quotes carousel. - const quotesSliderContainer = document.querySelector( - '.js-testimonialsGoQuotes' - ); - const quotesPrev = document.querySelector('.js-testimonialsPrev'); - const quotesNext = document.querySelector('.js-testimonialsNext'); - // Build events carousel. - const eventsSliderContainer = document.querySelector( - '.js-goCarouselEventsSlides' - ); - const eventsPrev = document.querySelector('.js-eventsCarouselPrev'); - const eventsNext = document.querySelector('.js-eventsCarouselNext'); - - // Build Solutions hero carousel. - const solutionsCarouselSliderContainer = document.querySelector( - '.js-solutionsHeroCarouselSlides' - ); - const solutionsCarouselPrev = document.querySelector( - '.js-solutionsHeroCarouselPrev' - ); - const solutionsCarouselNext = document.querySelector( - '.js-solutionsHeroCarouselNext' - ); - - if (quotesSliderContainer) { - initCarousel(quotesSliderContainer, quotesPrev, quotesNext); - } - if (eventsSliderContainer) { - const breakpoints = [ - {px: 768, groupCount: 2}, - {px: 1068, groupCount: 3}, - ]; - initCarousel(eventsSliderContainer, eventsPrev, eventsNext, breakpoints); - } - if (solutionsCarouselSliderContainer) { - initCarousel( - solutionsCarouselSliderContainer, - solutionsCarouselPrev, - solutionsCarouselNext - ); - } -})(); - -/** - * Debounce functions for better performance - * (c) 2018 Chris Ferdinandi, MIT License, https://gomakethings.com - * @param {Function} fn The function to debounce - */ -function debounce(fn) { - let timeout; - return (...args) => { - if (timeout) { - window.cancelAnimationFrame(timeout); - } - timeout = window.requestAnimationFrame(function () { - fn(args); - }); - }; -} diff --git a/go.dev/static/js/hats.js b/go.dev/static/js/hats.js deleted file mode 100644 index d4ac8242..00000000 --- a/go.dev/static/js/hats.js +++ /dev/null @@ -1,74 +0,0 @@ -function requestHaTs(cookieName, triggerId, bucketSample, promptSample) { - var inBucket; - - var cookies = decodeURIComponent(document.cookie).split(';'); - - for (let i = 0; i < cookies.length; i++) { - var c = cookies[i]; - - while (c.charAt(0) == ' ') c = c.substring(1); - - if (c.indexOf(cookieName + '=') == 0) - inBucket = c.substring((cookieName + '=').length, c.length); - } - - if (typeof inBucket === 'undefined') { - inBucket = String(Math.random() < bucketSample); - document.cookie = - cookieName + '=' + inBucket + '; path=/; max-age=2592000;'; - } - - if (inBucket === 'true') { - var shouldPrompt = Math.random() < promptSample; - if (shouldPrompt) { - document.cookie = cookieName + '=false ; path=/; max-age=2592000;'; - - var tag = document.createElement('script'); - tag.src = - 'https://www.gstatic.com/feedback/js/help/prod/service/lazy.min.js'; - tag.type = 'text/javascript'; - document.head.appendChild(tag); - - tag.onload = function () { - var helpApi = window.help.service.Lazy.create(0, { - apiKey: 'AIzaSyDfBPfajByU2G6RAjUf5sjkMSSLNTj7MMc', - locale: 'en-US', - }); - - helpApi.requestSurvey({ - triggerId: triggerId, - callback: function (requestSurveyCallbackParam) { - if (!requestSurveyCallbackParam.surveyData) { - return; - } - helpApi.presentSurvey({ - surveyData: requestSurveyCallbackParam.surveyData, - colorScheme: 1, // light - customZIndex: 10000, - }); - }, - }); - }; - } - } -} - -(function () { - // HaTS - go.dev - requestHaTs('HaTS_BKT', 'RLVVv5Lf10njVvnD1rP0QUpmtosS', 0.4, 0.5); - - // All download links on the go.dev homepage may trigger a survey. - [ - document.querySelector('.js-downloadBtn'), - document.querySelector('.js-downloadWin'), - document.querySelector('.js-downloadMac'), - document.querySelector('.js-downloadLinux'), - ].forEach(function (el) { - if (el) { - el.addEventListener('click', () => { - // HaTS - Core Go distribution - requestHaTs('HaTS_BKT_DIST', 'dz6fkRxyz0njVvnD1rP0QxCXzhSX', 0.1, 1); - }); - } - }); -})(); diff --git a/go.dev/static/js/misc.js b/go.dev/static/js/misc.js deleted file mode 100644 index c4455c89..00000000 --- a/go.dev/static/js/misc.js +++ /dev/null @@ -1,187 +0,0 @@ -// 'More projects' button on use case pages -(() => { - const button = document.querySelector('.js-moreProjectsBtn'); - if (!button) return; - const hiddenProjects = document.querySelectorAll('.js-featuredUsersRow[hidden]'); - button.addEventListener('click', () => { - button.setAttribute('hidden', true); - hiddenProjects.forEach(project => { - project.removeAttribute('hidden'); - }); - }); -})(); - -/* Header tags generated with markdown - inner span needed for correct scroll - position */ -(() => { - const headingHashes = Array.from(document.querySelectorAll('h2[id]')); - headingHashes.forEach(h2 => { - const text = h2.textContent; - const id = h2.id; - h2.id = id + '-h2'; - h2.textContent = ''; - const span = document.createElement('span'); - span.textContent = text; - span.id = id; - h2.appendChild(span); - }); -})(); - -// Use case pages section navigation -(() => { - const stickyNav = document.querySelector('.js-useCaseStickyNav'); - if (stickyNav) { - const linkData = { - 'overview': 'Overview', - 'key-benefits': 'Key Benefits', - 'use-case': 'Use Case', - 'featured-users': 'Featured Users', - 'get-started': 'Get Started', - }; - const container = document.querySelector('.js-useCaseSubnav'); - const subNavAnchorLinks = document.querySelector('.js-useCaseSubnavLinks'); - const siteHeader = document.querySelector('.js-siteHeader'); - const header = document.querySelector('.js-useCaseSubnavHeader'); - const icon = document.querySelector('.js-useCaseSubnavMenuIcon'); - const menu = document.querySelector('.js-useCaseSubnavMenu'); - const contentBody = document.querySelector('.js-useCaseContentBody'); - const headerHeightPx = 56; - const sectionHeadings = Array.from( - document.querySelectorAll('.sectionHeading') - ).map(h => h.firstChild); - let distanceFromTop = - window.pageYOffset + - contentBody.getBoundingClientRect().top - - headerHeightPx; - if (!header || !menu) return; - container.addEventListener('click', handleClick); - container.addEventListener('keydown', handleKeydown); - changeScrollPosition(); - - function handleClick(event) { - if (event.target === header) { - toggleMenu(); - } else { - closeMenu(); - } - } - - function handleKeydown(event) { - if (event.key === 'Enter') { - closeMenu(); - } else { - openMenu(); - } - } - - function openMenu() { - menu.classList.add('UseCaseSubNav-menu--open'); - icon.classList.add('UseCaseSubNav-menuIcon--open'); - } - - function closeMenu() { - menu.classList.remove('UseCaseSubNav-menu--open'); - icon.classList.remove('UseCaseSubNav-menuIcon--open'); - } - - function toggleMenu() { - menu.classList.toggle('UseCaseSubNav-menu--open'); - icon.classList.toggle('UseCaseSubNav-menuIcon--open'); - } - - sectionHeadings.forEach(heading => { - let a = document.createElement('a'); - a.classList.add('UseCase-anchorLink', 'anchor-link'); - a.href = `${window.location.pathname}#${heading.id}`; - a.textContent = linkData[heading.id]; - stickyNav.appendChild(a); - a = a.cloneNode(); - a.textContent = linkData[heading.id]; - subNavAnchorLinks.appendChild(a); - }); - - // Selected section styles - const anchorLinks = document.querySelectorAll('.anchor-link'); - anchorLinks.forEach(link => { - link.addEventListener('click', () => { - document - .querySelectorAll('.anchor-link') - .forEach(el => el.classList.remove('selected')); - link.classList.add('selected'); - }); - }); - - window.addEventListener('scroll', () => { - // delay in case the user clicked the anchor link and we are autoscrolling - setTimeout(setSelectedAnchor, 500); - }); - - function setSelectedAnchor() { - for (heading of sectionHeadings) { - const {offsetTop} = heading; - if (offsetTop > window.scrollY) { - anchorLinks.forEach(link => { - const anchorId = link.href.slice(link.href.indexOf('#') + 1); - if (anchorId === heading.id) { - link.classList.add('selected'); - } else { - link.classList.remove('selected'); - } - }); - break; - } - } - } - - /* sticky nav logic -- uses content for y position because reloading page - when not scrolled to the top creates bug if using current y position of - sticky nav */ - window.addEventListener('scroll', setStickyNav); - - window.addEventListener('resize', () => { - distanceFromTop = - window.pageYOffset + - contentBody.getBoundingClientRect().top - - headerHeightPx; - - changeScrollPosition() - }); - - /** - * Changes scroll position according to the size of the header and menu - * Also changes according to the user's browser - */ - function changeScrollPosition() { - const SUPPORTS_SCROLL_BEHAVIOR = document.body.style.scrollBehavior !== undefined; - const WINDOW_WIDTH_BREAKPOINT_PX = 923; - let scrollPosition = headerHeightPx; - - if (SUPPORTS_SCROLL_BEHAVIOR) { - if (window.innerWidth < WINDOW_WIDTH_BREAKPOINT_PX) { - scrollPosition += header.clientHeight; - } - } else { - if (window.innerWidth >= WINDOW_WIDTH_BREAKPOINT_PX) { - scrollPosition = siteHeader.clientHeight - } else { - scrollPosition = siteHeader.clientHeight + header.clientHeight; - } - } - - sectionHeadings.forEach((sectionHeading) => { - sectionHeading.setAttribute('style', ` - margin-bottom: -${scrollPosition}px; - padding-top: ${scrollPosition}px; - `) - }); - } - - function setStickyNav() { - if (window.scrollY > distanceFromTop) { - stickyNav.classList.add('UseCaseSubNav-anchorLinks--sticky'); - } else { - stickyNav.classList.remove('UseCaseSubNav-anchorLinks--sticky'); - } - } - } -})(); diff --git a/go.dev/static/js/searchBox.js b/go.dev/static/js/searchBox.js deleted file mode 100644 index b6e64b61..00000000 --- a/go.dev/static/js/searchBox.js +++ /dev/null @@ -1,64 +0,0 @@ -(() => { - 'use strict'; - const BREAKPOINT = 512; - const logo = document.querySelector('.js-headerLogo'); - const form = document.querySelector('.js-searchForm'); - const button = document.querySelector('.js-searchFormSubmit'); - const input = form.querySelector('input'); - - renderForm(); - - window.addEventListener('resize', renderForm); - - function renderForm() { - if (window.innerWidth > BREAKPOINT) { - logo.classList.remove('Header-logo--hidden'); - form.classList.remove('SearchForm--open'); - input.removeEventListener('focus', showSearchBox); - input.removeEventListener('keypress', handleKeypress); - input.removeEventListener('focusout', hideSearchBox); - } else { - button.addEventListener('click', handleSearchClick); - input.addEventListener('focus', showSearchBox); - input.addEventListener('keypress', handleKeypress); - input.addEventListener('focusout', hideSearchBox); - } - } - - /** - * Submits form if Enter key is pressed - * @param {KeyboardEvent} e - */ - function handleKeypress(e) { - if (e.key === 'Enter') form.submit(); - } - - /** - * Shows the search box when it receives focus (expands it from - * just the spyglass if we're on mobile). - */ - function showSearchBox() { - logo.classList.add('Header-logo--hidden'); - form.classList.add('SearchForm--open'); - } - - /** - * Hides the search box (shrinks to just the spyglass icon). - */ - function hideSearchBox() { - logo.classList.remove('Header-logo--hidden'); - form.classList.remove('SearchForm--open'); - } - - /** - * Expands the searchbox so input is visible and gives - * the input focus. - * @param {MouseEvent} e - */ - function handleSearchClick(e) { - e.preventDefault(); - - showSearchBox(); - input.focus(); - } -})(); diff --git a/go.dev/static/js/site.js b/go.dev/static/js/site.js deleted file mode 100644 index 23e4480c..00000000 --- a/go.dev/static/js/site.js +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/** - * A bit of navigation related code for handling dismissible elements. - */ -(() => { - 'use strict'; - - function registerHeaderListeners() { - const header = document.querySelector('.js-header'); - const menuButtons = document.querySelectorAll('.js-headerMenuButton'); - menuButtons.forEach(button => { - button.addEventListener('click', e => { - e.preventDefault(); - header.classList.toggle('is-active'); - button.setAttribute( - 'aria-expanded', - header.classList.contains('is-active') - ); - }); - }); - - const scrim = document.querySelector('.js-scrim'); - scrim.addEventListener('click', e => { - e.preventDefault(); - header.classList.remove('is-active'); - menuButtons.forEach(button => { - button.setAttribute( - 'aria-expanded', - header.classList.contains('is-active') - ); - }); - }); - } - - function registerSolutionsTabs() { - // Handle tab navigation on Solutions page. - const tabList = document.querySelector('.js-solutionsTabs'); - - if (tabList) { - const tabs = tabList.querySelectorAll('[role="tab"]'); - let tabFocus = getTabFocus(); - - changeTabs({ target: tabs[tabFocus] }) - - tabs.forEach(tab => { - tab.addEventListener('click', changeTabs); - }); - - // Enable arrow navigation between tabs in the tab list - tabList.addEventListener('keydown', e => { - // Move right - if (e.keyCode === 39 || e.keyCode === 37) { - tabs[tabFocus].setAttribute('tabindex', -1); - if (e.keyCode === 39) { - tabFocus++; - // If we're at the end, go to the start - if (tabFocus >= tabs.length) { - tabFocus = 0; - } - // Move left - } else if (e.keyCode === 37) { - tabFocus--; - // If we're at the start, move to the end - if (tabFocus < 0) { - tabFocus = tabs.length - 1; - } - } - tabs[tabFocus].setAttribute('tabindex', 0); - tabs[tabFocus].focus(); - setTabFocus(tabs[tabFocus].id); - } - }); - - function getTabFocus() { - const hash = window.location.hash; - - switch (hash) { - case '#use-cases': - return 1; - case '#case-studies': - default: - return 0; - } - } - - function setTabFocus(id) { - switch (id) { - case 'btn-tech': - tabFocus = 1; - window.location.hash = '#use-cases'; - break; - case 'btn-companies': - default: - window.location.hash = '#case-studies'; - tabFocus = 0; - } - } - - function changeTabs(e) { - const target = e.target; - const parent = target.parentNode; - const grandparent = parent.parentNode; - - // Remove all current selected tabs - parent - .querySelectorAll('[aria-selected="true"]') - .forEach(t => t.setAttribute('aria-selected', false)); - - // Set this tab as selected - target.setAttribute('aria-selected', true); - setTabFocus(target.id) - - // Hide all tab panels - grandparent - .querySelectorAll('[role="tabpanel"]') - .forEach(panel => panel.setAttribute('hidden', true)); - - // Show the selected panel - grandparent.parentNode - .querySelector(`#${target.getAttribute('aria-controls')}`) - .removeAttribute('hidden'); - } - } - } - - /** - * Attempts to detect user's operating system and sets the download - * links accordingly - */ - async function setDownloadLinks() { - const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0; - const versionElement = document.querySelector('.js-latestGoVersion'); - if (versionElement) { - const downloadBtn = document.querySelector('.js-downloadBtn'); - const goVersionEl = document.querySelector('.js-goVersion'); - const anchorTagWindows = document.querySelector('.js-downloadWin'); - const anchorTagMac = document.querySelector('.js-downloadMac'); - const anchorTagLinux = document.querySelector('.js-downloadLinux'); - const version = await getLatestVersion(); - - const macDownloadUrl = `https://dl.google.com/go/${version}.darwin-amd64.pkg`; - const windowsDownloadUrl = `https://dl.google.com/go/${version}.windows-amd64.msi`; - const linuxDownloadUrl = `https://dl.google.com/go/${version}.linux-amd64.tar.gz`; - goVersionEl.textContent = `\u00a0(${version.replace('go', '')})`; - - anchorTagWindows.href = windowsDownloadUrl; - anchorTagMac.href = macDownloadUrl; - anchorTagLinux.href = linuxDownloadUrl; - downloadBtn.href = isMac ? macDownloadUrl : windowsDownloadUrl; - } - } - - /** - * Retrieves list of Go versions & returns the latest - */ - async function getLatestVersion() { - let version = 'go1.15'; // fallback version if fetch fails - try { - const versionData = await ( - await fetch('https://golang.org/dl/?mode=json') - ).json(); - if (!versionData.length) { - return version; - } - versionData.sort((v1, v2) => { - return v2.version - v1.version; - }); - version = versionData[0].version; - } catch (err) { - console.error(err); - } - return version; - } - - window.addEventListener('DOMContentLoaded', () => { - registerHeaderListeners(); - registerSolutionsTabs(); - setDownloadLinks(); - }); -})(); diff --git a/go.dev/static/robots.txt b/go.dev/static/robots.txt deleted file mode 100644 index c2a49f4f..00000000 --- a/go.dev/static/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Allow: / diff --git a/go.dev/templates/backgroundquote.tmpl b/go.dev/templates/backgroundquote.tmpl deleted file mode 100644 index 5d347eb7..00000000 --- a/go.dev/templates/backgroundquote.tmpl +++ /dev/null @@ -1,26 +0,0 @@ -{{define "backgroundquote info" -}} -{{- with (yaml .info)}} - -{{- end}} -{{end}} diff --git a/go.dev/templates/books.tmpl b/go.dev/templates/books.tmpl deleted file mode 100644 index 15870067..00000000 --- a/go.dev/templates/books.tmpl +++ /dev/null @@ -1,20 +0,0 @@ -{{define "books"}} -{{with (yaml .)}} - -{{end}} -{{end}} diff --git a/go.dev/templates/breadcrumbs.tmpl b/go.dev/templates/breadcrumbs.tmpl deleted file mode 100644 index 689dd12c..00000000 --- a/go.dev/templates/breadcrumbs.tmpl +++ /dev/null @@ -1,24 +0,0 @@ -{{define "breadcrumbnav"}} -{{- if .p1.Parent}} - {{- template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 )}} -{{- end}} -{{- if not (eq .p1.Title "go.dev")}} - -{{- end}} -{{end}} - -{{define "breadcrumbs"}} - -{{end}} diff --git a/go.dev/templates/gopher.tmpl b/go.dev/templates/gopher.tmpl deleted file mode 100644 index 5fcd14a5..00000000 --- a/go.dev/templates/gopher.tmpl +++ /dev/null @@ -1,116 +0,0 @@ -{{define "gopher info" -}} -{{- with (yaml .info)}} -{{- $src := "/images/gophers/wrench.svg"}} -{{- $alt := "Go gophers with wrench"}} -{{- $size := "Large"}} -{{- $align := "Left"}} -{{- $gopher := .color}} -{{- $sizeIn := (or .size "")}} - -{{- if eq (.align) "right" "Right"}} - {{- $align = "Right"}} -{{- end}} - -{{- if eq $sizeIn "XLarge" "xl" "xlarge"}} - {{- $size = "XLarge"}} -{{- end}} - -{{- if eq $gopher "plane"}} - {{- $src = "/images/gophers/biplane.svg"}} - {{- $alt = "Go gopher in a plane"}} -{{- end}} -{{- if eq $gopher "blue"}} - {{- $src = "/images/gophers/blue.svg"}} - {{- $alt = "Go gopher"}} -{{- end}} -{{- if eq $gopher "front" "sticker1"}} - {{- $src = "/images/gophers/front.svg"}} - {{- $alt = "Go gopher"}} -{{- end}} -{{- if eq $gopher "graduate"}} - {{- $src = "/images/gophers/graduate.svg"}} - {{- $alt = "Go gopher graduating"}} -{{- end}} -{{- if eq $gopher "graduate-colorized"}} - {{- $src = "/images/gophers/graduate-colorized.svg"}} - {{- $alt = "Go gopher graduating"}} -{{- end}} -{{- if eq $gopher "green"}} - {{- $src = "/images/gophers/green.svg"}} - {{- $alt = "Go gopher"}} -{{- end}} -{{- if eq $gopher "grey" "gray"}} - {{- $src = "/images/gophers/grey.svg"}} - {{- $alt = "Go gopher"}} -{{- end}} -{{- if eq $gopher "happy" "sticker2"}} - {{- $src = "/images/gophers/happy.svg"}} - {{- $alt = "Go gopher"}} -{{- end}} -{{- if eq $gopher "headlamp"}} - {{- $src = "/images/gophers/headlamp.svg"}} - {{- $alt = "Go gopher with headlamp"}} -{{- end}} -{{- if eq $gopher "headlamp-colorized"}} - {{- $src = "/images/gophers/headlamp-colorized.svg"}} - {{- $alt = "Go gopher with headlamp"}} -{{- end}} -{{- if eq $gopher "ladder"}} - {{- $src = "/images/gophers/ladder.svg"}} - {{- $alt = "Go gopher with ladder"}} -{{- end}} -{{- if eq $gopher "machine"}} - {{- $src = "/images/gophers/machine.svg"}} - {{- $alt = "Go gophers with a machine"}} -{{- end}} -{{- if eq $gopher "machine-colorized"}} - {{- $src = "/images/gophers/machine-colorized.svg"}} - {{- $alt = "Go gopher with a machine"}} -{{- end}} -{{- if eq $gopher "megaphone"}} - {{- $src = "/images/gophers/megaphone.svg"}} - {{- $alt = "Go gopher with a megaphone"}} -{{- end}} -{{- if eq $gopher "peach"}} - {{- $src = "/images/gophers/peach.svg"}} - {{- $alt = "Go gopher"}} -{{- end}} -{{- if eq $gopher "pilot-bust"}} - {{- $src = "/images/gophers/pilot-bust.svg"}} - {{- $alt = "Go gopher pilot"}} -{{- end}} -{{- if eq $gopher "pink"}} - {{- $src = "/images/gophers/pink.svg"}} - {{- $alt = "Go gopher"}} -{{- end}} -{{- if eq $gopher "running"}} - {{- $src = "/images/gophers/running.svg"}} - {{- $alt = "Go gopher running"}} -{{- end}} -{{- if eq $gopher "slate"}} - {{- $src = "/images/gophers/slate.svg"}} - {{- $alt = "Go gopher"}} -{{- end}} -{{- if eq $gopher "wrench"}} - {{- $src = "/images/gophers/wrench.svg"}} - {{- $alt = "gopher with a wrench"}} -{{- end}} -{{- if eq $gopher "yellow"}} - {{- $src = "/images/gophers/yellow.svg"}} - {{- $alt = "Go gopher"}} -{{- end}} -{{- if eq $gopher "violet"}} - {{- $src = "/images/gophers/violet.svg"}} - {{- $alt = "Go gopher"}} -{{- end}} -{{- if eq $gopher "factory"}} - {{- $src = "/images/gophers/factory.png"}} - {{- $alt = "Go gopher factory"}} -{{- end}} -{{$alt}} -{{- end}} -{{- end}} diff --git a/go.dev/templates/libraries.tmpl b/go.dev/templates/libraries.tmpl deleted file mode 100644 index 219369a8..00000000 --- a/go.dev/templates/libraries.tmpl +++ /dev/null @@ -1,18 +0,0 @@ -{{define "libraries"}} -{{range (yaml .)}} -
    - -
      - {{range .items}} -
    • - {{.text}} -

      {{.desc}}

      -
    • - {{end}} -
    - View More -
    -{{end}} -{{end}} diff --git a/go.dev/templates/pkg.tmpl b/go.dev/templates/pkg.tmpl deleted file mode 100644 index 19d76302..00000000 --- a/go.dev/templates/pkg.tmpl +++ /dev/null @@ -1,3 +0,0 @@ -{{define "pkg path name?" -}} -{{or .name .path}} -{{- end}} diff --git a/go.dev/templates/projects.tmpl b/go.dev/templates/projects.tmpl deleted file mode 100644 index 50f55d98..00000000 --- a/go.dev/templates/projects.tmpl +++ /dev/null @@ -1,49 +0,0 @@ -{{define "projects"}} -
    - - - - - - - - - - - - - {{- range $index, $project := (yaml .)}} - - - - - - {{- end}} - -
    CustomerBrief introductionProjects using go
    - - - -
    -{{end}} diff --git a/go.dev/templates/pullquote.tmpl b/go.dev/templates/pullquote.tmpl deleted file mode 100644 index 3cf8443f..00000000 --- a/go.dev/templates/pullquote.tmpl +++ /dev/null @@ -1,34 +0,0 @@ -{{define "pullquote info" -}} -{{- with (yaml .info)}} - -{{- end}} -{{end}} - diff --git a/go.dev/templates/quote.tmpl b/go.dev/templates/quote.tmpl deleted file mode 100644 index 523e34ee..00000000 --- a/go.dev/templates/quote.tmpl +++ /dev/null @@ -1,21 +0,0 @@ -{{define "quote info" -}} -{{- with (yaml .info)}} -
    -

    - {{.quote | markdownify}} -

    - {{- if .author}} - - {{- end}} -
    -{{- end}} -{{end}} diff --git a/go.dev/templates/toolsblurbs.tmpl b/go.dev/templates/toolsblurbs.tmpl deleted file mode 100644 index 299858c5..00000000 --- a/go.dev/templates/toolsblurbs.tmpl +++ /dev/null @@ -1,18 +0,0 @@ -{{define "toolsblurbs"}} -
    - {{- range (yaml .)}} -
    - - {{.title}} - {{.title}} - - {{- range .paragraphs}} -

    - {{.}} -

    - {{- end}} -
    - {{- end}} -
    - -{{end}} diff --git a/go.dev/testdata/golden/about/index.html b/go.dev/testdata/golden/about/index.html index 52d2b4d7..ff4da4b9 100644 --- a/go.dev/testdata/golden/about/index.html +++ b/go.dev/testdata/golden/about/index.html @@ -14,7 +14,7 @@ - + {{.Title}}{{if not .IsHome}} - go.dev{{end}} -{{if (isset .Params "link") -}} +{{if .Params.link -}} {{end -}} diff --git a/go.dev/_templates/layouts/solution.tmpl b/go.dev/_templates/layouts/solution.tmpl index 8f219009..28b70061 100644 --- a/go.dev/_templates/layouts/solution.tmpl +++ b/go.dev/_templates/layouts/solution.tmpl @@ -9,11 +9,11 @@ {{range .Params.authors}} {{end}} - {{if isset .Params "date"}} + {{if .Params.date}} {{end}}
    - {{if isset .Params "company"}} + {{if .Params.company}}
    {{.Params.company }}
    @@ -30,15 +30,14 @@
    - {{$logo := .Resources.GetMatch "logo"}} {{.Params.company}}

    About {{.Params.company}}

    - {{if isset .Params "description"}} -

    {{- .Params.description | markdownify -}}

    + {{if .Params.description}} +

    {{markdown .Params.description}}

    {{ else }} -

    {{- .Params.quote | markdownify -}}

    +

    {{markdown .Params.quote}}

    {{end}}
    @@ -74,7 +73,7 @@
    {{ end }} - {{.Content | replaceRE " .sectionHeading" "\" class=\"sectionHeading" | safeHTML}} + {{rawhtml (replace .Content ` .sectionHeading">` `" class="sectionHeading">`)}} {{end}} diff --git a/go.dev/_templates/pullquote.tmpl b/go.dev/_templates/pullquote.tmpl index 3cf8443f..aa64dd6f 100644 --- a/go.dev/_templates/pullquote.tmpl +++ b/go.dev/_templates/pullquote.tmpl @@ -5,7 +5,7 @@ Quotation mark.

    - {{.quote | markdownify}} + {{markdown .quote}}

    {{- if .author}}
    @@ -20,7 +20,7 @@ — {{.author -}} {{if .title}},  - {{.title | safeHTML}} + {{rawhtml .title}} {{- end}} {{- if .company}}  at {{.company -}} diff --git a/go.dev/_templates/quote.tmpl b/go.dev/_templates/quote.tmpl index 523e34ee..1355467f 100644 --- a/go.dev/_templates/quote.tmpl +++ b/go.dev/_templates/quote.tmpl @@ -2,7 +2,7 @@ {{- with (yaml .info)}}

    - {{.quote | markdownify}} + {{markdown .quote}}

    {{- if .author}}
    diff --git a/go.dev/cmd/internal/site/page.go b/go.dev/cmd/internal/site/page.go index f7226e61..6ce5b5bf 100644 --- a/go.dev/cmd/internal/site/page.go +++ b/go.dev/cmd/internal/site/page.go @@ -29,20 +29,20 @@ type Page struct { parent string // parent page ID data []byte // page data (markdown) html []byte // rendered page (HTML) - - // yaml metadata and data available to templates - Aliases []string - Content template.HTML - Date anyTime - Description string `yaml:"description"` - Layout string `yaml:"layout"` - LinkTitle string `yaml:"linkTitle"` - Pages []*Page - Params map[string]interface{} - site *Site - TheResources []*Resource `yaml:"resources"` - Title string - Weight int + site *Site + + // loaded from page metadata, available to templates + Aliases []string + Date anyTime + Description string `yaml:"description"` + Layout string `yaml:"layout"` + LinkTitle string `yaml:"linkTitle"` + Title string + + // provided to templates + Content template.HTML `yaml:"-"` + Pages []*Page `yaml:"-"` + Params map[string]interface{} `yaml:"-"` } // loadPage loads the site's page from the given file. @@ -133,7 +133,7 @@ func (site *Site) loadPage(file string) (*Page, error) { // Register aliases. for _, alias := range p.Aliases { - site.redirects[strings.Trim(alias, "/")] = p.Permalink() + site.redirects[strings.Trim(alias, "/")] = p.URL() } return p, nil diff --git a/go.dev/cmd/internal/site/site.go b/go.dev/cmd/internal/site/site.go index 23fa3b3c..d5a34863 100644 --- a/go.dev/cmd/internal/site/site.go +++ b/go.dev/cmd/internal/site/site.go @@ -92,9 +92,6 @@ func Load(dir string) (*Site, error) { if !pi.Date.Equal(pj.Date.Time) { return pi.Date.After(pj.Date.Time) } - if pi.Weight != pj.Weight { - return pi.Weight > pj.Weight - } ti := pi.LinkTitle tj := pj.LinkTitle if ti != tj { diff --git a/go.dev/cmd/internal/site/tmpl.go b/go.dev/cmd/internal/site/tmpl.go index 152ed73f..35104485 100644 --- a/go.dev/cmd/internal/site/tmpl.go +++ b/go.dev/cmd/internal/site/tmpl.go @@ -6,11 +6,8 @@ package site import ( "fmt" - "os" - "path" "path/filepath" "reflect" - "regexp" "sort" "strings" @@ -21,19 +18,16 @@ import ( func (site *Site) initTemplate() error { funcs := template.FuncMap{ - "data": site.data, - "dict": dict, - "first": first, - "isset": isset, - "list": list, - "markdownify": markdownify, - "path": pathFn, - "replace": replace, - "replaceRE": replaceRE, - "safeHTML": safeHTML, - "sort": sortFn, - "where": where, - "yaml": yamlFn, + "data": site.data, + "dict": dict, + "first": first, + "list": list, + "markdown": markdown, + "replace": replace, + "rawhtml": rawhtml, + "sort": sortFn, + "where": where, + "yaml": yamlFn, } site.base = template.New("site").Funcs(funcs) @@ -82,11 +76,6 @@ func first(n int, list reflect.Value) reflect.Value { return out } -func isset(m map[string]interface{}, name string) bool { - _, ok := m[name] - return ok -} - func dict(args ...interface{}) map[string]interface{} { m := make(map[string]interface{}) for i := 0; i < len(args); i += 2 { @@ -100,8 +89,8 @@ func list(args ...interface{}) []interface{} { return args } -// markdownify is the function provided to templates. -func markdownify(data interface{}) template.HTML { +// markdown is the function provided to templates. +func markdown(data interface{}) template.HTML { h := markdownToHTML(toString(data)) s := strings.TrimSpace(string(h)) if strings.HasPrefix(s, "

    ") && strings.HasSuffix(s, "

    ") && strings.Count(s, "

    ") == 1 { @@ -110,31 +99,14 @@ func markdownify(data interface{}) template.HTML { return h } -func pathFn() pathPkg { return pathPkg{} } - -type pathPkg struct{} - -func (pathPkg) Base(s interface{}) string { return path.Base(toString(s)) } -func (pathPkg) Dir(s interface{}) string { return path.Dir(toString(s)) } -func (pathPkg) Join(args ...interface{}) string { - var elem []string - for _, a := range args { - elem = append(elem, toString(a)) - } - return path.Join(elem...) -} - func replace(input, x, y interface{}) string { return strings.ReplaceAll(toString(input), toString(x), toString(y)) } -func replaceRE(pattern, repl, input interface{}) string { - re := regexp.MustCompile(toString(pattern)) - return re.ReplaceAllString(toString(input), toString(repl)) +func rawhtml(s interface{}) template.HTML { + return template.HTML(toString(s)) } -func safeHTML(s interface{}) template.HTML { return template.HTML(toString(s)) } - func sortFn(list reflect.Value, key, asc string) (reflect.Value, error) { out := reflect.Zero(list.Type()) var keys []string @@ -216,8 +188,6 @@ func (p *Page) CurrentSection() *Page { func (p *Page) IsHome() bool { return p.id == "" } -func (p *Page) Param(key string) interface{} { return p.Params[key] } - func (p *Page) Parent() *Page { if p.IsHome() { return nil @@ -225,21 +195,17 @@ func (p *Page) Parent() *Page { return p.site.pagesByID[p.parent] } -func (p *Page) Permalink() string { - return strings.TrimRight(p.site.URL, "/") + p.RelPermalink() +func (p *Page) URL() string { + return strings.TrimRight(p.site.URL, "/") + p.Path() } -func (p *Page) RelPermalink() string { +func (p *Page) Path() string { if p.id == "" { return "/" } return "/" + p.id + "/" } -func (p *Page) Resources() *PageResources { - return &PageResources{p} -} - func (p *Page) Section() string { i := strings.Index(p.section, "/") if i < 0 { @@ -248,33 +214,6 @@ func (p *Page) Section() string { return p.section[:i] } -type PageResources struct{ p *Page } - -func (r *PageResources) GetMatch(name string) (*Resource, error) { - for _, rs := range r.p.TheResources { - if name == rs.Name { - if rs.data == nil { - rs.RelPermalink = strings.TrimPrefix(filepath.ToSlash(filepath.Join(r.p.file, "../"+rs.Src)), "_content") - data, err := os.ReadFile(r.p.site.file(r.p.file + "/../" + rs.Src)) - if err != nil { - return nil, err - } - rs.data = data - } - return rs, nil - } - } - return nil, nil -} - -type Resource struct { - data []byte - RelPermalink string - Name string - Src string - Params map[string]string -} - func yamlFn(s string) (interface{}, error) { var d interface{} if err := yaml.Unmarshal([]byte(s), &d); err != nil { @@ -282,3 +221,7 @@ func yamlFn(s string) (interface{}, error) { } return d, nil } + +func (p *Page) Dir() string { + return strings.TrimPrefix(filepath.ToSlash(filepath.Dir(p.file)), "_content") +} -- cgit v1.3 From d8994ffe64f983eb4679e3b2ba0d3e09975152ca Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 17 May 2021 11:35:28 -0400 Subject: [x/go.dev] all: remove use of index.md for single page Hugo uses both a file-per-page and directory-per-page model. For example go.dev/about/ is served from _content/about.md but go.dev/solutions/dropbox/ is served from _content/solutions/dropbox/index.md. This is needlessly complex. Hugo then has the concept of a section of pages, which would naturally correspond with directories, but since directories are already used for single pages, Hugo defines that a section is a directory with an _index.md instead of an index.md. This CL removes all use of index.md for single pages. Then the directory structure and the section structure can be defined to match exactly, and then the _index.md can become plain index.md. A few images moved their URLs, which should not matter since no sites should be linking to our images. And many images were outright deleted, since they were not linked at all (copies in the images directory are linked instead). Now there is no confusion about index.md versus _index.md. Even better, parent and section are easily defined based on the name of the page's file, instead of being dependent on the content of the surrounding file tree. Change-Id: I081d34a26150a550d6fb40d534f0c6befa4901c2 X-GoDev-Commit: 617b6df873f1d3500a3e484233cd51e7fa79c578 --- go.dev/_content/learn/_index.md | 293 --------------------- go.dev/_content/learn/index.md | 293 +++++++++++++++++++++ go.dev/_content/solutions/_index.md | 180 ------------- go.dev/_content/solutions/americanexpress.md | 83 ++++++ .../solutions/americanexpress/amex-logo.png | Bin 72648 -> 0 bytes go.dev/_content/solutions/americanexpress/index.md | 83 ------ go.dev/_content/solutions/armut.md | 10 + go.dev/_content/solutions/armut/index.md | 10 - go.dev/_content/solutions/capital-one.md | 10 + go.dev/_content/solutions/capital-one/index.md | 10 - go.dev/_content/solutions/capital-one/logo.svg | 2 - go.dev/_content/solutions/clis-green.svg | 13 + go.dev/_content/solutions/clis-white.svg | 19 ++ go.dev/_content/solutions/clis.md | 172 ++++++++++++ go.dev/_content/solutions/clis/CLI-green.svg | 13 - go.dev/_content/solutions/clis/cli-white.svg | 19 -- go.dev/_content/solutions/clis/index.md | 172 ------------ go.dev/_content/solutions/cloud-green.svg | 9 + go.dev/_content/solutions/cloud-white.svg | 13 + go.dev/_content/solutions/cloud.md | 227 ++++++++++++++++ go.dev/_content/solutions/cloud/cloud-green.svg | 9 - go.dev/_content/solutions/cloud/cloud-white.svg | 13 - go.dev/_content/solutions/cloud/index.md | 227 ---------------- go.dev/_content/solutions/cloudflare.md | 13 + go.dev/_content/solutions/cloudflare/index.md | 13 - go.dev/_content/solutions/cloudflare/logo.png | Bin 45434 -> 0 bytes go.dev/_content/solutions/cockroachlabs.md | 12 + go.dev/_content/solutions/cockroachlabs/index.md | 12 - go.dev/_content/solutions/cockroachlabs/logo.png | Bin 9557 -> 0 bytes go.dev/_content/solutions/curve.md | 10 + go.dev/_content/solutions/curve/index.md | 10 - go.dev/_content/solutions/curve/logo.png | Bin 178749 -> 0 bytes go.dev/_content/solutions/devops-green.svg | 14 + go.dev/_content/solutions/devops-white.svg | 18 ++ go.dev/_content/solutions/devops.md | 169 ++++++++++++ go.dev/_content/solutions/devops/index.md | 169 ------------ go.dev/_content/solutions/devops/ops-green.svg | 14 - go.dev/_content/solutions/devops/ops-white.svg | 18 -- go.dev/_content/solutions/dropbox.md | 10 + go.dev/_content/solutions/dropbox/index.md | 10 - go.dev/_content/solutions/dropbox/logo.svg | 9 - go.dev/_content/solutions/facebook.md | 12 + go.dev/_content/solutions/facebook/index.md | 12 - go.dev/_content/solutions/google/_index.md | 78 ------ go.dev/_content/solutions/google/index.md | 78 ++++++ go.dev/_content/solutions/grail.md | 15 ++ go.dev/_content/solutions/grail/index.md | 15 -- go.dev/_content/solutions/grail/logo.png | Bin 12225 -> 0 bytes go.dev/_content/solutions/index.md | 180 +++++++++++++ go.dev/_content/solutions/mercadolibre.md | 171 ++++++++++++ go.dev/_content/solutions/mercadolibre/index.md | 171 ------------ go.dev/_content/solutions/mercadolibre/logo.svg | 119 --------- go.dev/_content/solutions/microsoft.md | 12 + go.dev/_content/solutions/microsoft/index.md | 12 - go.dev/_content/solutions/netflix.md | 10 + go.dev/_content/solutions/netflix/index.md | 10 - go.dev/_content/solutions/netflix/logo.svg | 1 - go.dev/_content/solutions/paypal.md | 88 +++++++ go.dev/_content/solutions/paypal/index.md | 88 ------- go.dev/_content/solutions/paypal/logo.svg | 28 -- go.dev/_content/solutions/riotgames.md | 10 + go.dev/_content/solutions/riotgames/index.md | 10 - go.dev/_content/solutions/riotgames/riotgames.png | Bin 110393 -> 0 bytes go.dev/_content/solutions/salesforce.md | 10 + go.dev/_content/solutions/salesforce/index.md | 10 - go.dev/_content/solutions/salesforce/logo.svg | 16 -- go.dev/_content/solutions/target.md | 10 + go.dev/_content/solutions/target/index.md | 10 - go.dev/_content/solutions/target/logo.svg | 10 - go.dev/_content/solutions/twitch.md | 10 + go.dev/_content/solutions/twitch/index.md | 10 - go.dev/_content/solutions/twitch/logo.svg | 19 -- go.dev/_content/solutions/twitter.md | 10 + go.dev/_content/solutions/twitter/index.md | 10 - go.dev/_content/solutions/twitter/logo.svg | 1 - go.dev/_content/solutions/uber.md | 10 + go.dev/_content/solutions/uber/index.md | 10 - go.dev/_content/solutions/uber/logo.svg | 7 - go.dev/_content/solutions/webdev-green.svg | 15 ++ go.dev/_content/solutions/webdev-white.svg | 19 ++ go.dev/_content/solutions/webdev.md | 211 +++++++++++++++ go.dev/_content/solutions/webdev/index.md | 211 --------------- go.dev/_content/solutions/webdev/webdev-green.svg | 15 -- go.dev/_content/solutions/webdev/webdev-white.svg | 19 -- go.dev/_content/solutions/wildlifestudios.md | 15 ++ go.dev/_content/solutions/wildlifestudios/index.md | 15 -- go.dev/_content/solutions/wildlifestudios/logo.png | Bin 61518 -> 0 bytes go.dev/cmd/internal/site/page.go | 39 +-- .../golden/solutions/americanexpress/amex-logo.png | Bin 72648 -> 0 bytes .../testdata/golden/solutions/capital-one/logo.svg | 2 - go.dev/testdata/golden/solutions/clis-green.svg | 13 + go.dev/testdata/golden/solutions/clis-white.svg | 19 ++ .../testdata/golden/solutions/clis/CLI-green.svg | 13 - .../testdata/golden/solutions/clis/cli-white.svg | 19 -- go.dev/testdata/golden/solutions/cloud-green.svg | 9 + go.dev/testdata/golden/solutions/cloud-white.svg | 13 + .../golden/solutions/cloud/cloud-green.svg | 9 - .../golden/solutions/cloud/cloud-white.svg | 13 - .../testdata/golden/solutions/cloudflare/logo.png | Bin 45434 -> 0 bytes .../golden/solutions/cockroachlabs/logo.png | Bin 9557 -> 0 bytes go.dev/testdata/golden/solutions/curve/logo.png | Bin 178749 -> 0 bytes go.dev/testdata/golden/solutions/devops-green.svg | 14 + go.dev/testdata/golden/solutions/devops-white.svg | 18 ++ .../testdata/golden/solutions/devops/ops-green.svg | 14 - .../testdata/golden/solutions/devops/ops-white.svg | 18 -- go.dev/testdata/golden/solutions/dropbox/logo.svg | 9 - go.dev/testdata/golden/solutions/grail/logo.png | Bin 12225 -> 0 bytes go.dev/testdata/golden/solutions/index.html | 8 +- .../golden/solutions/mercadolibre/logo.svg | 119 --------- go.dev/testdata/golden/solutions/netflix/logo.svg | 1 - go.dev/testdata/golden/solutions/paypal/logo.svg | 28 -- .../golden/solutions/riotgames/riotgames.png | Bin 110393 -> 0 bytes .../testdata/golden/solutions/salesforce/logo.svg | 16 -- go.dev/testdata/golden/solutions/target/logo.svg | 10 - go.dev/testdata/golden/solutions/twitch/logo.svg | 19 -- go.dev/testdata/golden/solutions/twitter/logo.svg | 1 - go.dev/testdata/golden/solutions/uber/logo.svg | 7 - go.dev/testdata/golden/solutions/webdev-green.svg | 15 ++ go.dev/testdata/golden/solutions/webdev-white.svg | 19 ++ .../golden/solutions/webdev/webdev-green.svg | 15 -- .../golden/solutions/webdev/webdev-white.svg | 19 -- .../golden/solutions/wildlifestudios/logo.png | Bin 61518 -> 0 bytes 122 files changed, 2119 insertions(+), 2554 deletions(-) delete mode 100644 go.dev/_content/learn/_index.md create mode 100644 go.dev/_content/learn/index.md delete mode 100644 go.dev/_content/solutions/_index.md create mode 100644 go.dev/_content/solutions/americanexpress.md delete mode 100644 go.dev/_content/solutions/americanexpress/amex-logo.png delete mode 100644 go.dev/_content/solutions/americanexpress/index.md create mode 100644 go.dev/_content/solutions/armut.md delete mode 100644 go.dev/_content/solutions/armut/index.md create mode 100644 go.dev/_content/solutions/capital-one.md delete mode 100644 go.dev/_content/solutions/capital-one/index.md delete mode 100644 go.dev/_content/solutions/capital-one/logo.svg create mode 100644 go.dev/_content/solutions/clis-green.svg create mode 100644 go.dev/_content/solutions/clis-white.svg create mode 100644 go.dev/_content/solutions/clis.md delete mode 100644 go.dev/_content/solutions/clis/CLI-green.svg delete mode 100644 go.dev/_content/solutions/clis/cli-white.svg delete mode 100644 go.dev/_content/solutions/clis/index.md create mode 100644 go.dev/_content/solutions/cloud-green.svg create mode 100644 go.dev/_content/solutions/cloud-white.svg create mode 100644 go.dev/_content/solutions/cloud.md delete mode 100644 go.dev/_content/solutions/cloud/cloud-green.svg delete mode 100644 go.dev/_content/solutions/cloud/cloud-white.svg delete mode 100644 go.dev/_content/solutions/cloud/index.md create mode 100644 go.dev/_content/solutions/cloudflare.md delete mode 100644 go.dev/_content/solutions/cloudflare/index.md delete mode 100644 go.dev/_content/solutions/cloudflare/logo.png create mode 100644 go.dev/_content/solutions/cockroachlabs.md delete mode 100644 go.dev/_content/solutions/cockroachlabs/index.md delete mode 100644 go.dev/_content/solutions/cockroachlabs/logo.png create mode 100644 go.dev/_content/solutions/curve.md delete mode 100644 go.dev/_content/solutions/curve/index.md delete mode 100644 go.dev/_content/solutions/curve/logo.png create mode 100644 go.dev/_content/solutions/devops-green.svg create mode 100644 go.dev/_content/solutions/devops-white.svg create mode 100644 go.dev/_content/solutions/devops.md delete mode 100644 go.dev/_content/solutions/devops/index.md delete mode 100644 go.dev/_content/solutions/devops/ops-green.svg delete mode 100644 go.dev/_content/solutions/devops/ops-white.svg create mode 100644 go.dev/_content/solutions/dropbox.md delete mode 100644 go.dev/_content/solutions/dropbox/index.md delete mode 100644 go.dev/_content/solutions/dropbox/logo.svg create mode 100644 go.dev/_content/solutions/facebook.md delete mode 100644 go.dev/_content/solutions/facebook/index.md delete mode 100644 go.dev/_content/solutions/google/_index.md create mode 100644 go.dev/_content/solutions/google/index.md create mode 100644 go.dev/_content/solutions/grail.md delete mode 100644 go.dev/_content/solutions/grail/index.md delete mode 100644 go.dev/_content/solutions/grail/logo.png create mode 100644 go.dev/_content/solutions/index.md create mode 100644 go.dev/_content/solutions/mercadolibre.md delete mode 100644 go.dev/_content/solutions/mercadolibre/index.md delete mode 100644 go.dev/_content/solutions/mercadolibre/logo.svg create mode 100644 go.dev/_content/solutions/microsoft.md delete mode 100644 go.dev/_content/solutions/microsoft/index.md create mode 100644 go.dev/_content/solutions/netflix.md delete mode 100644 go.dev/_content/solutions/netflix/index.md delete mode 100644 go.dev/_content/solutions/netflix/logo.svg create mode 100644 go.dev/_content/solutions/paypal.md delete mode 100644 go.dev/_content/solutions/paypal/index.md delete mode 100644 go.dev/_content/solutions/paypal/logo.svg create mode 100644 go.dev/_content/solutions/riotgames.md delete mode 100644 go.dev/_content/solutions/riotgames/index.md delete mode 100644 go.dev/_content/solutions/riotgames/riotgames.png create mode 100644 go.dev/_content/solutions/salesforce.md delete mode 100644 go.dev/_content/solutions/salesforce/index.md delete mode 100755 go.dev/_content/solutions/salesforce/logo.svg create mode 100644 go.dev/_content/solutions/target.md delete mode 100644 go.dev/_content/solutions/target/index.md delete mode 100644 go.dev/_content/solutions/target/logo.svg create mode 100644 go.dev/_content/solutions/twitch.md delete mode 100644 go.dev/_content/solutions/twitch/index.md delete mode 100644 go.dev/_content/solutions/twitch/logo.svg create mode 100644 go.dev/_content/solutions/twitter.md delete mode 100644 go.dev/_content/solutions/twitter/index.md delete mode 100755 go.dev/_content/solutions/twitter/logo.svg create mode 100644 go.dev/_content/solutions/uber.md delete mode 100644 go.dev/_content/solutions/uber/index.md delete mode 100644 go.dev/_content/solutions/uber/logo.svg create mode 100644 go.dev/_content/solutions/webdev-green.svg create mode 100644 go.dev/_content/solutions/webdev-white.svg create mode 100644 go.dev/_content/solutions/webdev.md delete mode 100644 go.dev/_content/solutions/webdev/index.md delete mode 100644 go.dev/_content/solutions/webdev/webdev-green.svg delete mode 100644 go.dev/_content/solutions/webdev/webdev-white.svg create mode 100644 go.dev/_content/solutions/wildlifestudios.md delete mode 100644 go.dev/_content/solutions/wildlifestudios/index.md delete mode 100644 go.dev/_content/solutions/wildlifestudios/logo.png delete mode 100644 go.dev/testdata/golden/solutions/americanexpress/amex-logo.png delete mode 100644 go.dev/testdata/golden/solutions/capital-one/logo.svg create mode 100644 go.dev/testdata/golden/solutions/clis-green.svg create mode 100644 go.dev/testdata/golden/solutions/clis-white.svg delete mode 100644 go.dev/testdata/golden/solutions/clis/CLI-green.svg delete mode 100644 go.dev/testdata/golden/solutions/clis/cli-white.svg create mode 100644 go.dev/testdata/golden/solutions/cloud-green.svg create mode 100644 go.dev/testdata/golden/solutions/cloud-white.svg delete mode 100644 go.dev/testdata/golden/solutions/cloud/cloud-green.svg delete mode 100644 go.dev/testdata/golden/solutions/cloud/cloud-white.svg delete mode 100644 go.dev/testdata/golden/solutions/cloudflare/logo.png delete mode 100644 go.dev/testdata/golden/solutions/cockroachlabs/logo.png delete mode 100644 go.dev/testdata/golden/solutions/curve/logo.png create mode 100644 go.dev/testdata/golden/solutions/devops-green.svg create mode 100644 go.dev/testdata/golden/solutions/devops-white.svg delete mode 100644 go.dev/testdata/golden/solutions/devops/ops-green.svg delete mode 100644 go.dev/testdata/golden/solutions/devops/ops-white.svg delete mode 100644 go.dev/testdata/golden/solutions/dropbox/logo.svg delete mode 100644 go.dev/testdata/golden/solutions/grail/logo.png delete mode 100644 go.dev/testdata/golden/solutions/mercadolibre/logo.svg delete mode 100644 go.dev/testdata/golden/solutions/netflix/logo.svg delete mode 100644 go.dev/testdata/golden/solutions/paypal/logo.svg delete mode 100644 go.dev/testdata/golden/solutions/riotgames/riotgames.png delete mode 100644 go.dev/testdata/golden/solutions/salesforce/logo.svg delete mode 100644 go.dev/testdata/golden/solutions/target/logo.svg delete mode 100644 go.dev/testdata/golden/solutions/twitch/logo.svg delete mode 100644 go.dev/testdata/golden/solutions/twitter/logo.svg delete mode 100644 go.dev/testdata/golden/solutions/uber/logo.svg create mode 100644 go.dev/testdata/golden/solutions/webdev-green.svg create mode 100644 go.dev/testdata/golden/solutions/webdev-white.svg delete mode 100644 go.dev/testdata/golden/solutions/webdev/webdev-green.svg delete mode 100644 go.dev/testdata/golden/solutions/webdev/webdev-white.svg delete mode 100644 go.dev/testdata/golden/solutions/wildlifestudios/logo.png diff --git a/go.dev/_content/learn/_index.md b/go.dev/_content/learn/_index.md deleted file mode 100644 index e98e9eb2..00000000 --- a/go.dev/_content/learn/_index.md +++ /dev/null @@ -1,293 +0,0 @@ ---- -title: "Getting Started" ---- - -

    -
    -
    -
    - {{breadcrumbs .}} -

    Install the latest version of Go

    -

    - Install the latest version of Go. For instructions to download and install - the Go compilers, tools, and libraries, - - view the install documentation. - -

    - -

    - Download packages for - Windows 64-bit, - macOS, - Linux, and - more. -

    -
    -
    - Go Gopher riding a motorcycle -
    -
    -
    -
      - {{range first 3 (data "learn/quickstart")}} -
    • - {{template "learn-card" .}} -
    • - {{end}} -
    -
    -
    -
    - -
    -

    Learning Resources

    -
    - -
    -
    -
    -

    Guided learning journeys

    -
    -
    -
      - {{range first 4 (data "learn/guided")}} -
    • - {{template "learn-card" .}} -
    • - {{ end }} -
    -
    -
    -
    - -
    -
    -
    -

    Online learning

    -
    -
    -
      - {{range first 4 (data "learn/courses") }} -
    • - {{template "learn-card" .}} -
    • - {{ end }} -
    -
    -
    -
    - -
    -
    -
    -

    Google Cloud Self-Paced Labs

    -
    -
    -
      - {{ range first 4 (data "learn/cloud") }} -
    • - {{template "learn-self-paced-card" .}} -
    • - - {{ end }} -
    -
    -
    -
    - - - -
    -
    -
    -

    In-person training

    -
    -
    -
      - {{range first 4 (data "learn/training")}} -
    • -

      - {{.title}} -

      -

      {{.blurb}}

      -
    • - {{end}} -
    -
    -
    -
    - -
    -
    -
    -

    Meetups

    -

    - View more events > -

    -
    -
      - {{range first 3 (data "events").all}} -
    • -
      - {{if .photourl}} - {{.name}} group photo - {{else}} - meetup logo - {{end}} -
      -
      -
      -

      {{.local_date}} · {{.city}}, {{.state}} {{.country}}

      -
      -
      -

      - {{.name}} -

      -

      {{rawhtml .description}}

      -
      -
      - {{ with .attendees }} - {{range first 5 .}} -
      - {{.name}} -
      - {{end}} - {{end}} -
      -
      -
    • - {{end}} -
    -
    -
    - -{{define "learn-card"}} -
    -
    - {{if .thumbnail}} -
    - {{end}} -
    -
    {{.title}}
    -

    {{rawhtml .content}}

    - -
    -
    -
    -{{end}} - -{{define "learn-self-paced-card"}} - -{{end}} - -{{define "learn-book"}} - -{{end}} diff --git a/go.dev/_content/learn/index.md b/go.dev/_content/learn/index.md new file mode 100644 index 00000000..e98e9eb2 --- /dev/null +++ b/go.dev/_content/learn/index.md @@ -0,0 +1,293 @@ +--- +title: "Getting Started" +--- + +
    +
    +
    +
    + {{breadcrumbs .}} +

    Install the latest version of Go

    +

    + Install the latest version of Go. For instructions to download and install + the Go compilers, tools, and libraries, + + view the install documentation. + +

    + +

    + Download packages for + Windows 64-bit, + macOS, + Linux, and + more. +

    +
    +
    + Go Gopher riding a motorcycle +
    +
    +
    +
      + {{range first 3 (data "learn/quickstart")}} +
    • + {{template "learn-card" .}} +
    • + {{end}} +
    +
    +
    +
    + +
    +

    Learning Resources

    +
    + +
    +
    +
    +

    Guided learning journeys

    +
    +
    +
      + {{range first 4 (data "learn/guided")}} +
    • + {{template "learn-card" .}} +
    • + {{ end }} +
    +
    +
    +
    + +
    +
    +
    +

    Online learning

    +
    +
    +
      + {{range first 4 (data "learn/courses") }} +
    • + {{template "learn-card" .}} +
    • + {{ end }} +
    +
    +
    +
    + +
    +
    +
    +

    Google Cloud Self-Paced Labs

    +
    +
    +
      + {{ range first 4 (data "learn/cloud") }} +
    • + {{template "learn-self-paced-card" .}} +
    • + + {{ end }} +
    +
    +
    +
    + + + +
    +
    +
    +

    In-person training

    +
    +
    +
      + {{range first 4 (data "learn/training")}} +
    • +

      + {{.title}} +

      +

      {{.blurb}}

      +
    • + {{end}} +
    +
    +
    +
    + +
    +
    +
    +

    Meetups

    +

    + View more events > +

    +
    +
      + {{range first 3 (data "events").all}} +
    • +
      + {{if .photourl}} + {{.name}} group photo + {{else}} + meetup logo + {{end}} +
      +
      +
      +

      {{.local_date}} · {{.city}}, {{.state}} {{.country}}

      +
      +
      +

      + {{.name}} +

      +

      {{rawhtml .description}}

      +
      +
      + {{ with .attendees }} + {{range first 5 .}} +
      + {{.name}} +
      + {{end}} + {{end}} +
      +
      +
    • + {{end}} +
    +
    +
    + +{{define "learn-card"}} +
    +
    + {{if .thumbnail}} +
    + {{end}} +
    +
    {{.title}}
    +

    {{rawhtml .content}}

    + +
    +
    +
    +{{end}} + +{{define "learn-self-paced-card"}} + +{{end}} + +{{define "learn-book"}} + +{{end}} diff --git a/go.dev/_content/solutions/_index.md b/go.dev/_content/solutions/_index.md deleted file mode 100644 index 47678995..00000000 --- a/go.dev/_content/solutions/_index.md +++ /dev/null @@ -1,180 +0,0 @@ ---- -title: Why Go ---- - -
    - -
    -
    -
    -
    - - -
    -
    - - - -
    -
    diff --git a/go.dev/_content/solutions/americanexpress.md b/go.dev/_content/solutions/americanexpress.md new file mode 100644 index 00000000..b1141508 --- /dev/null +++ b/go.dev/_content/solutions/americanexpress.md @@ -0,0 +1,83 @@ +--- +title: "American Express Uses Go for Payments & Rewards" +layout: solution +company: American Express +logoSrc: american-express.svg +heroImgSrc: go_amex_case_study_logo.png +carouselImgSrc: go_amex_case_study.png +date: 2019-12-19 +series: Case Studies +quote: Go provides American Express with the speed and scalability it needs for both its payment and rewards networks. +--- + +{{pullquote ` + author: Glen Balliet + title: Engineering Director of loyalty platforms + company: American Express + quote: | + What makes Go different from other programming languages is cognitive load. You can do more with less code, which makes it easier to reason about and understand the code that you do end up writing. + + The majority of Go code ends up looking quite similar, so, even if you’re working with a completely new codebase, you can get up and running pretty quickly. +`}} + +## Go Improves Microservices and Speeds Productivity + +Founded in 1850, American Express is a globally integrated payments company offering charge and credit card products, merchant acquisition and processing services, network services, and travel-related services. + +American Express’ payment processing systems have been developed over its long history and have been updated across multiple architectural evolutions. Foremost in any update, payment processing needs to be fast, especially at very large transaction volumes, with resilience built across systems that must all be compliant with security and regulatory standards. With Go, American Express gains the speed and scalability it needs for both its payment and rewards networks. + +### Modernizing American Express systems + +American Express understands that the programming language landscape is changing drastically. The company's existing systems were purpose-built for high concurrency and low latency, but knowing that those systems would be re-platformed in the near future. The payments platform team decided to take the time to identify what languages were ideal for American Express' evolving needs. + +The payments and rewards platform teams at American Express were among the first to start evaluating Go. These teams were focused on microservices, transaction routing, and load-balancing use cases, and they needed to modernize their architecture. Many American Express developers were familiar with the language’s capabilities and wanted to pilot Go for their high concurrency and low latency applications (such as custom transactional load balancers). With this goal in mind, the teams began lobbying senior leadership to deploy Go on the American Express payment platform. + +"We wanted to find the optimal language for writing fast and efficient applications for payment processing," says Benjamin Cane, vice president and principal engineer at American Express. "To do so, we started an internal programming language showdown with the goal of seeing which language best fit our design and performance needs." + +### Comparing languages + +For their assessment, Cane's team chose to build a microservice in four different programming languages. They then compared the four languages for speed/performance, tooling, testing, and ease of development. + +For the service, they decided on an ISO8583 to JSON converter. ISO8583 is an international standard for financial transactions, and it’s commonly used within American Express' payment network. For the programming languages, they chose to compare C++, Go, Java and Node.js. With the exception of Go, all of these languages were already in use within American Express. + +From a speed perspective, Go achieved the second-best performance at 140,000 requests per second. Go showed that it excels when used for backend microservices. + +While Go may not have been the fastest language tested, its powerful tooling helped bolster its overall results. Go's built-in testing framework, profiling capabilities, and benchmarking tools impressed the team. "It is easy to write effective tests in Go," says Cane. "The benchmarking and profiling features make it simple to tune our application. Coupled with its fast build times, Go makes it easy to write well-tested and optimized code." + +Ultimately, Go was selected by the team as the preferred language for building high-performance microservices. The tooling, testing frameworks, performance, and language simplicity were all key contributors. + +### Go for infrastructure + +"Many of our services are running in Docker containers within our Kubernetes-based internal cloud platform" says Cane. Kubernetes is an open-source container-orchestration system written in Go. It provides clusters of hosts to run container based workloads, most notably Docker containers. Docker is a software product, also written in Go, that uses operating system level virtualization to provide portable software runtimes called containers. + +American Express also collects application metrics via Prometheus, an open-source monitoring and alerting toolkit written in Go. Prometheus collects and aggregates real-time events and metrics for monitoring and alerts. + +This triumvirate of Go solutions—Kubernetes, Docker, and Prometheus—has helped modernize American Express infrastructure. + +### Improving performance with Go + +Today, scores of developers are programming with Go at American Express, with most working on platforms designed for high availability and performance. + +"Tooling has always been a critical area of need for our legacy code base," says Cane. "We have found that Go has excellent tooling, plus built-in testing, benchmarking, and profiling frameworks. It is easy to write efficient and resilient applications." + +{{backgroundquote ` + author: Benjamin Cane + title: Vice President and Principal Engineer + company: American Express + quote: | + After working on Go, most of our developers don't want to go back to other languages. +`}} + +American Express is just beginning to see the benefits of Go. For example, Go was designed from the ground up with concurrency in mind – using lightweight “goroutines” rather than heavier-weight operating system threads – making it practical to create hundreds of thousands of goroutines in the same address space. Using goroutines, American Express has seen improved performance numbers in its real-time transaction processing. + +Go’s garbage collection is also a major improvement over other languages, both in terms of performance and ease of development. “We saw far better results of garbage collection in Go than we did in other languages, and garbage collection for real time transaction processing is a big deal.” says Cane. “Tuning garbage collection in other languages can be very complicated. With Go you don’t tune anything.” + +To learn more, read ["Choosing Go at American Express"](https://americanexpress.io/choosing-go/) which goes into more depth about American Express' Go adoption. + +### Getting your enterprise started with Go + +Just as American Express is using Go to modernize its payment and rewards networks, dozens of other large enterprises are adopting Go as well. + +There are over one million developers using Go worldwide—spanning banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as [PayPal](https://go.dev/solutions/paypal), [Mercado Libre](https://go.dev/solutions/mercadolibre), Capital One, Dropbox, IBM, Mercado Libre, Monzo, New York Times, Salesforce, Square, Target, Twitch, Uber, and of course Google. + +To learn more about how Go can help your enterprise build reliable, scalable software as it does at American Express, visit [go.dev](https://go.dev) today. diff --git a/go.dev/_content/solutions/americanexpress/amex-logo.png b/go.dev/_content/solutions/americanexpress/amex-logo.png deleted file mode 100644 index 298ccf6e..00000000 Binary files a/go.dev/_content/solutions/americanexpress/amex-logo.png and /dev/null differ diff --git a/go.dev/_content/solutions/americanexpress/index.md b/go.dev/_content/solutions/americanexpress/index.md deleted file mode 100644 index b1141508..00000000 --- a/go.dev/_content/solutions/americanexpress/index.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "American Express Uses Go for Payments & Rewards" -layout: solution -company: American Express -logoSrc: american-express.svg -heroImgSrc: go_amex_case_study_logo.png -carouselImgSrc: go_amex_case_study.png -date: 2019-12-19 -series: Case Studies -quote: Go provides American Express with the speed and scalability it needs for both its payment and rewards networks. ---- - -{{pullquote ` - author: Glen Balliet - title: Engineering Director of loyalty platforms - company: American Express - quote: | - What makes Go different from other programming languages is cognitive load. You can do more with less code, which makes it easier to reason about and understand the code that you do end up writing. - - The majority of Go code ends up looking quite similar, so, even if you’re working with a completely new codebase, you can get up and running pretty quickly. -`}} - -## Go Improves Microservices and Speeds Productivity - -Founded in 1850, American Express is a globally integrated payments company offering charge and credit card products, merchant acquisition and processing services, network services, and travel-related services. - -American Express’ payment processing systems have been developed over its long history and have been updated across multiple architectural evolutions. Foremost in any update, payment processing needs to be fast, especially at very large transaction volumes, with resilience built across systems that must all be compliant with security and regulatory standards. With Go, American Express gains the speed and scalability it needs for both its payment and rewards networks. - -### Modernizing American Express systems - -American Express understands that the programming language landscape is changing drastically. The company's existing systems were purpose-built for high concurrency and low latency, but knowing that those systems would be re-platformed in the near future. The payments platform team decided to take the time to identify what languages were ideal for American Express' evolving needs. - -The payments and rewards platform teams at American Express were among the first to start evaluating Go. These teams were focused on microservices, transaction routing, and load-balancing use cases, and they needed to modernize their architecture. Many American Express developers were familiar with the language’s capabilities and wanted to pilot Go for their high concurrency and low latency applications (such as custom transactional load balancers). With this goal in mind, the teams began lobbying senior leadership to deploy Go on the American Express payment platform. - -"We wanted to find the optimal language for writing fast and efficient applications for payment processing," says Benjamin Cane, vice president and principal engineer at American Express. "To do so, we started an internal programming language showdown with the goal of seeing which language best fit our design and performance needs." - -### Comparing languages - -For their assessment, Cane's team chose to build a microservice in four different programming languages. They then compared the four languages for speed/performance, tooling, testing, and ease of development. - -For the service, they decided on an ISO8583 to JSON converter. ISO8583 is an international standard for financial transactions, and it’s commonly used within American Express' payment network. For the programming languages, they chose to compare C++, Go, Java and Node.js. With the exception of Go, all of these languages were already in use within American Express. - -From a speed perspective, Go achieved the second-best performance at 140,000 requests per second. Go showed that it excels when used for backend microservices. - -While Go may not have been the fastest language tested, its powerful tooling helped bolster its overall results. Go's built-in testing framework, profiling capabilities, and benchmarking tools impressed the team. "It is easy to write effective tests in Go," says Cane. "The benchmarking and profiling features make it simple to tune our application. Coupled with its fast build times, Go makes it easy to write well-tested and optimized code." - -Ultimately, Go was selected by the team as the preferred language for building high-performance microservices. The tooling, testing frameworks, performance, and language simplicity were all key contributors. - -### Go for infrastructure - -"Many of our services are running in Docker containers within our Kubernetes-based internal cloud platform" says Cane. Kubernetes is an open-source container-orchestration system written in Go. It provides clusters of hosts to run container based workloads, most notably Docker containers. Docker is a software product, also written in Go, that uses operating system level virtualization to provide portable software runtimes called containers. - -American Express also collects application metrics via Prometheus, an open-source monitoring and alerting toolkit written in Go. Prometheus collects and aggregates real-time events and metrics for monitoring and alerts. - -This triumvirate of Go solutions—Kubernetes, Docker, and Prometheus—has helped modernize American Express infrastructure. - -### Improving performance with Go - -Today, scores of developers are programming with Go at American Express, with most working on platforms designed for high availability and performance. - -"Tooling has always been a critical area of need for our legacy code base," says Cane. "We have found that Go has excellent tooling, plus built-in testing, benchmarking, and profiling frameworks. It is easy to write efficient and resilient applications." - -{{backgroundquote ` - author: Benjamin Cane - title: Vice President and Principal Engineer - company: American Express - quote: | - After working on Go, most of our developers don't want to go back to other languages. -`}} - -American Express is just beginning to see the benefits of Go. For example, Go was designed from the ground up with concurrency in mind – using lightweight “goroutines” rather than heavier-weight operating system threads – making it practical to create hundreds of thousands of goroutines in the same address space. Using goroutines, American Express has seen improved performance numbers in its real-time transaction processing. - -Go’s garbage collection is also a major improvement over other languages, both in terms of performance and ease of development. “We saw far better results of garbage collection in Go than we did in other languages, and garbage collection for real time transaction processing is a big deal.” says Cane. “Tuning garbage collection in other languages can be very complicated. With Go you don’t tune anything.” - -To learn more, read ["Choosing Go at American Express"](https://americanexpress.io/choosing-go/) which goes into more depth about American Express' Go adoption. - -### Getting your enterprise started with Go - -Just as American Express is using Go to modernize its payment and rewards networks, dozens of other large enterprises are adopting Go as well. - -There are over one million developers using Go worldwide—spanning banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as [PayPal](https://go.dev/solutions/paypal), [Mercado Libre](https://go.dev/solutions/mercadolibre), Capital One, Dropbox, IBM, Mercado Libre, Monzo, New York Times, Salesforce, Square, Target, Twitch, Uber, and of course Google. - -To learn more about how Go can help your enterprise build reliable, scalable software as it does at American Express, visit [go.dev](https://go.dev) today. diff --git a/go.dev/_content/solutions/armut.md b/go.dev/_content/solutions/armut.md new file mode 100644 index 00000000..08d3a58e --- /dev/null +++ b/go.dev/_content/solutions/armut.md @@ -0,0 +1,10 @@ +--- +linkTitle: "How Armut Labs use Go " +description: "Learn about how Armut Labs reduced resource consumption and API response time after moving from C# and .net core to Go." +layout: solution +company: Armut +logoSrc: armut.png +series: Case Studies +link: https://labs.armut.com/how-we-decreased-one-of-our-apis-response-time-by-87-and-used-less-resources-ce847e83308 +inLandingPageGrid: false +--- diff --git a/go.dev/_content/solutions/armut/index.md b/go.dev/_content/solutions/armut/index.md deleted file mode 100644 index 08d3a58e..00000000 --- a/go.dev/_content/solutions/armut/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -linkTitle: "How Armut Labs use Go " -description: "Learn about how Armut Labs reduced resource consumption and API response time after moving from C# and .net core to Go." -layout: solution -company: Armut -logoSrc: armut.png -series: Case Studies -link: https://labs.armut.com/how-we-decreased-one-of-our-apis-response-time-by-87-and-used-less-resources-ce847e83308 -inLandingPageGrid: false ---- diff --git a/go.dev/_content/solutions/capital-one.md b/go.dev/_content/solutions/capital-one.md new file mode 100644 index 00000000..2f0e7af4 --- /dev/null +++ b/go.dev/_content/solutions/capital-one.md @@ -0,0 +1,10 @@ +--- +linkTitle: "Capital One - A Serverless and Go Journey" +description: "At the time, no single team member knew Go, but within a month, everyone was writing in Go and we were building out the endpoints. It was the flexibility, how easy it was to use, and the really cool concept behind Go (how Go handles native concurrency, garbage collection, and of course safety+speed.) that helped engage us during the build. Also, who can beat that cute mascot!" +layout: solution +company: Capital One +logoSrc: capital-one.svg +series: Case Studies +link: https://medium.com/capital-one-tech/a-serverless-and-go-journey-credit-offers-api-74ef1f9fde7f +inLandingPageGrid: true +--- diff --git a/go.dev/_content/solutions/capital-one/index.md b/go.dev/_content/solutions/capital-one/index.md deleted file mode 100644 index 2f0e7af4..00000000 --- a/go.dev/_content/solutions/capital-one/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -linkTitle: "Capital One - A Serverless and Go Journey" -description: "At the time, no single team member knew Go, but within a month, everyone was writing in Go and we were building out the endpoints. It was the flexibility, how easy it was to use, and the really cool concept behind Go (how Go handles native concurrency, garbage collection, and of course safety+speed.) that helped engage us during the build. Also, who can beat that cute mascot!" -layout: solution -company: Capital One -logoSrc: capital-one.svg -series: Case Studies -link: https://medium.com/capital-one-tech/a-serverless-and-go-journey-credit-offers-api-74ef1f9fde7f -inLandingPageGrid: true ---- diff --git a/go.dev/_content/solutions/capital-one/logo.svg b/go.dev/_content/solutions/capital-one/logo.svg deleted file mode 100644 index 5c3fdda2..00000000 --- a/go.dev/_content/solutions/capital-one/logo.svg +++ /dev/null @@ -1,2 +0,0 @@ - -image/svg+xml diff --git a/go.dev/_content/solutions/clis-green.svg b/go.dev/_content/solutions/clis-green.svg new file mode 100644 index 00000000..01fed5b7 --- /dev/null +++ b/go.dev/_content/solutions/clis-green.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/_content/solutions/clis-white.svg b/go.dev/_content/solutions/clis-white.svg new file mode 100644 index 00000000..a08127d7 --- /dev/null +++ b/go.dev/_content/solutions/clis-white.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/_content/solutions/clis.md b/go.dev/_content/solutions/clis.md new file mode 100644 index 00000000..8699f0be --- /dev/null +++ b/go.dev/_content/solutions/clis.md @@ -0,0 +1,172 @@ +--- +title: "Command-line Interfaces (CLIs)" +linkTitle: "Command-line Interfaces (CLIs)" +description: "With popular open source packages and a robust standard library, use Go to create fast and elegant CLIs." +date: 2019-10-04T15:26:31-04:00 +layout: solution +series: Use Cases +icon: + file: clis-green.svg + alt: CLI icon +icon-white: + file: clis-white.svg + alt: CLI icon +--- + +## Overview {#overview .sectionHeading} + +### CLI developers prefer Go for portability, performance, and ease of creation + +Command line interfaces (CLIs), unlike graphical user interfaces (GUIs), are text-only. Cloud and infrastructure applications are primarily CLI-based due to their easy automation and remote capabilities. + +## Key benefits {#key-benefits .sectionHeading} + +### Leverage fast compile times to build programs that start quickly and run on any system + +Developers of CLIs find Go to be ideal for designing their applications. Go compiles very quickly into a single binary, works across platforms with a consistent style, and brings a strong development community. From a single Windows or Mac laptop, developers can build a Go program for every one of the dozens of architectures and operating systems Go supports in a matter of seconds, no complicated build farms are needed. No other compiled language can be built as portably or quickly. Go applications are built into a single self contained binary making installing Go applications trivial. + +Specifically, **programs written in Go run on any system without requiring any existing libraries, runtimes, or dependencies**. And **programs written in Go have an immediate startup time**—similar to C or C++ but unobtainable with other programming languages. + +## Use Case {#use-case .sectionHeading} + +### Use Go for building elegant CLIs + +{{backgroundquote ` + author: Steve Domino + title: senior engineer and architect at Strala + link: https://medium.com/@skdomino/writing-better-clis-one-snake-at-a-time-d22e50e60056 + quote: | + I was tasked with building our CLI tool and found two really great projects, Cobra and Viper, which make building CLI’s easy. Individually they are very powerful, very flexible and very good at what they do. But together they will help you show your next CLI who is boss! +`}} + +{{backgroundquote ` + author: Francesc Campoy + title: VP of product at DGraph Labs and producer of Just For Func videos + link: https://www.youtube.com/watch?v=WvWPGVKLvR4 + quote: | + Cobra is a great product to write small tools or even large ones. It’s more of a framework than a library, because when you call the binary that would create a skeleton, then you would be adding code in between.” +`}} + +When developing CLIs in Go, two tools are widely used: Cobra & Viper. + +{{pkg "github.com/spf13/cobra" "Cobra"}} is both a library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go. Cobra powers most of the popular Go applications including CoreOS, Delve, Docker, Dropbox, Git Lfs, Hugo, Kubernetes, and [many more](https://pkg.go.dev/github.com/spf13/cobra?tab=importedby). With integrated command help, autocomplete and documentation “[it] makes documenting each command really simple,” says [Alex Ellis](https://blog.alexellis.io/5-keys-to-a-killer-go-cli/), founder of OpenFaaS. + + +{{pkg "github.com/spf13/viper" "Viper"}} is a complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats. Cobra and Viper are designed to work together. + +Viper [supports nested structures](https://scene-si.org/2017/04/20/managing-configuration-with-viper/) in the configuration, allowing CLI developers to manage the configuration for multiple parts of a large application. Viper also provides all of the tooling need to easily build twelve factor apps. + +"If you don’t want to pollute your command line, or if you’re working with sensitive data which you don’t want to show up in the history, it’s a good idea to work with environment variables. To do this, you can use Viper," [suggests Geudens](https://ordina-jworks.github.io/development/2018/10/20/make-your-own-cli-with-golang-and-cobra.html). + +{{projects ` + - company: Comcast + url: https://xfinity.com/ + logoSrc: comcast.svg + desc: Comcast uses Go for a CLI client used to publish and subscribe to it’s high-traffic sites. The company also supports an open source client library which is written in Go - designed for working with Apache Pulsar. + ctas: + - text: Client library for Apache Pulsar + url: https://github.com/Comcast/pulsar-client-go + - text: Pulsar CLI Client + url: https://github.com/Comcast/pulsar-client-go/blob/master/cli/main.go + - company: GitHub + url: https://github.com/ + logoSrc: github.svg + desc: GitHub uses Go for a command-line tool that makes it easier to work with GitHub, wrapping git in order to extend it with extra features and commands. + ctas: + - text: GitHub command-line tool + url: https://github.com/github/hub + - company: Hugo + url: http://gohugo.io/ + logoSrc: hugo.svg + desc: Hugo is one of the most popular Go CLI applications powering thousands of sites, including this one. One reason for it’s popularity is it’s ease of install thanks to Go. Hugo author Bjørn Erik Pedersen writes “The single binary takes most of the pain out of installation and upgrades.” + ctas: + - text: Hugo Website + url: https://gohugo.io/ + - company: Kubernetes + url: https://kubernetes.com/ + logoSrc: kubernetes.svg + desc: Kubernetes is one of the most popular Go CLI applications. Kubernetes Creator, Joe Beda, said that for writing Kubernetes, “Go was the only logical choice”. Calling Go “the sweet spot” between low level languages like C++ and high level languages like Python. + ctas: + - text: Kubernetes + Go + url: https://blog.gopheracademy.com/birthday-bash-2014/kubernetes-go-crazy-delicious/ + - company: MongoDB + url: https://mongodb.com/ + logoSrc: mongodb.svg + desc: MongoDB chose to implement their Backup CLI Tool in Go citing Go’s “C-like syntax, strong standard library, the resolution of concurrency problems via goroutines, and painless multi-platform distribution” as reasons. + ctas: + - text: MongoDB Backup Service + url: https://www.mongodb.com/blog/post/go-agent-go + - company: Netflix + url: http://netflix.com/ + logoSrc: netflix.svg + desc: Netflix uses Go to build the CLI application ChaosMonkey, an application responsible for randomly terminating instances in production to ensure that engineers implement their services to be resilient to instance failures. + ctas: + - text: Netflix Techblog Article + url: https://medium.com/netflix-techblog/application-data-caching-using-ssds-5bf25df851ef + - company: Stripe + url: https://stripe.com/ + logoSrc: stripe.svg + desc: Stripe uses Go for the Stripe CLI aimed to help build, test, and manage a Stripe integration right from the terminal. + ctas: + - text: Stripe CLI + url: https://github.com/stripe/stripe-cli + - company: Uber + url: https://uber.com/ + logoSrc: uber.svg + desc: Uber uses Go for several CLI tools, including the CLI API for Jaeger, a distributed tracing system used for monitoring microservice distributed systems. + ctas: + - text: CLI API for Jaeger + url: https://www.jaegertracing.io/docs/1.14/cli/ +`}} + +## Get Started {#get-started .sectionHeading} + +### Go books for creating CLIs + +{{books ` + - title: Powerful Command-Line Applications in Go + url: https://www.amazon.com/Powerful-Command-Line-Applications-Go-Maintainable/dp/168050696X + thumbnail: /images/books/powerful-command-line-applications-in-go.jpg + - title: Go in Action + url: https://www.amazon.com/Go-Action-William-Kennedy/dp/1617291781 + thumbnail: /images/books/go-in-action.jpg + - title: The Go Programming Language + url: https://www.gopl.io/ + thumbnail: /images/learn/go-programming-language-book.png + - title: Go Programming Blueprints + url: https://github.com/matryer/goblueprints + thumbnail: /images/learn/go-programming-blueprints.png +`}} + +{{libraries ` + - title: CLI Libraries + viewMoreUrl: https://pkg.go.dev/search?q=command%20line%20OR%20CLI + items: + - text: spf13/cobra + url: https://pkg.go.dev/github.com/spf13/cobra?tab=overview + desc: A library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go + - text: spf13/viper + url: https://pkg.go.dev/github.com/spf13/viper?tab=overview + desc: A complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats + - text: urfave/cli + url: https://pkg.go.dev/github.com/urfave/cli?tab=overview + desc: A minimal framework for creating and organizing command line Go applications + - text: delve + url: https://pkg.go.dev/github.com/go-delve/delve?tab=overview + desc: A simple and powerful tool built for programmers used to using a source-level debugger in a compiled language + - text: chzyer/readline + url: https://pkg.go.dev/github.com/chzyer/readline?tab=overview + desc: A pure Golang implementation that provides most features in GNU Readline (under MIT license) + - text: dixonwille/wmenu + url: https://pkg.go.dev/github.com/dixonwille/wmenu?tab=overview + desc: An easy-to-use menu structure for CLI applications that prompts users to make choices + - text: spf13/pflag + url: https://pkg.go.dev/github.com/spf13/pflag?tab=overview + desc: A drop-in replacement for Go’s flag package, implementing POSIX/GNU-style flags + - text: golang/glog + url: https://pkg.go.dev/github.com/golang/glog?tab=overview + desc: Leveled execution logs for Go + - text: go-prompt + url: https://pkg.go.dev/github.com/c-bata/go-prompt?tab=overview + desc: A library for building powerful interactive prompts, making it easier to build cross-platform command line tools using Go. +`}} diff --git a/go.dev/_content/solutions/clis/CLI-green.svg b/go.dev/_content/solutions/clis/CLI-green.svg deleted file mode 100644 index 01fed5b7..00000000 --- a/go.dev/_content/solutions/clis/CLI-green.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/_content/solutions/clis/cli-white.svg b/go.dev/_content/solutions/clis/cli-white.svg deleted file mode 100644 index a08127d7..00000000 --- a/go.dev/_content/solutions/clis/cli-white.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/_content/solutions/clis/index.md b/go.dev/_content/solutions/clis/index.md deleted file mode 100644 index 9cb2b4c7..00000000 --- a/go.dev/_content/solutions/clis/index.md +++ /dev/null @@ -1,172 +0,0 @@ ---- -title: "Command-line Interfaces (CLIs)" -linkTitle: "Command-line Interfaces (CLIs)" -description: "With popular open source packages and a robust standard library, use Go to create fast and elegant CLIs." -date: 2019-10-04T15:26:31-04:00 -layout: solution -series: Use Cases -icon: - file: CLI-green.svg - alt: CLI icon -icon-white: - file: cli-white.svg - alt: CLI icon ---- - -## Overview {#overview .sectionHeading} - -### CLI developers prefer Go for portability, performance, and ease of creation - -Command line interfaces (CLIs), unlike graphical user interfaces (GUIs), are text-only. Cloud and infrastructure applications are primarily CLI-based due to their easy automation and remote capabilities. - -## Key benefits {#key-benefits .sectionHeading} - -### Leverage fast compile times to build programs that start quickly and run on any system - -Developers of CLIs find Go to be ideal for designing their applications. Go compiles very quickly into a single binary, works across platforms with a consistent style, and brings a strong development community. From a single Windows or Mac laptop, developers can build a Go program for every one of the dozens of architectures and operating systems Go supports in a matter of seconds, no complicated build farms are needed. No other compiled language can be built as portably or quickly. Go applications are built into a single self contained binary making installing Go applications trivial. - -Specifically, **programs written in Go run on any system without requiring any existing libraries, runtimes, or dependencies**. And **programs written in Go have an immediate startup time**—similar to C or C++ but unobtainable with other programming languages. - -## Use Case {#use-case .sectionHeading} - -### Use Go for building elegant CLIs - -{{backgroundquote ` - author: Steve Domino - title: senior engineer and architect at Strala - link: https://medium.com/@skdomino/writing-better-clis-one-snake-at-a-time-d22e50e60056 - quote: | - I was tasked with building our CLI tool and found two really great projects, Cobra and Viper, which make building CLI’s easy. Individually they are very powerful, very flexible and very good at what they do. But together they will help you show your next CLI who is boss! -`}} - -{{backgroundquote ` - author: Francesc Campoy - title: VP of product at DGraph Labs and producer of Just For Func videos - link: https://www.youtube.com/watch?v=WvWPGVKLvR4 - quote: | - Cobra is a great product to write small tools or even large ones. It’s more of a framework than a library, because when you call the binary that would create a skeleton, then you would be adding code in between.” -`}} - -When developing CLIs in Go, two tools are widely used: Cobra & Viper. - -{{pkg "github.com/spf13/cobra" "Cobra"}} is both a library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go. Cobra powers most of the popular Go applications including CoreOS, Delve, Docker, Dropbox, Git Lfs, Hugo, Kubernetes, and [many more](https://pkg.go.dev/github.com/spf13/cobra?tab=importedby). With integrated command help, autocomplete and documentation “[it] makes documenting each command really simple,” says [Alex Ellis](https://blog.alexellis.io/5-keys-to-a-killer-go-cli/), founder of OpenFaaS. - - -{{pkg "github.com/spf13/viper" "Viper"}} is a complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats. Cobra and Viper are designed to work together. - -Viper [supports nested structures](https://scene-si.org/2017/04/20/managing-configuration-with-viper/) in the configuration, allowing CLI developers to manage the configuration for multiple parts of a large application. Viper also provides all of the tooling need to easily build twelve factor apps. - -"If you don’t want to pollute your command line, or if you’re working with sensitive data which you don’t want to show up in the history, it’s a good idea to work with environment variables. To do this, you can use Viper," [suggests Geudens](https://ordina-jworks.github.io/development/2018/10/20/make-your-own-cli-with-golang-and-cobra.html). - -{{projects ` - - company: Comcast - url: https://xfinity.com/ - logoSrc: comcast.svg - desc: Comcast uses Go for a CLI client used to publish and subscribe to it’s high-traffic sites. The company also supports an open source client library which is written in Go - designed for working with Apache Pulsar. - ctas: - - text: Client library for Apache Pulsar - url: https://github.com/Comcast/pulsar-client-go - - text: Pulsar CLI Client - url: https://github.com/Comcast/pulsar-client-go/blob/master/cli/main.go - - company: GitHub - url: https://github.com/ - logoSrc: github.svg - desc: GitHub uses Go for a command-line tool that makes it easier to work with GitHub, wrapping git in order to extend it with extra features and commands. - ctas: - - text: GitHub command-line tool - url: https://github.com/github/hub - - company: Hugo - url: http://gohugo.io/ - logoSrc: hugo.svg - desc: Hugo is one of the most popular Go CLI applications powering thousands of sites, including this one. One reason for it’s popularity is it’s ease of install thanks to Go. Hugo author Bjørn Erik Pedersen writes “The single binary takes most of the pain out of installation and upgrades.” - ctas: - - text: Hugo Website - url: https://gohugo.io/ - - company: Kubernetes - url: https://kubernetes.com/ - logoSrc: kubernetes.svg - desc: Kubernetes is one of the most popular Go CLI applications. Kubernetes Creator, Joe Beda, said that for writing Kubernetes, “Go was the only logical choice”. Calling Go “the sweet spot” between low level languages like C++ and high level languages like Python. - ctas: - - text: Kubernetes + Go - url: https://blog.gopheracademy.com/birthday-bash-2014/kubernetes-go-crazy-delicious/ - - company: MongoDB - url: https://mongodb.com/ - logoSrc: mongodb.svg - desc: MongoDB chose to implement their Backup CLI Tool in Go citing Go’s “C-like syntax, strong standard library, the resolution of concurrency problems via goroutines, and painless multi-platform distribution” as reasons. - ctas: - - text: MongoDB Backup Service - url: https://www.mongodb.com/blog/post/go-agent-go - - company: Netflix - url: http://netflix.com/ - logoSrc: netflix.svg - desc: Netflix uses Go to build the CLI application ChaosMonkey, an application responsible for randomly terminating instances in production to ensure that engineers implement their services to be resilient to instance failures. - ctas: - - text: Netflix Techblog Article - url: https://medium.com/netflix-techblog/application-data-caching-using-ssds-5bf25df851ef - - company: Stripe - url: https://stripe.com/ - logoSrc: stripe.svg - desc: Stripe uses Go for the Stripe CLI aimed to help build, test, and manage a Stripe integration right from the terminal. - ctas: - - text: Stripe CLI - url: https://github.com/stripe/stripe-cli - - company: Uber - url: https://uber.com/ - logoSrc: uber.svg - desc: Uber uses Go for several CLI tools, including the CLI API for Jaeger, a distributed tracing system used for monitoring microservice distributed systems. - ctas: - - text: CLI API for Jaeger - url: https://www.jaegertracing.io/docs/1.14/cli/ -`}} - -## Get Started {#get-started .sectionHeading} - -### Go books for creating CLIs - -{{books ` - - title: Powerful Command-Line Applications in Go - url: https://www.amazon.com/Powerful-Command-Line-Applications-Go-Maintainable/dp/168050696X - thumbnail: /images/books/powerful-command-line-applications-in-go.jpg - - title: Go in Action - url: https://www.amazon.com/Go-Action-William-Kennedy/dp/1617291781 - thumbnail: /images/books/go-in-action.jpg - - title: The Go Programming Language - url: https://www.gopl.io/ - thumbnail: /images/learn/go-programming-language-book.png - - title: Go Programming Blueprints - url: https://github.com/matryer/goblueprints - thumbnail: /images/learn/go-programming-blueprints.png -`}} - -{{libraries ` - - title: CLI Libraries - viewMoreUrl: https://pkg.go.dev/search?q=command%20line%20OR%20CLI - items: - - text: spf13/cobra - url: https://pkg.go.dev/github.com/spf13/cobra?tab=overview - desc: A library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go - - text: spf13/viper - url: https://pkg.go.dev/github.com/spf13/viper?tab=overview - desc: A complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats - - text: urfave/cli - url: https://pkg.go.dev/github.com/urfave/cli?tab=overview - desc: A minimal framework for creating and organizing command line Go applications - - text: delve - url: https://pkg.go.dev/github.com/go-delve/delve?tab=overview - desc: A simple and powerful tool built for programmers used to using a source-level debugger in a compiled language - - text: chzyer/readline - url: https://pkg.go.dev/github.com/chzyer/readline?tab=overview - desc: A pure Golang implementation that provides most features in GNU Readline (under MIT license) - - text: dixonwille/wmenu - url: https://pkg.go.dev/github.com/dixonwille/wmenu?tab=overview - desc: An easy-to-use menu structure for CLI applications that prompts users to make choices - - text: spf13/pflag - url: https://pkg.go.dev/github.com/spf13/pflag?tab=overview - desc: A drop-in replacement for Go’s flag package, implementing POSIX/GNU-style flags - - text: golang/glog - url: https://pkg.go.dev/github.com/golang/glog?tab=overview - desc: Leveled execution logs for Go - - text: go-prompt - url: https://pkg.go.dev/github.com/c-bata/go-prompt?tab=overview - desc: A library for building powerful interactive prompts, making it easier to build cross-platform command line tools using Go. -`}} diff --git a/go.dev/_content/solutions/cloud-green.svg b/go.dev/_content/solutions/cloud-green.svg new file mode 100644 index 00000000..b143a1db --- /dev/null +++ b/go.dev/_content/solutions/cloud-green.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/go.dev/_content/solutions/cloud-white.svg b/go.dev/_content/solutions/cloud-white.svg new file mode 100644 index 00000000..6dfc4f27 --- /dev/null +++ b/go.dev/_content/solutions/cloud-white.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/_content/solutions/cloud.md b/go.dev/_content/solutions/cloud.md new file mode 100644 index 00000000..34e32de6 --- /dev/null +++ b/go.dev/_content/solutions/cloud.md @@ -0,0 +1,227 @@ +--- +title: "Go for Cloud & Network Services" +linkTitle: "Cloud & Network Services" +description: "With a strong ecosystem of tools and APIs on major cloud providers, it is easier than ever to build services with Go." +date: 2019-10-04T15:26:31-04:00 +layout: solution +series: Use Cases +icon: + file: cloud-green.svg + alt: cloud icon +icon-white: + file: cloud-white.svg + alt: cloud icon +--- + +## Overview {#overview .sectionHeading} + +
    +

    Go helps enterprises build and scale cloud computing systems

    +

    As applications and processing move to the cloud, concurrency becomes a very big issue. Cloud computing systems, by their very nature, share and scale resources. Coordinating access to shared resources is an issue that impacts every application processing in the cloud, and requires programming languages “explicitly geared to develop highly reliable concurrent applications.”

    +
    + +{{quote ` + author: Ruchi Malik + title: developer at Choozle + link: https://builtin.com/software-engineering-perspectives/golang-advantages + quote: | + Go makes it very easy to scale as a company. This is very important because, as our engineering team grows, each service can be managed by a different unit. +`}} + +## Key Benefits {#key-benefits .sectionHeading} + +### Address tradeoff between development cycle time and server performance + +Go was created to address exactly these concurrency needs for scaled applications, microservices, and cloud development. In fact, over 75 percent of projects in the Cloud Native Computing Foundation are written in Go. + +Go helps reduce the need to make this tradeoff, with its fast build times that enable iterative development, lower memory and CPU utilization. Servers built with Go experience instant start up times and are cheaper to run in pay-as-you-go and serverless deployments. + +### Address challenges with the modern cloud, delivering standard idiomatic APIs + +Go addresses many challenges developers face with the modern cloud, delivering standard idiomatic APIs, and built in concurrency to take advantage of multicore processors. Go’s low-latency and “no knob” tuning make Go a great balance between performance and productivity - granting engineering teams the power to choose and the power to move. + +## Use Case {#use-case .sectionHeading} + +### Use Go for Cloud Computing + +Go's strengths shine when it comes to building services. Its speed and built-in support for concurrency results in fast and efficient services, while static typing, robust tooling, and emphasis on simplicity and readability help build reliable and maintainable code. + +Go has a strong ecosystem supporting service development. The [standard library](https://golang.org/pkg/) includes packages for common needs like HTTP servers and clients, JSON/XML parsing, SQL databases, and a range of security/encryption functionality, while the Go runtime includes tools for [race detection](https://golang.org/doc/articles/race_detector.html), [benchmarking](https://golang.org/pkg/testing/#hdr-Benchmarks)/profiling, code generation, and static code analysis. + +The major Cloud providers ([GCP](https://cloud.google.com/go/home), [AWS](https://aws.amazon.com/sdk-for-go/), [Azure](https://docs.microsoft.com/en-us/azure/go/)) have Go APIs for their services, and popular open source libraries provide support for API tooling ([Swagger](https://github.com/go-swagger/go-swagger)), transport ([protocol buffers](https://github.com/golang/protobuf), [gRPC](https://grpc.io/docs/quickstart/go/)), monitoring ([OpenCensus](https://godoc.org/go.opencensus.io)), Object-Relational Mapping ([gORM](https://gorm.io/)), and authentication ([JWT](https://github.com/dgrijalva/jwt-go)). The open source community has also provided several service frameworks, including [Go Kit](https://gokit.io/[), [Go Micro](https://micro.mu/docs/go-micro.html), and [Gizmo](https://github.com/nytimes/gizmo), which can be a great way to get started quickly. + +### Go tools for Cloud Computing + +{{toolsblurbs ` + - title: Docker + url: https://www.docker.com/ + iconSrc: /images/logos/docker.svg + paragraphs: + - Docker is a platform-as-a-service that delivers software in containers. Containers bundle software, libraries, and config files, are hosted by a Docker Engine, and are run by a single operating-system kernel (utilizing less system resources than virtual machines). + - Cloud developers use Docker to manage their Go code and support multiple platforms, as Docker supports the development workflow and deployment process. + - title: Kubernetes + url: https://kubernetes.io/ + iconSrc: /images/logos/kubernetes.svg + paragraphs: + - Kubernetes is an open-source container-orchestration system, written in Go, for automating web app deployment. Web apps are often built using containers (as noted above) packaged with their dependencies and configurations. Kubernetes helps deploying and managing those containers at scale. Cloud programmers use Kubernetes to build, deliver, and scale containerized apps quickly—managing the growing complexity via APIs that controls how the containers will run. +`}} + +{{projects ` + - company: Google + url: http://cloud.google.com/go + logoSrc: google-cloud.svg + desc: Google Cloud uses Go across its ecosystem of products and tools, including Kubernetes, gVisor, Knative, Istio, and Anthos. Go is fully supported on Google Cloud across all APIs and runtimes. + ctas: + - text: Go on Google Cloud Platform + url: http://cloud.google.com/go + - company: Capital One + url: https://www.capitalone.com/ + logoSrc: capital-one.svg + desc: Capital One uses Go to power the Credit Offers API, a critical service. The engineering team is also building their serverless architecture with Go, citing Go’s speed and simplicity, and mentioning that “[they] didn’t want to go serverless without Go.” + ctas: + - text: Credit Offers API + url: https://medium.com/capital-one-tech/a-serverless-and-go-journey-credit-offers-api-74ef1f9fde7f + - company: Dropbox + url: https://www.dropbox.com/ + logoSrc: dropbox.svg + desc: Dropbox was built on Python, but in 2013 decided to migrate their performance-critical packends to Go. Today, most of the company’s infrastructure is written in Go. + ctas: + - text: Dropbox libraries + url: https://blogs.dropbox.com/tech/2014/07/open-sourcing-our-go-libraries/ + - company: Mercado Libre + url: https://www.mercadolibre.com.ar/ + logoSrc: mercadoLibre.svg + desc: MercadoLibre uses Go to scale its eCommerce platform. Go produces efficient code that readily scales as MercadoLibre’s online commerce grows. Go improves their productivity while streamlining and expanding MercadoLibre services. + ctas: + - text: MercadoLibre & Go + url: http://go.dev/solutions/mercadolibre + - company: The New York Times + url: https://www.nytimes.com/ + logoSrc: the-new-york-times-icon.svg + desc: The New York Times adopted Go “to build better back-end services”. As the usage of Go expanded with in the company they felt the need to create a toolkit to “to help developers quickly configure and build microservice APIs and pubsub daemons”, which they have open sourced. + ctas: + - text: NYTimes - Gizmo + url: https://open.nytimes.com/introducing-gizmo-aa7ea463b208 + - text: Gizmo Github + url: https://github.com/nytimes/gizmo + - company: Twitch + url: https://www.twitch.tv/ + logoSrc: twitch.svg + desc: Twitch uses Go to power many of its busiest systems that serve live video and chat to millions of users. + ctas: + - text: Go’s march to low-latency GC + url: https://blog.twitch.tv/en/2016/07/05/gos-march-to-low-latency-gc-a6fa96f06eb7/ + - company: Uber + url: https://www.uber.com/ + logoSrc: uber.svg + desc: Uber uses Go to power several of its critical services that impact the experience of millions of drivers and passengers around the world. From their real-time analytics engine, AresDB, to their microservice for Geo-querying, Geofence, and their resource scheduler, Peloton. + ctas: + - text: AresDB + url: https://eng.uber.com/aresdb/ + - text: Geofence + url: https://eng.uber.com/go-geofence/ + - text: Peloton + url: https://eng.uber.com/open-sourcing-peloton/ +`}} + +## Get Started {#get-started .sectionHeading} + +### Go books for cloud computing + +{{books ` + - title: Building Microservices with Go + url: https://www.amazon.com/Building-Microservices-Go-efficient-microservices/dp/1786468662/ + thumbnail: /images/books/building-microservices-with-go.jpg + - title: Hands-On Software Architecture with Golang + url: https://www.amazon.com/dp/1788622596/ref=cm_sw_r_tw_dp_U_x_-aZWDbS8PD7R4 + thumbnail: /images/books/hands-on-software-architecture-with-golang.jpg + - title: Building RESTful Web services with Go + url: https://www.amazon.com/Building-RESTful-Web-services-gracefully-ebook/dp/B072QB8KL1 + thumbnail: /images/books/building-restful-web-services-with-go.jpg + - title: Mastering Go Web Services + url: https://www.amazon.com/Mastering-Web-Services-Nathan-Kozyra-ebook/dp/B00W5GUKL6 + thumbnail: /images/books/mastering-go-web-services.jpg +`}} + +{{libraries ` + - title: Web frameworks + viewMoreUrl: https://pkg.go.dev/search?q=web+framework + items: + - text: Buffalo + url: https://gobuffalo.io/en/ + desc: A framework for rapid web development in Go, curating Go and JS libraries together. + - text: Echo + url: https://echo.labstack.com/ + desc: A high performance, extensible, and minimalist Go web framework + - text: Flamingo + url: https://www.flamingo.me/ + desc: A fast open-source framework based on Go with clean and scalable architecture + - text: Gin + url: https://gin-gonic.com/ + desc: A web framework written in Go, with a martini-like API. + - text: Gorilla + url: http://www.gorillatoolkit.org/ + desc: A web toolkit for the Go programming language. + - title: Routers + viewMoreUrl: https://pkg.go.dev/search?q=http%20router + items: + - text: julienschmidt/httprouter + url: https://pkg.go.dev/github.com/julienschmidt/httprouter?tab=overview + desc: A lightweight high performance HTTP request router + - text: gorilla/mux + url: https://pkg.go.dev/github.com/gorilla/mux?tab=overview + desc: A powerful HTTP router and URL matcher for building Go web servers with 🦍 + - text: Chi + url: https://pkg.go.dev/github.com/go-chi/chi?tab=overview + desc: A lightweight, idiomatic and composable router for building Go HTTP services. + - text: net/http + url: https://pkg.go.dev/net/http + desc: A standard library HTTP package + - title: Template Engines + viewMoreUrl: https://pkg.go.dev/search?q=templates + items: + - text: html/template + url: https://pkg.go.dev/html/template + desc: A standard library HTML template engine + - text: flosch/pongo2 + url: https://pkg.go.dev/github.com/flosch/pongo2?tab=overview + desc: A Django-syntax like templating-language + - title: Databases & Drivers + viewMoreUrl: https://pkg.go.dev/search?q=database%20OR%20sql + items: + - text: database/sql + url: https://pkg.go.dev/database/sql + desc: A standard library interface with driver support for MySQL, Postgres, Oracle, MS SQL, BigQuery and most SQL databases + - text: mongo-driver/mongo + url: https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo?tab=overview + desc: The MongoDB supported driver for Go + - text: olivere/elastic + url: https://pkg.go.dev/github.com/olivere/elastic?tab=overview + desc: A Elasticsearch client for Go + - text: GORM + url: https://gorm.io/ + desc: An ORM library for Go + - text: Bleve + url: http://blevesearch.com/ + desc: Full-text search and indexing for Go + - text: CockroachDB + url: https://www.cockroachlabs.com/ + desc: An evolution of the database—architected for the cloud to deliver resilient, consistent, distributed SQL at scale + - title: Web Libraries + viewMoreUrl: https://pkg.go.dev/search?q=web + items: + - text: markbates/goth + url: https://pkg.go.dev/github.com/markbates/goth?tab=overview + desc: Authentication for web apps + - text: jinzhu/gorm + url: https://pkg.go.dev/github.com/jinzhu/gorm?tab=overview + desc: An ORM library for Go + - text: dgrijalva/jwt-go + url: https://pkg.go.dev/github.com/dgrijalva/jwt-go?tab=overview + desc: A Go implementation of json web tokens + - title: Other Projects + items: + - text: gopherjs + url: https://pkg.go.dev/github.com/gopherjs/gopherjs?tab=overview + desc: A compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers. +`}} diff --git a/go.dev/_content/solutions/cloud/cloud-green.svg b/go.dev/_content/solutions/cloud/cloud-green.svg deleted file mode 100644 index b143a1db..00000000 --- a/go.dev/_content/solutions/cloud/cloud-green.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/go.dev/_content/solutions/cloud/cloud-white.svg b/go.dev/_content/solutions/cloud/cloud-white.svg deleted file mode 100644 index 6dfc4f27..00000000 --- a/go.dev/_content/solutions/cloud/cloud-white.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/_content/solutions/cloud/index.md b/go.dev/_content/solutions/cloud/index.md deleted file mode 100644 index 34e32de6..00000000 --- a/go.dev/_content/solutions/cloud/index.md +++ /dev/null @@ -1,227 +0,0 @@ ---- -title: "Go for Cloud & Network Services" -linkTitle: "Cloud & Network Services" -description: "With a strong ecosystem of tools and APIs on major cloud providers, it is easier than ever to build services with Go." -date: 2019-10-04T15:26:31-04:00 -layout: solution -series: Use Cases -icon: - file: cloud-green.svg - alt: cloud icon -icon-white: - file: cloud-white.svg - alt: cloud icon ---- - -## Overview {#overview .sectionHeading} - -
    -

    Go helps enterprises build and scale cloud computing systems

    -

    As applications and processing move to the cloud, concurrency becomes a very big issue. Cloud computing systems, by their very nature, share and scale resources. Coordinating access to shared resources is an issue that impacts every application processing in the cloud, and requires programming languages “explicitly geared to develop highly reliable concurrent applications.”

    -
    - -{{quote ` - author: Ruchi Malik - title: developer at Choozle - link: https://builtin.com/software-engineering-perspectives/golang-advantages - quote: | - Go makes it very easy to scale as a company. This is very important because, as our engineering team grows, each service can be managed by a different unit. -`}} - -## Key Benefits {#key-benefits .sectionHeading} - -### Address tradeoff between development cycle time and server performance - -Go was created to address exactly these concurrency needs for scaled applications, microservices, and cloud development. In fact, over 75 percent of projects in the Cloud Native Computing Foundation are written in Go. - -Go helps reduce the need to make this tradeoff, with its fast build times that enable iterative development, lower memory and CPU utilization. Servers built with Go experience instant start up times and are cheaper to run in pay-as-you-go and serverless deployments. - -### Address challenges with the modern cloud, delivering standard idiomatic APIs - -Go addresses many challenges developers face with the modern cloud, delivering standard idiomatic APIs, and built in concurrency to take advantage of multicore processors. Go’s low-latency and “no knob” tuning make Go a great balance between performance and productivity - granting engineering teams the power to choose and the power to move. - -## Use Case {#use-case .sectionHeading} - -### Use Go for Cloud Computing - -Go's strengths shine when it comes to building services. Its speed and built-in support for concurrency results in fast and efficient services, while static typing, robust tooling, and emphasis on simplicity and readability help build reliable and maintainable code. - -Go has a strong ecosystem supporting service development. The [standard library](https://golang.org/pkg/) includes packages for common needs like HTTP servers and clients, JSON/XML parsing, SQL databases, and a range of security/encryption functionality, while the Go runtime includes tools for [race detection](https://golang.org/doc/articles/race_detector.html), [benchmarking](https://golang.org/pkg/testing/#hdr-Benchmarks)/profiling, code generation, and static code analysis. - -The major Cloud providers ([GCP](https://cloud.google.com/go/home), [AWS](https://aws.amazon.com/sdk-for-go/), [Azure](https://docs.microsoft.com/en-us/azure/go/)) have Go APIs for their services, and popular open source libraries provide support for API tooling ([Swagger](https://github.com/go-swagger/go-swagger)), transport ([protocol buffers](https://github.com/golang/protobuf), [gRPC](https://grpc.io/docs/quickstart/go/)), monitoring ([OpenCensus](https://godoc.org/go.opencensus.io)), Object-Relational Mapping ([gORM](https://gorm.io/)), and authentication ([JWT](https://github.com/dgrijalva/jwt-go)). The open source community has also provided several service frameworks, including [Go Kit](https://gokit.io/[), [Go Micro](https://micro.mu/docs/go-micro.html), and [Gizmo](https://github.com/nytimes/gizmo), which can be a great way to get started quickly. - -### Go tools for Cloud Computing - -{{toolsblurbs ` - - title: Docker - url: https://www.docker.com/ - iconSrc: /images/logos/docker.svg - paragraphs: - - Docker is a platform-as-a-service that delivers software in containers. Containers bundle software, libraries, and config files, are hosted by a Docker Engine, and are run by a single operating-system kernel (utilizing less system resources than virtual machines). - - Cloud developers use Docker to manage their Go code and support multiple platforms, as Docker supports the development workflow and deployment process. - - title: Kubernetes - url: https://kubernetes.io/ - iconSrc: /images/logos/kubernetes.svg - paragraphs: - - Kubernetes is an open-source container-orchestration system, written in Go, for automating web app deployment. Web apps are often built using containers (as noted above) packaged with their dependencies and configurations. Kubernetes helps deploying and managing those containers at scale. Cloud programmers use Kubernetes to build, deliver, and scale containerized apps quickly—managing the growing complexity via APIs that controls how the containers will run. -`}} - -{{projects ` - - company: Google - url: http://cloud.google.com/go - logoSrc: google-cloud.svg - desc: Google Cloud uses Go across its ecosystem of products and tools, including Kubernetes, gVisor, Knative, Istio, and Anthos. Go is fully supported on Google Cloud across all APIs and runtimes. - ctas: - - text: Go on Google Cloud Platform - url: http://cloud.google.com/go - - company: Capital One - url: https://www.capitalone.com/ - logoSrc: capital-one.svg - desc: Capital One uses Go to power the Credit Offers API, a critical service. The engineering team is also building their serverless architecture with Go, citing Go’s speed and simplicity, and mentioning that “[they] didn’t want to go serverless without Go.” - ctas: - - text: Credit Offers API - url: https://medium.com/capital-one-tech/a-serverless-and-go-journey-credit-offers-api-74ef1f9fde7f - - company: Dropbox - url: https://www.dropbox.com/ - logoSrc: dropbox.svg - desc: Dropbox was built on Python, but in 2013 decided to migrate their performance-critical packends to Go. Today, most of the company’s infrastructure is written in Go. - ctas: - - text: Dropbox libraries - url: https://blogs.dropbox.com/tech/2014/07/open-sourcing-our-go-libraries/ - - company: Mercado Libre - url: https://www.mercadolibre.com.ar/ - logoSrc: mercadoLibre.svg - desc: MercadoLibre uses Go to scale its eCommerce platform. Go produces efficient code that readily scales as MercadoLibre’s online commerce grows. Go improves their productivity while streamlining and expanding MercadoLibre services. - ctas: - - text: MercadoLibre & Go - url: http://go.dev/solutions/mercadolibre - - company: The New York Times - url: https://www.nytimes.com/ - logoSrc: the-new-york-times-icon.svg - desc: The New York Times adopted Go “to build better back-end services”. As the usage of Go expanded with in the company they felt the need to create a toolkit to “to help developers quickly configure and build microservice APIs and pubsub daemons”, which they have open sourced. - ctas: - - text: NYTimes - Gizmo - url: https://open.nytimes.com/introducing-gizmo-aa7ea463b208 - - text: Gizmo Github - url: https://github.com/nytimes/gizmo - - company: Twitch - url: https://www.twitch.tv/ - logoSrc: twitch.svg - desc: Twitch uses Go to power many of its busiest systems that serve live video and chat to millions of users. - ctas: - - text: Go’s march to low-latency GC - url: https://blog.twitch.tv/en/2016/07/05/gos-march-to-low-latency-gc-a6fa96f06eb7/ - - company: Uber - url: https://www.uber.com/ - logoSrc: uber.svg - desc: Uber uses Go to power several of its critical services that impact the experience of millions of drivers and passengers around the world. From their real-time analytics engine, AresDB, to their microservice for Geo-querying, Geofence, and their resource scheduler, Peloton. - ctas: - - text: AresDB - url: https://eng.uber.com/aresdb/ - - text: Geofence - url: https://eng.uber.com/go-geofence/ - - text: Peloton - url: https://eng.uber.com/open-sourcing-peloton/ -`}} - -## Get Started {#get-started .sectionHeading} - -### Go books for cloud computing - -{{books ` - - title: Building Microservices with Go - url: https://www.amazon.com/Building-Microservices-Go-efficient-microservices/dp/1786468662/ - thumbnail: /images/books/building-microservices-with-go.jpg - - title: Hands-On Software Architecture with Golang - url: https://www.amazon.com/dp/1788622596/ref=cm_sw_r_tw_dp_U_x_-aZWDbS8PD7R4 - thumbnail: /images/books/hands-on-software-architecture-with-golang.jpg - - title: Building RESTful Web services with Go - url: https://www.amazon.com/Building-RESTful-Web-services-gracefully-ebook/dp/B072QB8KL1 - thumbnail: /images/books/building-restful-web-services-with-go.jpg - - title: Mastering Go Web Services - url: https://www.amazon.com/Mastering-Web-Services-Nathan-Kozyra-ebook/dp/B00W5GUKL6 - thumbnail: /images/books/mastering-go-web-services.jpg -`}} - -{{libraries ` - - title: Web frameworks - viewMoreUrl: https://pkg.go.dev/search?q=web+framework - items: - - text: Buffalo - url: https://gobuffalo.io/en/ - desc: A framework for rapid web development in Go, curating Go and JS libraries together. - - text: Echo - url: https://echo.labstack.com/ - desc: A high performance, extensible, and minimalist Go web framework - - text: Flamingo - url: https://www.flamingo.me/ - desc: A fast open-source framework based on Go with clean and scalable architecture - - text: Gin - url: https://gin-gonic.com/ - desc: A web framework written in Go, with a martini-like API. - - text: Gorilla - url: http://www.gorillatoolkit.org/ - desc: A web toolkit for the Go programming language. - - title: Routers - viewMoreUrl: https://pkg.go.dev/search?q=http%20router - items: - - text: julienschmidt/httprouter - url: https://pkg.go.dev/github.com/julienschmidt/httprouter?tab=overview - desc: A lightweight high performance HTTP request router - - text: gorilla/mux - url: https://pkg.go.dev/github.com/gorilla/mux?tab=overview - desc: A powerful HTTP router and URL matcher for building Go web servers with 🦍 - - text: Chi - url: https://pkg.go.dev/github.com/go-chi/chi?tab=overview - desc: A lightweight, idiomatic and composable router for building Go HTTP services. - - text: net/http - url: https://pkg.go.dev/net/http - desc: A standard library HTTP package - - title: Template Engines - viewMoreUrl: https://pkg.go.dev/search?q=templates - items: - - text: html/template - url: https://pkg.go.dev/html/template - desc: A standard library HTML template engine - - text: flosch/pongo2 - url: https://pkg.go.dev/github.com/flosch/pongo2?tab=overview - desc: A Django-syntax like templating-language - - title: Databases & Drivers - viewMoreUrl: https://pkg.go.dev/search?q=database%20OR%20sql - items: - - text: database/sql - url: https://pkg.go.dev/database/sql - desc: A standard library interface with driver support for MySQL, Postgres, Oracle, MS SQL, BigQuery and most SQL databases - - text: mongo-driver/mongo - url: https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo?tab=overview - desc: The MongoDB supported driver for Go - - text: olivere/elastic - url: https://pkg.go.dev/github.com/olivere/elastic?tab=overview - desc: A Elasticsearch client for Go - - text: GORM - url: https://gorm.io/ - desc: An ORM library for Go - - text: Bleve - url: http://blevesearch.com/ - desc: Full-text search and indexing for Go - - text: CockroachDB - url: https://www.cockroachlabs.com/ - desc: An evolution of the database—architected for the cloud to deliver resilient, consistent, distributed SQL at scale - - title: Web Libraries - viewMoreUrl: https://pkg.go.dev/search?q=web - items: - - text: markbates/goth - url: https://pkg.go.dev/github.com/markbates/goth?tab=overview - desc: Authentication for web apps - - text: jinzhu/gorm - url: https://pkg.go.dev/github.com/jinzhu/gorm?tab=overview - desc: An ORM library for Go - - text: dgrijalva/jwt-go - url: https://pkg.go.dev/github.com/dgrijalva/jwt-go?tab=overview - desc: A Go implementation of json web tokens - - title: Other Projects - items: - - text: gopherjs - url: https://pkg.go.dev/github.com/gopherjs/gopherjs?tab=overview - desc: A compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers. -`}} diff --git a/go.dev/_content/solutions/cloudflare.md b/go.dev/_content/solutions/cloudflare.md new file mode 100644 index 00000000..a754ca10 --- /dev/null +++ b/go.dev/_content/solutions/cloudflare.md @@ -0,0 +1,13 @@ +--- +linkTitle: Graceful upgrades in Go +description: Cloudflare speeds up and protects millions of websites, APIs, SaaS services, + and other properties connected to the Internet. “Go is at the heart of CloudFlare’s + services including handling compression for high-latency HTTP connections, our + entire DNS infrastructure, SSL, load testing and more.” +layout: solution +company: Cloudflare +series: Case Studies +logoSrc: cloudflare.svg +link: https://blog.cloudflare.com/graceful-upgrades-in-go/ +inLandingPageGrid: true +--- diff --git a/go.dev/_content/solutions/cloudflare/index.md b/go.dev/_content/solutions/cloudflare/index.md deleted file mode 100644 index a754ca10..00000000 --- a/go.dev/_content/solutions/cloudflare/index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -linkTitle: Graceful upgrades in Go -description: Cloudflare speeds up and protects millions of websites, APIs, SaaS services, - and other properties connected to the Internet. “Go is at the heart of CloudFlare’s - services including handling compression for high-latency HTTP connections, our - entire DNS infrastructure, SSL, load testing and more.” -layout: solution -company: Cloudflare -series: Case Studies -logoSrc: cloudflare.svg -link: https://blog.cloudflare.com/graceful-upgrades-in-go/ -inLandingPageGrid: true ---- diff --git a/go.dev/_content/solutions/cloudflare/logo.png b/go.dev/_content/solutions/cloudflare/logo.png deleted file mode 100644 index 90388fca..00000000 Binary files a/go.dev/_content/solutions/cloudflare/logo.png and /dev/null differ diff --git a/go.dev/_content/solutions/cockroachlabs.md b/go.dev/_content/solutions/cockroachlabs.md new file mode 100644 index 00000000..884e4a94 --- /dev/null +++ b/go.dev/_content/solutions/cockroachlabs.md @@ -0,0 +1,12 @@ +--- +linkTitle: Cockroach Labs - Why We Chose to Build Our Database with Go +description: Go's performance benefits, garbage collection, and low barrier to entry + made it a great fit for CockroachDB. +layout: solution +company: Cockroach Labs +logoSrc: cockroach.svg +series: Case Studies +link: + https://www.cockroachlabs.com/blog/why-go-was-the-right-choice-for-cockroachdb/ +inLandingPageGrid: true +--- diff --git a/go.dev/_content/solutions/cockroachlabs/index.md b/go.dev/_content/solutions/cockroachlabs/index.md deleted file mode 100644 index 884e4a94..00000000 --- a/go.dev/_content/solutions/cockroachlabs/index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -linkTitle: Cockroach Labs - Why We Chose to Build Our Database with Go -description: Go's performance benefits, garbage collection, and low barrier to entry - made it a great fit for CockroachDB. -layout: solution -company: Cockroach Labs -logoSrc: cockroach.svg -series: Case Studies -link: - https://www.cockroachlabs.com/blog/why-go-was-the-right-choice-for-cockroachdb/ -inLandingPageGrid: true ---- diff --git a/go.dev/_content/solutions/cockroachlabs/logo.png b/go.dev/_content/solutions/cockroachlabs/logo.png deleted file mode 100644 index 98ec96aa..00000000 Binary files a/go.dev/_content/solutions/cockroachlabs/logo.png and /dev/null differ diff --git a/go.dev/_content/solutions/curve.md b/go.dev/_content/solutions/curve.md new file mode 100644 index 00000000..d52ca14b --- /dev/null +++ b/go.dev/_content/solutions/curve.md @@ -0,0 +1,10 @@ +--- +linkTitle: How Curve is getting ahead with Golang +description: Curve shares how Go's efficiency, standard library, and thriving community + help them move banking to the cloud. +layout: solution +company: Curve +logoSrc: curve.png +series: Case Studies +link: https://jaxenter.com/golang-curve-163187.html +--- diff --git a/go.dev/_content/solutions/curve/index.md b/go.dev/_content/solutions/curve/index.md deleted file mode 100644 index d52ca14b..00000000 --- a/go.dev/_content/solutions/curve/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -linkTitle: How Curve is getting ahead with Golang -description: Curve shares how Go's efficiency, standard library, and thriving community - help them move banking to the cloud. -layout: solution -company: Curve -logoSrc: curve.png -series: Case Studies -link: https://jaxenter.com/golang-curve-163187.html ---- diff --git a/go.dev/_content/solutions/curve/logo.png b/go.dev/_content/solutions/curve/logo.png deleted file mode 100644 index 194f220d..00000000 Binary files a/go.dev/_content/solutions/curve/logo.png and /dev/null differ diff --git a/go.dev/_content/solutions/devops-green.svg b/go.dev/_content/solutions/devops-green.svg new file mode 100644 index 00000000..d84348eb --- /dev/null +++ b/go.dev/_content/solutions/devops-green.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/_content/solutions/devops-white.svg b/go.dev/_content/solutions/devops-white.svg new file mode 100644 index 00000000..c98d8737 --- /dev/null +++ b/go.dev/_content/solutions/devops-white.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/_content/solutions/devops.md b/go.dev/_content/solutions/devops.md new file mode 100644 index 00000000..4453e804 --- /dev/null +++ b/go.dev/_content/solutions/devops.md @@ -0,0 +1,169 @@ +--- +title: "Development Operations & Site reliability Engineering" +linkTitle: "Development Operations & Site reliability Engineering" +description: "With fast build times, lean syntax, an automatic formatter and doc generator, Go is built to support both DevOps and SRE." +date: 2019-10-03T17:16:43-04:00 +layout: solution +series: Use Cases +books: +icon: + file: devops-green.svg + alt: ops icon +icon-white: + file: devops-white.svg + alt: ops icon +--- + +## Overview {#overview .sectionHeading} + +### Go helps enterprises automate and scale + +Development Operations (DevOps) teams help engineering organizations automate tasks and improve their continuous +integration and continuous delivery and deployment (CI/CD) process. DevOps can topple developmental silos and implement +tooling and automation to enhance software development, deployment, and support. + +Site Reliability Engineering (SRE) was born at Google to make the company’s “large-scale sites more reliable, efficient, +and scalable,”[ writes Silvia Fressard](https://opensource.com/article/18/10/what-site-reliability-engineer), an +independent DevOps consultant. “And the practices they developed responded so well to Google’s needs that other big tech +companies, such as Amazon and Netflix, also adopted them.” SRE requires a mix of development and operations skills, and +“[empowers software developers](https://stackify.com/site-reliability-engineering/) to own the ongoing daily operation +of their applications in production.” + +Go serves both siblings, DevOps and SRE, from its fast build times and lean syntax to its security and reliability support. Go's concurrency and networking features also make it ideal for tools that manage cloud deployment—readily supporting automation while +scaling for speed and code maintainability as development infrastructure grows over time. + +DevOps/SRE teams write software ranging from small scripts, to command-line interfaces (CLI), to complex automation and services, and Go’s feature set has benefits for every situation. + +## Key Benefits {#key-benefits .sectionHeading} + +### Easily build small scripts with Go’s robust standard library and static typing +Go’s fast build and startup times. Go’s extensive standard library—including packages for +common needs like HTTP, file I/O, time, regular expressions, exec, and JSON/CSV formats—lets DevOps/SREs get right into their business logic. Plus, Go’s static type system and explicit error handling make even small scripts more robust. + +### Quickly deploy CLIs with Go’s fast build times +Every site reliability engineer has written “one-time use” scripts that turned into CLIs used by dozens of other engineers every day. And small deployment automation scripts turn into rollout management services. With Go, DevOps/SREs are in a great position to be successful when software scope inevitably creeps. Starting with Go puts you in a great position to be successful when that happens. + +### Scale and maintain larger applications with Go’s low memory footprint and doc generator +Go’s garbage collector means DevOps/SRE teams don’t have to worry about memory management. And Go’s automatic documentation generator (godoc) makes code self-documenting–lowering maintenance overhead and establishing best practices from the get-go. + +{{projects ` + - company: Docker + url: https://docker.com/ + logoSrc: docker.svg + desc: Docker is a software-as-a-service (SaaS) product, written in Go, that DevOps/SRE teams leverage to “drive secure automation and deployment at massive scale,” supporting their CI/CD efforts. + ctas: + - text: Docker CI/CD + url: https://www.docker.com/solutions/cicd + - company: Drone + url: https://github.com/drone + logoSrc: drone.svg + desc: Drone is a Continuous Delivery system built on container technology, written in Go, that uses a simple YAML configuration file, a superset of docker-compose, to define and execute Pipelines inside Docker containers. + ctas: + - text: Drone + url: https://github.com/drone + - company: etcd + url: https://github.com/etcd-io/etcd + logoSrc: etcd.svg + desc: etcd is a strongly consistent, distributed key-value store that provides a reliable way to store data that needs to be accessed by a distributed system or cluster of machines, and it's written in Go. + ctas: + - text: etcd + url: https://github.com/etcd-io/etcd + - company: IBM + url: https://ibm.com/ + logoSrc: ibm.svg + desc: IBM’s DevOps teams use Go through Docker and Kubernetes, plus other DevOps and CI/CD tools written in Go. The company also supports connection to it’s messaging middleware through a Go-specific API. + ctas: + - text: IBM Applications in Golang + url: https://developer.ibm.com/messaging/2019/02/05/simplified-ibm-mq-applications-golang/ + - company: Netflix + url: http://netflix.com/ + logoSrc: netflix.svg + desc: Netflix uses Go to handle large scale data caching, with a service called Rend, which manages globally replicated storage for personalization data. + ctas: + - text: Application Data Caching + url: https://medium.com/netflix-techblog/application-data-caching-using-ssds-5bf25df851ef + - text: Rend + url: https://github.com/netflix/rend + - company: Microsoft + url: https://microsoft.com/ + logoSrc: microsoft.svg + desc: Microsoft uses Go in Azure Red Hat OpenShift services. This Microsoft solution provides DevOps teams with OpenShift clusters to maintain regulatory compliance and focus on application development. + ctas: + - text: OpenShift + url: https://azure.microsoft.com/en-us/services/openshift/ + - company: Terraform + url: https://terraform.io/ + logoSrc: terraform-icon.svg + desc: Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. It supports a number of cloud providers such as AWS, IBM Cloud, GCP, and Microsoft Azure - and it’s written in Go. + ctas: + - text: Terraform + url: https://www.terraform.io/intro/index.html + - company: Prometheus + url: https://github.com/prometheus/prometheus + logoSrc: prometheus.svg + desc: Prometheus is an open-source systems monitoring and alerting toolkit originally built at SoundCloud. Most Prometheus components are written in Go, making them easy to build and deploy as static binaries. + ctas: + - text: Prometheus + url: https://github.com/prometheus/prometheus + - company: YouTube + url: https://youtube.com/ + logoSrc: youtube.svg + desc: YouTube uses Go with Vitess (now part of PlanetScale), its database clustering system for horizontal scaling of MySQL through generalized sharding. Since 2011 it’s been a core component of YouTube’s database infrastructure, and has grown to encompass tens of thousands of MySQL nodes. + ctas: + - text: Vitess + url: https://github.com/vitessio/vitess +`}} + +## Get Started {#get-started .sectionHeading} + +### Go books on DevOps & SRE + +{{books ` + - title: Go Programming for Network Operations + url: https://www.amazon.com/Go-Programming-Network-Operations-Automation-ebook/dp/B07JKKN34L/ref=sr_1_16 + thumbnail: /images/books/go-programming-for-network-operations.jpg + - title: Go Programming Blueprints + url: https://github.com/matryer/goblueprints + thumbnail: /images/learn/go-programming-blueprints.png + - title: Go in Action + url: https://www.amazon.com/Go-Action-William-Kennedy/dp/1617291781 + thumbnail: /images/books/go-in-action.jpg + - title: The Go Programming Language + url: https://www.gopl.io/ + thumbnail: /images/learn/go-programming-language-book.png +`}} + +{{libraries ` + - title: Monitoring and tracing + viewMoreUrl: https://pkg.go.dev/search?q=tracing + items: + - text: opentracing/opentracing-go + url: https://pkg.go.dev/github.com/opentracing/opentracing-go?tab=overview + desc: Vendor-neutral APIs and instrumentation for distributed tracing + - text: jaegertracing/jaeger-client-go + url: https://pkg.go.dev/github.com/jaegertracing/jaeger-client-go?tab=overview + desc: An open source distributed tracing system developed by Uber formats + - text: grafana/grafana + url: https://pkg.go.dev/github.com/grafana/grafana?tab=overview + desc: An open-source platform for monitoring and observability + - text: istio/istio + url: https://pkg.go.dev/github.com/istio/istio?tab=overview + desc: An open-source service mesh and integratable platform + - title: CLI Libraries + viewMoreUrl: https://pkg.go.dev/search?q=command%20line%20OR%20CLI + items: + - text: spf13/cobra + url: https://pkg.go.dev/github.com/spf13/cobra?tab=overview + desc: A library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go + - text: spf13/viper + url: https://pkg.go.dev/github.com/spf13/viper?tab=overview + desc: A complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats + - text: urfave/cli + url: https://pkg.go.dev/github.com/urfave/cli?tab=overview + desc: A minimal framework for creating and organizing command line Go applications + - title: Other projects + items: + - text: golang-migrate/migrate + url: https://pkg.go.dev/github.com/golang-migrate/migrate?tab=overview + desc: A database migration tool written in Go +`}} diff --git a/go.dev/_content/solutions/devops/index.md b/go.dev/_content/solutions/devops/index.md deleted file mode 100644 index 83dfbfe1..00000000 --- a/go.dev/_content/solutions/devops/index.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: "Development Operations & Site reliability Engineering" -linkTitle: "Development Operations & Site reliability Engineering" -description: "With fast build times, lean syntax, an automatic formatter and doc generator, Go is built to support both DevOps and SRE." -date: 2019-10-03T17:16:43-04:00 -layout: solution -series: Use Cases -books: -icon: - file: ops-green.svg - alt: ops icon -icon-white: - file: ops-white.svg - alt: ops icon ---- - -## Overview {#overview .sectionHeading} - -### Go helps enterprises automate and scale - -Development Operations (DevOps) teams help engineering organizations automate tasks and improve their continuous -integration and continuous delivery and deployment (CI/CD) process. DevOps can topple developmental silos and implement -tooling and automation to enhance software development, deployment, and support. - -Site Reliability Engineering (SRE) was born at Google to make the company’s “large-scale sites more reliable, efficient, -and scalable,”[ writes Silvia Fressard](https://opensource.com/article/18/10/what-site-reliability-engineer), an -independent DevOps consultant. “And the practices they developed responded so well to Google’s needs that other big tech -companies, such as Amazon and Netflix, also adopted them.” SRE requires a mix of development and operations skills, and -“[empowers software developers](https://stackify.com/site-reliability-engineering/) to own the ongoing daily operation -of their applications in production.” - -Go serves both siblings, DevOps and SRE, from its fast build times and lean syntax to its security and reliability support. Go's concurrency and networking features also make it ideal for tools that manage cloud deployment—readily supporting automation while -scaling for speed and code maintainability as development infrastructure grows over time. - -DevOps/SRE teams write software ranging from small scripts, to command-line interfaces (CLI), to complex automation and services, and Go’s feature set has benefits for every situation. - -## Key Benefits {#key-benefits .sectionHeading} - -### Easily build small scripts with Go’s robust standard library and static typing -Go’s fast build and startup times. Go’s extensive standard library—including packages for -common needs like HTTP, file I/O, time, regular expressions, exec, and JSON/CSV formats—lets DevOps/SREs get right into their business logic. Plus, Go’s static type system and explicit error handling make even small scripts more robust. - -### Quickly deploy CLIs with Go’s fast build times -Every site reliability engineer has written “one-time use” scripts that turned into CLIs used by dozens of other engineers every day. And small deployment automation scripts turn into rollout management services. With Go, DevOps/SREs are in a great position to be successful when software scope inevitably creeps. Starting with Go puts you in a great position to be successful when that happens. - -### Scale and maintain larger applications with Go’s low memory footprint and doc generator -Go’s garbage collector means DevOps/SRE teams don’t have to worry about memory management. And Go’s automatic documentation generator (godoc) makes code self-documenting–lowering maintenance overhead and establishing best practices from the get-go. - -{{projects ` - - company: Docker - url: https://docker.com/ - logoSrc: docker.svg - desc: Docker is a software-as-a-service (SaaS) product, written in Go, that DevOps/SRE teams leverage to “drive secure automation and deployment at massive scale,” supporting their CI/CD efforts. - ctas: - - text: Docker CI/CD - url: https://www.docker.com/solutions/cicd - - company: Drone - url: https://github.com/drone - logoSrc: drone.svg - desc: Drone is a Continuous Delivery system built on container technology, written in Go, that uses a simple YAML configuration file, a superset of docker-compose, to define and execute Pipelines inside Docker containers. - ctas: - - text: Drone - url: https://github.com/drone - - company: etcd - url: https://github.com/etcd-io/etcd - logoSrc: etcd.svg - desc: etcd is a strongly consistent, distributed key-value store that provides a reliable way to store data that needs to be accessed by a distributed system or cluster of machines, and it's written in Go. - ctas: - - text: etcd - url: https://github.com/etcd-io/etcd - - company: IBM - url: https://ibm.com/ - logoSrc: ibm.svg - desc: IBM’s DevOps teams use Go through Docker and Kubernetes, plus other DevOps and CI/CD tools written in Go. The company also supports connection to it’s messaging middleware through a Go-specific API. - ctas: - - text: IBM Applications in Golang - url: https://developer.ibm.com/messaging/2019/02/05/simplified-ibm-mq-applications-golang/ - - company: Netflix - url: http://netflix.com/ - logoSrc: netflix.svg - desc: Netflix uses Go to handle large scale data caching, with a service called Rend, which manages globally replicated storage for personalization data. - ctas: - - text: Application Data Caching - url: https://medium.com/netflix-techblog/application-data-caching-using-ssds-5bf25df851ef - - text: Rend - url: https://github.com/netflix/rend - - company: Microsoft - url: https://microsoft.com/ - logoSrc: microsoft.svg - desc: Microsoft uses Go in Azure Red Hat OpenShift services. This Microsoft solution provides DevOps teams with OpenShift clusters to maintain regulatory compliance and focus on application development. - ctas: - - text: OpenShift - url: https://azure.microsoft.com/en-us/services/openshift/ - - company: Terraform - url: https://terraform.io/ - logoSrc: terraform-icon.svg - desc: Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. It supports a number of cloud providers such as AWS, IBM Cloud, GCP, and Microsoft Azure - and it’s written in Go. - ctas: - - text: Terraform - url: https://www.terraform.io/intro/index.html - - company: Prometheus - url: https://github.com/prometheus/prometheus - logoSrc: prometheus.svg - desc: Prometheus is an open-source systems monitoring and alerting toolkit originally built at SoundCloud. Most Prometheus components are written in Go, making them easy to build and deploy as static binaries. - ctas: - - text: Prometheus - url: https://github.com/prometheus/prometheus - - company: YouTube - url: https://youtube.com/ - logoSrc: youtube.svg - desc: YouTube uses Go with Vitess (now part of PlanetScale), its database clustering system for horizontal scaling of MySQL through generalized sharding. Since 2011 it’s been a core component of YouTube’s database infrastructure, and has grown to encompass tens of thousands of MySQL nodes. - ctas: - - text: Vitess - url: https://github.com/vitessio/vitess -`}} - -## Get Started {#get-started .sectionHeading} - -### Go books on DevOps & SRE - -{{books ` - - title: Go Programming for Network Operations - url: https://www.amazon.com/Go-Programming-Network-Operations-Automation-ebook/dp/B07JKKN34L/ref=sr_1_16 - thumbnail: /images/books/go-programming-for-network-operations.jpg - - title: Go Programming Blueprints - url: https://github.com/matryer/goblueprints - thumbnail: /images/learn/go-programming-blueprints.png - - title: Go in Action - url: https://www.amazon.com/Go-Action-William-Kennedy/dp/1617291781 - thumbnail: /images/books/go-in-action.jpg - - title: The Go Programming Language - url: https://www.gopl.io/ - thumbnail: /images/learn/go-programming-language-book.png -`}} - -{{libraries ` - - title: Monitoring and tracing - viewMoreUrl: https://pkg.go.dev/search?q=tracing - items: - - text: opentracing/opentracing-go - url: https://pkg.go.dev/github.com/opentracing/opentracing-go?tab=overview - desc: Vendor-neutral APIs and instrumentation for distributed tracing - - text: jaegertracing/jaeger-client-go - url: https://pkg.go.dev/github.com/jaegertracing/jaeger-client-go?tab=overview - desc: An open source distributed tracing system developed by Uber formats - - text: grafana/grafana - url: https://pkg.go.dev/github.com/grafana/grafana?tab=overview - desc: An open-source platform for monitoring and observability - - text: istio/istio - url: https://pkg.go.dev/github.com/istio/istio?tab=overview - desc: An open-source service mesh and integratable platform - - title: CLI Libraries - viewMoreUrl: https://pkg.go.dev/search?q=command%20line%20OR%20CLI - items: - - text: spf13/cobra - url: https://pkg.go.dev/github.com/spf13/cobra?tab=overview - desc: A library for creating powerful modern CLI applications and a program to generate applications and CLI applications in Go - - text: spf13/viper - url: https://pkg.go.dev/github.com/spf13/viper?tab=overview - desc: A complete configuration solution for Go applications, designed to work within an app to handle configuration needs and formats - - text: urfave/cli - url: https://pkg.go.dev/github.com/urfave/cli?tab=overview - desc: A minimal framework for creating and organizing command line Go applications - - title: Other projects - items: - - text: golang-migrate/migrate - url: https://pkg.go.dev/github.com/golang-migrate/migrate?tab=overview - desc: A database migration tool written in Go -`}} diff --git a/go.dev/_content/solutions/devops/ops-green.svg b/go.dev/_content/solutions/devops/ops-green.svg deleted file mode 100644 index d84348eb..00000000 --- a/go.dev/_content/solutions/devops/ops-green.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/_content/solutions/devops/ops-white.svg b/go.dev/_content/solutions/devops/ops-white.svg deleted file mode 100644 index c98d8737..00000000 --- a/go.dev/_content/solutions/devops/ops-white.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/_content/solutions/dropbox.md b/go.dev/_content/solutions/dropbox.md new file mode 100644 index 00000000..1503ff29 --- /dev/null +++ b/go.dev/_content/solutions/dropbox.md @@ -0,0 +1,10 @@ +--- +title: "Dropbox - Open sourcing our Go libraries" +description: "About a year ago, we decided to migrate our performance-critical backends from Python to Go to leverage better concurrency support and faster execution speed. ... At this point, we have successfully moved major parts of our infrastructure to Go." +layout: solution +company: Dropbox +logoSrc: dropbox.png +series: Case Studies +link: https://blogs.dropbox.com/tech/2014/07/open-sourcing-our-go-libraries/ +inLandingPageGrid: true +--- diff --git a/go.dev/_content/solutions/dropbox/index.md b/go.dev/_content/solutions/dropbox/index.md deleted file mode 100644 index 1503ff29..00000000 --- a/go.dev/_content/solutions/dropbox/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "Dropbox - Open sourcing our Go libraries" -description: "About a year ago, we decided to migrate our performance-critical backends from Python to Go to leverage better concurrency support and faster execution speed. ... At this point, we have successfully moved major parts of our infrastructure to Go." -layout: solution -company: Dropbox -logoSrc: dropbox.png -series: Case Studies -link: https://blogs.dropbox.com/tech/2014/07/open-sourcing-our-go-libraries/ -inLandingPageGrid: true ---- diff --git a/go.dev/_content/solutions/dropbox/logo.svg b/go.dev/_content/solutions/dropbox/logo.svg deleted file mode 100644 index f129a229..00000000 --- a/go.dev/_content/solutions/dropbox/logo.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/go.dev/_content/solutions/facebook.md b/go.dev/_content/solutions/facebook.md new file mode 100644 index 00000000..59eb3180 --- /dev/null +++ b/go.dev/_content/solutions/facebook.md @@ -0,0 +1,12 @@ +--- +linkTitle: How Facebook built an entity framework in Go +description: + Learn about a Facebook engineering team's decision to write a new entity + framework (ORM) in Go. +layout: solution +company: Facebook +series: Case Studies +logoSrc: facebook.png +link: https://entgo.io/blog/2019/10/03/introducing-ent/ +inLandingPageGrid: true +--- diff --git a/go.dev/_content/solutions/facebook/index.md b/go.dev/_content/solutions/facebook/index.md deleted file mode 100644 index 59eb3180..00000000 --- a/go.dev/_content/solutions/facebook/index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -linkTitle: How Facebook built an entity framework in Go -description: - Learn about a Facebook engineering team's decision to write a new entity - framework (ORM) in Go. -layout: solution -company: Facebook -series: Case Studies -logoSrc: facebook.png -link: https://entgo.io/blog/2019/10/03/introducing-ent/ -inLandingPageGrid: true ---- diff --git a/go.dev/_content/solutions/google/_index.md b/go.dev/_content/solutions/google/_index.md deleted file mode 100644 index 33d3e4e2..00000000 --- a/go.dev/_content/solutions/google/_index.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: 'Using Go at Google' -date: 2020-08-27 -layout: solution -company: Google -logoSrc: google.svg -heroImgSrc: go_core_data_case_study.png -carouselImgSrc: go_google_case_study_carousel.png -series: Case Studies -type: solutions -description: |- - Google is a technology company whose mission is to organize the world’s - information and make it universally accessible and useful. - - Go was created at Google in 2007 to improve programming productivity in an - era of multi-core networked machines and large codebases. Today, over 10 - years since its public announcement in 2009, Go's use inside Google has grown - tremendously. -quote: Go was created at Google in 2007, and since then, engineering teams - across Google have adopted Go to build products and services at massive scale. - ---- - -{{pullquote ` - author: Rob Pike - quote: | - Go started in September 2007 when Robert Griesemer, Ken Thompson, and I began - discussing a new language to address the engineering challenges we and our - colleagues at Google were facing in our daily work. - - When we first released Go to the public in November 2009, we didn’t know if the - language would be widely adopted or if it might influence future languages. - Looking back from 2020, Go has succeeded in both ways: it is widely used both - inside and outside Google, and its approaches to network concurrency and - software engineering have had a noticeable effect on other languages and their - tools. - - Go has turned out to have a much broader reach than we had ever expected. Its - growth in the industry has been phenomenal, and it has powered many projects at - Google. -`}} - -The following stories are a small sample of the many ways that Go is used at Google. - -### How Google's Core Data Solutions Team Uses Go - -Google's mission is “to organize the world's information and make it universally -accessible and useful.” One of the teams responsible for organizing that -information is Google’s Core Data Solutions team. The team, among other things, -maintains services to index web pages across the globe. These web indexing -services help support products like Google Search by keeping search results -updated and comprehensive, and they’re written in Go. - -[Learn more](/solutions/google/coredata/) - ---- - -### Chrome Content Optimization Service Runs on Go - -When the product Chrome comes to mind, you probably think solely of the user-installed browser. But behind the scenes, Chrome has an extensive fleet of backends. Among these is the Chrome Optimization Guide service. This service forms an important basis for Chrome’s user experience strategy, operating in the critical path for users, and is implemented in Go. - -[Learn more](/solutions/google/chrome/) - ---- - -### How the Firebase Hosting Team Scaled With Go - -The Firebase Hosting team provides static web hosting services for Google Cloud customers. They provide a static web host that sits behind a global content delivery network, and offer users tools that are easy to use. The team also develops features that range from uploading site files to registering domains to tracking usage. - -[Learn more](/solutions/google/firebase/) - ---- - -### Actuating Google Production: How Google’s Site Reliability Engineering Team Uses Go - -Google runs a small number of very large services. Those services are powered by a global infrastructure covering everything one needs: storage systems, load balancers, network, logging, monitoring, and many more. Nevertheless, it is not a static system - it cannot be. Architecture evolves, new products and ideas are created, new versions must be rolled out, configs pushed, database schema updated, and more. We end up deploying changes to our systems dozens of times per second. - -[Learn more](/solutions/google/sitereliability/) \ No newline at end of file diff --git a/go.dev/_content/solutions/google/index.md b/go.dev/_content/solutions/google/index.md new file mode 100644 index 00000000..33d3e4e2 --- /dev/null +++ b/go.dev/_content/solutions/google/index.md @@ -0,0 +1,78 @@ +--- +title: 'Using Go at Google' +date: 2020-08-27 +layout: solution +company: Google +logoSrc: google.svg +heroImgSrc: go_core_data_case_study.png +carouselImgSrc: go_google_case_study_carousel.png +series: Case Studies +type: solutions +description: |- + Google is a technology company whose mission is to organize the world’s + information and make it universally accessible and useful. + + Go was created at Google in 2007 to improve programming productivity in an + era of multi-core networked machines and large codebases. Today, over 10 + years since its public announcement in 2009, Go's use inside Google has grown + tremendously. +quote: Go was created at Google in 2007, and since then, engineering teams + across Google have adopted Go to build products and services at massive scale. + +--- + +{{pullquote ` + author: Rob Pike + quote: | + Go started in September 2007 when Robert Griesemer, Ken Thompson, and I began + discussing a new language to address the engineering challenges we and our + colleagues at Google were facing in our daily work. + + When we first released Go to the public in November 2009, we didn’t know if the + language would be widely adopted or if it might influence future languages. + Looking back from 2020, Go has succeeded in both ways: it is widely used both + inside and outside Google, and its approaches to network concurrency and + software engineering have had a noticeable effect on other languages and their + tools. + + Go has turned out to have a much broader reach than we had ever expected. Its + growth in the industry has been phenomenal, and it has powered many projects at + Google. +`}} + +The following stories are a small sample of the many ways that Go is used at Google. + +### How Google's Core Data Solutions Team Uses Go + +Google's mission is “to organize the world's information and make it universally +accessible and useful.” One of the teams responsible for organizing that +information is Google’s Core Data Solutions team. The team, among other things, +maintains services to index web pages across the globe. These web indexing +services help support products like Google Search by keeping search results +updated and comprehensive, and they’re written in Go. + +[Learn more](/solutions/google/coredata/) + +--- + +### Chrome Content Optimization Service Runs on Go + +When the product Chrome comes to mind, you probably think solely of the user-installed browser. But behind the scenes, Chrome has an extensive fleet of backends. Among these is the Chrome Optimization Guide service. This service forms an important basis for Chrome’s user experience strategy, operating in the critical path for users, and is implemented in Go. + +[Learn more](/solutions/google/chrome/) + +--- + +### How the Firebase Hosting Team Scaled With Go + +The Firebase Hosting team provides static web hosting services for Google Cloud customers. They provide a static web host that sits behind a global content delivery network, and offer users tools that are easy to use. The team also develops features that range from uploading site files to registering domains to tracking usage. + +[Learn more](/solutions/google/firebase/) + +--- + +### Actuating Google Production: How Google’s Site Reliability Engineering Team Uses Go + +Google runs a small number of very large services. Those services are powered by a global infrastructure covering everything one needs: storage systems, load balancers, network, logging, monitoring, and many more. Nevertheless, it is not a static system - it cannot be. Architecture evolves, new products and ideas are created, new versions must be rolled out, configs pushed, database schema updated, and more. We end up deploying changes to our systems dozens of times per second. + +[Learn more](/solutions/google/sitereliability/) \ No newline at end of file diff --git a/go.dev/_content/solutions/grail.md b/go.dev/_content/solutions/grail.md new file mode 100644 index 00000000..b6be2ea0 --- /dev/null +++ b/go.dev/_content/solutions/grail.md @@ -0,0 +1,15 @@ +--- +linkTitle: Bigslice - A cluster computing system in Go +description: At GRAIL, we use the Go programming language for most of our bioinformatics, + data processing, and machine learning tasks. Go’s simplicity makes it easy for + newcomers to learn; its transparent runtime semantics makes it easy to reason + about performance; and its ability to control data layout and allocation makes + it possible to write highly performant data processing code. +layout: solution +company: GRAIL +logoSrc: grail.png +series: Case Studies +link: + https://medium.com/grail-eng/bigslice-a-cluster-computing-system-for-go-7e03acd2419b +inLandingPageGrid: false +--- \ No newline at end of file diff --git a/go.dev/_content/solutions/grail/index.md b/go.dev/_content/solutions/grail/index.md deleted file mode 100644 index b6be2ea0..00000000 --- a/go.dev/_content/solutions/grail/index.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -linkTitle: Bigslice - A cluster computing system in Go -description: At GRAIL, we use the Go programming language for most of our bioinformatics, - data processing, and machine learning tasks. Go’s simplicity makes it easy for - newcomers to learn; its transparent runtime semantics makes it easy to reason - about performance; and its ability to control data layout and allocation makes - it possible to write highly performant data processing code. -layout: solution -company: GRAIL -logoSrc: grail.png -series: Case Studies -link: - https://medium.com/grail-eng/bigslice-a-cluster-computing-system-for-go-7e03acd2419b -inLandingPageGrid: false ---- \ No newline at end of file diff --git a/go.dev/_content/solutions/grail/logo.png b/go.dev/_content/solutions/grail/logo.png deleted file mode 100644 index 2dd9c59e..00000000 Binary files a/go.dev/_content/solutions/grail/logo.png and /dev/null differ diff --git a/go.dev/_content/solutions/index.md b/go.dev/_content/solutions/index.md new file mode 100644 index 00000000..47678995 --- /dev/null +++ b/go.dev/_content/solutions/index.md @@ -0,0 +1,180 @@ +--- +title: Why Go +--- + +
    + +
    +
    +
    +
    + + +
    +
    + + + +
    +
    diff --git a/go.dev/_content/solutions/mercadolibre.md b/go.dev/_content/solutions/mercadolibre.md new file mode 100644 index 00000000..f1044482 --- /dev/null +++ b/go.dev/_content/solutions/mercadolibre.md @@ -0,0 +1,171 @@ +--- +title: "MercadoLibre Grows with Go" +layout: solution +company: MercadoLibre +logoSrc: mercado-libre.png +heroImgSrc: go_mercadolibre_case_study_logo.png +carouselImgSrc: go_mercadolibre_case_study.png +date: 2019-11-10T16:26:31-04:00 +series: Case Studies +quote: Go provides clean, efficient code that readily scales as MercadoLibre’s online commerce grows, and increases developer productivity by allowing their engineers to serve their ever-increasing audience while writing less code. +--- + +{{pullquote ` + author: Eric Kohan + title: Software Engineering Manager + company: MercadoLibre + quote: | + I think that **the tour of Go is by far the best introduction to a language that I’ve seen**, It’s really simple and it gives you a fair overview of probably 80 percent of the language. When we want to get developers to learn Go, and to get to production fast, we tell them to start with the tour of Go. +`}} + +## Go helps integrated ecosystem attract developers and scale eCommerce + +MercadoLibre, Inc. hosts the largest online commerce ecosystem in Latin America and is present in 18 countries. Founded +in 1999 and headquartered in Argentina, the company has turned to Go to help it scale and modernize its ecosystem. Go +provides clean, efficient code that readily scales as MercadoLibre’s online commerce grows, and increases developer +productivity by allowing their engineers to serve their ever-increasing audience while writing less code. + +### MercadoLibre taps Go for scale + +Back in 2015, there was a growing sense within MercadoLibre that their existing API framework, on Groovy and Grails, was +reaching its limits and the company needed a different platform to continue scaling. MercadoLibre’s platform was (and +continues) to expand exponentially, which created a lot of extra work for its developers: Both Groovy and Grails require +a lot of decisions from developers and Groovy is a dynamic programming language. This was not a good combination for +quickly scaling growth, as MercadoLibre needed very experienced developers in this very resource intensive environment +to develop and tune to achieve desired performance. Test execution times were slow, and build and deploy times were +slow. Thus, the need for code efficiency and scalability became as important as the need for speed in code development. + + +### Go improves system efficiency + +As one example of Go’s contributions to network efficiency, the core API team builds and maintains the largest APIs at +the center of the company’s microservices solutions. This team creates user APIs, which in turn are used by the +MercadoLibre Marketplace, by the MercadoPago FinTech platform, by MercadoLibre’s shipping and logistics solutions, and +other hosted solutions. With the high service levels demanded by these solutions—the average user API has between eight +and ten million requests per minute—the team employs Go to serve them at less than ten milliseconds per request. + +The API team also deploys Docker containers—a software-as-a-service (SaaS) product, also written in Go—to virtualize +their development and readily deploy their microservices via the Docker Engine. This system supports larger, +mission-critical APIs that handle **more than 20 million requests per minute in Go.** + +One API made important use of Go’s concurrency primitives to efficiently multiplex IDs from several services. The team +was able to accomplish this with just a few lines of Go code, and the success of this API convinced the core API team to +migrate more and more microservices to Go. The end result for MercadoLibre has been improved cost-efficiencies and +system response times. + +### Go for scalability + +Historically, much of the company’s stack was based on Grails and Groovy backed by relational databases. However this +big framework with multiple layers was soon found encountering scalability issues. + +Converting that legacy architecture to Go as a new, very thin framework for building APIs streamlined those intermediate +layers and yielded great performance benefits. For example, one large Go service is now able to **run 70,000 requests +per machine with just 20 MB of RAM.** + +{{backgroundquote ` + author: Eric Kohan + title: Software Engineering Manager + company: MercadoLibre + quote: | + Go was just marvelous for us. It’s very powerful + and very easy to learn, and with backend infrastructure, has been great for us in terms of scalability. +`}} + +Using **Go allowed MercadoLibre to cut the number of servers** they use for this service to one-eighth the original +number (from 32 servers down to four), plus each server can operate with less power (originally four CPU cores, now down +to two CPU cores). With Go, the company **obviated 88 percent of their servers and cut CPU on the remaining ones in +half**—producing a tremendous cost-savings. + +Sitting between developers and the cloud providers, MercadoLibre uses a platform called Fury—a platform-as-a-service +tool for building, deploying, monitoring, and managing services in a cloud-agnostic way. As a result, any team that +wants to create a new service in Go has access to proven templates for a variety of service types, and can quickly spin +up a repository in GitHub with starter code, a Docker image for the service, and a deployment pipeline. The end result +is a system that allows engineers to focus on building innovative services while avoiding the tedious stages of setting +up a new project—all while effectively standardizing the build and deployment pipelines. + +Today, **roughly half of Mercadolibre's traffic is handled by Go applications.** + + +### MercadoLibre uses Go for developers + +The programming _lingua francas_ for MercadoLibre’s infrastructure are currently Go and Java. Every app, every program, +every microservice is hosted on its own GitHub repository, plus the company uses an additional GitHub repository of +toolkits to solve new problems and allow clients to interact with its services. + +These extensive and well-curated Go and Java toolkits allow programmers to develop new apps quickly and with great +support. Plus, in a community of more than 2,800 developers, MercadoLibre has multiple internal groups available for +chat and guidance on deploying Go, whether across different development centers or different countries. The company also +fosters internal working groups to provide training sessions for new MercadoLibre Go developers, and hosts Go meetups +for external developers to help build a broader community of Latin American Go developers. + + +### Go as a recruiting tool + +MercadoLibre’s Go advocacy has also become a strong recruiting tool for the company. MercadoLibre was among the first +companies using Go in Argentina, and is perhaps the largest in Latin America using the language so widely in production. +Headquartered in Buenos Aires, with many start-ups and emerging technology companies nearby, MercadoLibre's adoption of +Go has shaped the market for developers across the Pampas. + +{{backgroundquote ` + author: Eric Kohan + title: Software Engineering Manager + company: MercadoLibre + quote: | + We really see eye-to-eye with the larger philosophy of the language. We love Go's simplicity, and we find that having its very explicit error handling has been a gain for developers because it results in safer, more stable code in production. +`}} + +Buenos Aires is today a very competitive market for programmers, offering computer programmers many employment options, +and the high demand for technology in the region drives great salaries, great benefits, and the ability to be selective +when choosing an employer. As such, MercadoLibre—like all employers of engineers and programmers in the region—strives +to provide an exciting workplace and strong career path. Go has proven to be a key differentiator for MercadoLibre: the +company organizes Go workshops for external developers so they can come and learn Go, and when they enjoy what they are +doing and the people they talk to, they quickly recognize MercadoLibre as an enticing place to work. + +### Go enabling developers + +MercadoLibre employs Go for its simplicity with systems at scale, but that simplicity is also why the company's +developers love Go. + +The company also uses web pages like[ Go by Example](https://gobyexample.com/) and[ Effective +Go](https://golang.org/doc/effective_go.html) to educate new programmers, and shares representative internal APIs +written in Go to speed understanding and proficiency. MercadoLibre developers get the resources they need to embrace the +language, then leverage their own skills and enthusiasm to start programming. + +{{backgroundquote ` + author: Federico Martin Roasio + title: Technical Project Lead + company: MercadoLibre + quote: | + Go has been great for writing business logic, and we are the team that writes those APIs. +`}} + +MercadoLibre leverages Go’s expressive and clean syntax to make it easier for developers to write programs that run +efficiently on modern cloud platforms. And while speed in development yields cost efficiency for the company, developers +individually benefit from the swift learning curve Go delivers. Not only are MercadoLibre's experienced engineers able +to build highly critical applications very quickly with Go, but even entry-level engineers have been able to write +services that, in other languages, MercadoLibre would only trust to more senior developers. For example, a key set of +user APIs—handling almost ten million requests per minute—were developed by entry-level software engineers, many of whom +only knew about programming from recent courses at university. Similarly, MercadoLibre has seen developers already +proficient with other programming languages (such as Java or .NET or Ruby) learn Go fast enough start writing production +services in just a few weeks. + +With Go, MercadoLibre’s **build times are three times (3x) faster** and their **test suite runs an amazing 24 times +faster**. This means the company’s developers can make a change, then build and test that change much faster than they +could before. + +And dropping MercadoLibre’s test suite runtimes from 90-seconds to **just 3-seconds with Go** was a huge boon for its +developers—allowing them to keep focus (and context) while the much faster tests complete. + +Leveraging this success, MercadoLibre is committed not only to ongoing education for its programmers, but ongoing Go +education. The company sends key engineering leaders to GopherCon and other Go events each year, MercadoLibre’s +infrastructure and security teams encourage all the development teams to keep Go versions up to date, and the company +has a team developing a _Go-meli-toolkit_: A complete Go library to interface all the services provided by Fury. + +### Getting your enterprise started with Go + +Just as MercadoLibre started with a proof-of-concept project to implement Go, dozens of other large enterprises are +adopting Go as well. + +There are over one million developers using Go worldwide—spanning banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as [American Express](https://go.dev/solutions/americanexpress), [PayPal](https://go.dev/solutions/paypal), Capital One, Dropbox, IBM, Monzo, New York Times, Salesforce, Square, Target, Twitch, Uber, and of course Google. + +To learn more about how Go can help your enterprise build reliable, scalable software as it does at MercadoLibre, visit [go.dev](https://go.dev) today. diff --git a/go.dev/_content/solutions/mercadolibre/index.md b/go.dev/_content/solutions/mercadolibre/index.md deleted file mode 100644 index f1044482..00000000 --- a/go.dev/_content/solutions/mercadolibre/index.md +++ /dev/null @@ -1,171 +0,0 @@ ---- -title: "MercadoLibre Grows with Go" -layout: solution -company: MercadoLibre -logoSrc: mercado-libre.png -heroImgSrc: go_mercadolibre_case_study_logo.png -carouselImgSrc: go_mercadolibre_case_study.png -date: 2019-11-10T16:26:31-04:00 -series: Case Studies -quote: Go provides clean, efficient code that readily scales as MercadoLibre’s online commerce grows, and increases developer productivity by allowing their engineers to serve their ever-increasing audience while writing less code. ---- - -{{pullquote ` - author: Eric Kohan - title: Software Engineering Manager - company: MercadoLibre - quote: | - I think that **the tour of Go is by far the best introduction to a language that I’ve seen**, It’s really simple and it gives you a fair overview of probably 80 percent of the language. When we want to get developers to learn Go, and to get to production fast, we tell them to start with the tour of Go. -`}} - -## Go helps integrated ecosystem attract developers and scale eCommerce - -MercadoLibre, Inc. hosts the largest online commerce ecosystem in Latin America and is present in 18 countries. Founded -in 1999 and headquartered in Argentina, the company has turned to Go to help it scale and modernize its ecosystem. Go -provides clean, efficient code that readily scales as MercadoLibre’s online commerce grows, and increases developer -productivity by allowing their engineers to serve their ever-increasing audience while writing less code. - -### MercadoLibre taps Go for scale - -Back in 2015, there was a growing sense within MercadoLibre that their existing API framework, on Groovy and Grails, was -reaching its limits and the company needed a different platform to continue scaling. MercadoLibre’s platform was (and -continues) to expand exponentially, which created a lot of extra work for its developers: Both Groovy and Grails require -a lot of decisions from developers and Groovy is a dynamic programming language. This was not a good combination for -quickly scaling growth, as MercadoLibre needed very experienced developers in this very resource intensive environment -to develop and tune to achieve desired performance. Test execution times were slow, and build and deploy times were -slow. Thus, the need for code efficiency and scalability became as important as the need for speed in code development. - - -### Go improves system efficiency - -As one example of Go’s contributions to network efficiency, the core API team builds and maintains the largest APIs at -the center of the company’s microservices solutions. This team creates user APIs, which in turn are used by the -MercadoLibre Marketplace, by the MercadoPago FinTech platform, by MercadoLibre’s shipping and logistics solutions, and -other hosted solutions. With the high service levels demanded by these solutions—the average user API has between eight -and ten million requests per minute—the team employs Go to serve them at less than ten milliseconds per request. - -The API team also deploys Docker containers—a software-as-a-service (SaaS) product, also written in Go—to virtualize -their development and readily deploy their microservices via the Docker Engine. This system supports larger, -mission-critical APIs that handle **more than 20 million requests per minute in Go.** - -One API made important use of Go’s concurrency primitives to efficiently multiplex IDs from several services. The team -was able to accomplish this with just a few lines of Go code, and the success of this API convinced the core API team to -migrate more and more microservices to Go. The end result for MercadoLibre has been improved cost-efficiencies and -system response times. - -### Go for scalability - -Historically, much of the company’s stack was based on Grails and Groovy backed by relational databases. However this -big framework with multiple layers was soon found encountering scalability issues. - -Converting that legacy architecture to Go as a new, very thin framework for building APIs streamlined those intermediate -layers and yielded great performance benefits. For example, one large Go service is now able to **run 70,000 requests -per machine with just 20 MB of RAM.** - -{{backgroundquote ` - author: Eric Kohan - title: Software Engineering Manager - company: MercadoLibre - quote: | - Go was just marvelous for us. It’s very powerful - and very easy to learn, and with backend infrastructure, has been great for us in terms of scalability. -`}} - -Using **Go allowed MercadoLibre to cut the number of servers** they use for this service to one-eighth the original -number (from 32 servers down to four), plus each server can operate with less power (originally four CPU cores, now down -to two CPU cores). With Go, the company **obviated 88 percent of their servers and cut CPU on the remaining ones in -half**—producing a tremendous cost-savings. - -Sitting between developers and the cloud providers, MercadoLibre uses a platform called Fury—a platform-as-a-service -tool for building, deploying, monitoring, and managing services in a cloud-agnostic way. As a result, any team that -wants to create a new service in Go has access to proven templates for a variety of service types, and can quickly spin -up a repository in GitHub with starter code, a Docker image for the service, and a deployment pipeline. The end result -is a system that allows engineers to focus on building innovative services while avoiding the tedious stages of setting -up a new project—all while effectively standardizing the build and deployment pipelines. - -Today, **roughly half of Mercadolibre's traffic is handled by Go applications.** - - -### MercadoLibre uses Go for developers - -The programming _lingua francas_ for MercadoLibre’s infrastructure are currently Go and Java. Every app, every program, -every microservice is hosted on its own GitHub repository, plus the company uses an additional GitHub repository of -toolkits to solve new problems and allow clients to interact with its services. - -These extensive and well-curated Go and Java toolkits allow programmers to develop new apps quickly and with great -support. Plus, in a community of more than 2,800 developers, MercadoLibre has multiple internal groups available for -chat and guidance on deploying Go, whether across different development centers or different countries. The company also -fosters internal working groups to provide training sessions for new MercadoLibre Go developers, and hosts Go meetups -for external developers to help build a broader community of Latin American Go developers. - - -### Go as a recruiting tool - -MercadoLibre’s Go advocacy has also become a strong recruiting tool for the company. MercadoLibre was among the first -companies using Go in Argentina, and is perhaps the largest in Latin America using the language so widely in production. -Headquartered in Buenos Aires, with many start-ups and emerging technology companies nearby, MercadoLibre's adoption of -Go has shaped the market for developers across the Pampas. - -{{backgroundquote ` - author: Eric Kohan - title: Software Engineering Manager - company: MercadoLibre - quote: | - We really see eye-to-eye with the larger philosophy of the language. We love Go's simplicity, and we find that having its very explicit error handling has been a gain for developers because it results in safer, more stable code in production. -`}} - -Buenos Aires is today a very competitive market for programmers, offering computer programmers many employment options, -and the high demand for technology in the region drives great salaries, great benefits, and the ability to be selective -when choosing an employer. As such, MercadoLibre—like all employers of engineers and programmers in the region—strives -to provide an exciting workplace and strong career path. Go has proven to be a key differentiator for MercadoLibre: the -company organizes Go workshops for external developers so they can come and learn Go, and when they enjoy what they are -doing and the people they talk to, they quickly recognize MercadoLibre as an enticing place to work. - -### Go enabling developers - -MercadoLibre employs Go for its simplicity with systems at scale, but that simplicity is also why the company's -developers love Go. - -The company also uses web pages like[ Go by Example](https://gobyexample.com/) and[ Effective -Go](https://golang.org/doc/effective_go.html) to educate new programmers, and shares representative internal APIs -written in Go to speed understanding and proficiency. MercadoLibre developers get the resources they need to embrace the -language, then leverage their own skills and enthusiasm to start programming. - -{{backgroundquote ` - author: Federico Martin Roasio - title: Technical Project Lead - company: MercadoLibre - quote: | - Go has been great for writing business logic, and we are the team that writes those APIs. -`}} - -MercadoLibre leverages Go’s expressive and clean syntax to make it easier for developers to write programs that run -efficiently on modern cloud platforms. And while speed in development yields cost efficiency for the company, developers -individually benefit from the swift learning curve Go delivers. Not only are MercadoLibre's experienced engineers able -to build highly critical applications very quickly with Go, but even entry-level engineers have been able to write -services that, in other languages, MercadoLibre would only trust to more senior developers. For example, a key set of -user APIs—handling almost ten million requests per minute—were developed by entry-level software engineers, many of whom -only knew about programming from recent courses at university. Similarly, MercadoLibre has seen developers already -proficient with other programming languages (such as Java or .NET or Ruby) learn Go fast enough start writing production -services in just a few weeks. - -With Go, MercadoLibre’s **build times are three times (3x) faster** and their **test suite runs an amazing 24 times -faster**. This means the company’s developers can make a change, then build and test that change much faster than they -could before. - -And dropping MercadoLibre’s test suite runtimes from 90-seconds to **just 3-seconds with Go** was a huge boon for its -developers—allowing them to keep focus (and context) while the much faster tests complete. - -Leveraging this success, MercadoLibre is committed not only to ongoing education for its programmers, but ongoing Go -education. The company sends key engineering leaders to GopherCon and other Go events each year, MercadoLibre’s -infrastructure and security teams encourage all the development teams to keep Go versions up to date, and the company -has a team developing a _Go-meli-toolkit_: A complete Go library to interface all the services provided by Fury. - -### Getting your enterprise started with Go - -Just as MercadoLibre started with a proof-of-concept project to implement Go, dozens of other large enterprises are -adopting Go as well. - -There are over one million developers using Go worldwide—spanning banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as [American Express](https://go.dev/solutions/americanexpress), [PayPal](https://go.dev/solutions/paypal), Capital One, Dropbox, IBM, Monzo, New York Times, Salesforce, Square, Target, Twitch, Uber, and of course Google. - -To learn more about how Go can help your enterprise build reliable, scalable software as it does at MercadoLibre, visit [go.dev](https://go.dev) today. diff --git a/go.dev/_content/solutions/mercadolibre/logo.svg b/go.dev/_content/solutions/mercadolibre/logo.svg deleted file mode 100644 index 3fccb14c..00000000 --- a/go.dev/_content/solutions/mercadolibre/logo.svg +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/go.dev/_content/solutions/microsoft.md b/go.dev/_content/solutions/microsoft.md new file mode 100644 index 00000000..ddcd77ef --- /dev/null +++ b/go.dev/_content/solutions/microsoft.md @@ -0,0 +1,12 @@ +--- +linkTitle: How Microsoft Embraces Go +description: + Learn about how Microsoft has helped support Go and how it uses Go to power + pieces of it's cloud infrastructure. +layout: solution +company: Microsoft +series: Case Studies +logoSrc: microsoft.png +link: https://cloudblogs.microsoft.com/opensource/2018/02/21/go-lang-brian-ketelsen-explains-fast-growth/ +inLandingPageGrid: true +--- diff --git a/go.dev/_content/solutions/microsoft/index.md b/go.dev/_content/solutions/microsoft/index.md deleted file mode 100644 index ddcd77ef..00000000 --- a/go.dev/_content/solutions/microsoft/index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -linkTitle: How Microsoft Embraces Go -description: - Learn about how Microsoft has helped support Go and how it uses Go to power - pieces of it's cloud infrastructure. -layout: solution -company: Microsoft -series: Case Studies -logoSrc: microsoft.png -link: https://cloudblogs.microsoft.com/opensource/2018/02/21/go-lang-brian-ketelsen-explains-fast-growth/ -inLandingPageGrid: true ---- diff --git a/go.dev/_content/solutions/netflix.md b/go.dev/_content/solutions/netflix.md new file mode 100644 index 00000000..1a724077 --- /dev/null +++ b/go.dev/_content/solutions/netflix.md @@ -0,0 +1,10 @@ +--- +linkTitle: "Netflix - Application data caching using SSDs" +description: "The decision to use Go was deliberate, because we needed something that had lower latency than Java (where garbage collection pauses are an issue) and is more productive for developers than C, while also handling tens of thousands of client connections. Go fits this space well." +layout: solution +company: Netflix +logoSrc: netflix.svg +series: Case Studies +link: https://medium.com/netflix-techblog/application-data-caching-using-ssds-5bf25df851ef +inLandingPageGrid: true +--- diff --git a/go.dev/_content/solutions/netflix/index.md b/go.dev/_content/solutions/netflix/index.md deleted file mode 100644 index 1a724077..00000000 --- a/go.dev/_content/solutions/netflix/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -linkTitle: "Netflix - Application data caching using SSDs" -description: "The decision to use Go was deliberate, because we needed something that had lower latency than Java (where garbage collection pauses are an issue) and is more productive for developers than C, while also handling tens of thousands of client connections. Go fits this space well." -layout: solution -company: Netflix -logoSrc: netflix.svg -series: Case Studies -link: https://medium.com/netflix-techblog/application-data-caching-using-ssds-5bf25df851ef -inLandingPageGrid: true ---- diff --git a/go.dev/_content/solutions/netflix/logo.svg b/go.dev/_content/solutions/netflix/logo.svg deleted file mode 100644 index 0ce1bf48..00000000 --- a/go.dev/_content/solutions/netflix/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/_content/solutions/paypal.md b/go.dev/_content/solutions/paypal.md new file mode 100644 index 00000000..96803316 --- /dev/null +++ b/go.dev/_content/solutions/paypal.md @@ -0,0 +1,88 @@ +--- +title: PayPal Taps Go to Modernize and Scale +date: 2020-06-01 +layout: solution +company: PayPal +logoSrc: paypal.svg +heroImgSrc: go_paypal_case_study_logo.png +carouselImgSrc: go_paypal_case_study.png +series: Case Studies +quote: Go’s value in producing clean, efficient code that readily scales as software deployment scales made the language a strong fit to support PayPal’s goals. +--- + +{{pullquote ` + author: Bala Natarajan + title: Sr. Director of Engineering, Developer Experience + company: PayPal + quote: | + Since our NoSQL and DB proxy used quite a bit of system details in a multi-threaded mode, the code got complex managing the different conditions, given that Go provides channels and routines to deal with complexity, we were able to structure the code to meet our requirements. +`}} + +## New code infrastructure built on Go + +PayPal was created to democratize financial services and empower people and businesses to join and thrive in the global economy. Central to this effort is PayPal’s Payments Platform, which uses a combination of proprietary and third-party technologies to efficiently and securely facilitate transactions between millions of merchants and consumers worldwide. As the Payments Platform grew larger and more complicated, PayPal sought to modernize its systems and reduce time-to-market for new applications. + +Go’s value in producing clean, efficient code that readily scales as software deployment scales made the language a strong fit to support PayPal’s goals. + +Central to the Payment Processing Platform is a proprietary NoSQL database that PayPal had developed in C++. The complexity of the code, however, was substantially decreasing its developers’ ability to evolve the platform. Go’s simple code layouts, goroutines (lightweight threads of execution) and channels (which serve as the pipes that connect concurrent goroutines), made Go a natural choice for the NoSQL development team to simplify and modernize the platform. + +As a proof of concept, a development team spent six months learning Go and reimplementing the NoSQL system from the ground up in Go, during which they also provided insights on how Go could be implemented more broadly at PayPal. As of today, thirty percent of the clusters have been migrated to use the new NoSQL database. + + +## Using Go to simplify for scale + +As PayPal’s platform becomes more intricate, Go provides a way to readily simplify the complexity of creating and running software at scale. The language provides PayPal with great libraries and fast tools, plus concurrency, garbage collection, and type safety. + +With Go, PayPal enables its developers to spend more time looking at code and thinking strategically, by freeing them from the noise of C++ and Java development. + +After the success of this newly re-written NoSQL system, more platform and content teams within PayPal began adopting Go. Natarajan’s current team is responsible for PayPal’s build, test, and release pipelines—all built in Go. The company has a large build and test farm which is completely managed using Go infrastructure to support builds-as-a-service (and tests-as-a-service) for developers across the company. + + Go gopher factory + +## Modernizing PayPal systems with Go + +With the distributed computing capabilities required by PayPal, Go was the right language to refresh their systems. PayPal needed programming that is concurrent and parallel, compiled for high performance and highly portable, and that brings developers the benefits of a modular, composable open-source architecture—Go has delivered all that and more to help PayPal modernize its systems. + +Security and supportability are key matters at PayPal, and the company’s operational pipelines are increasingly dominated by Go because the language’s cleanliness and modularity help them achieve these goals. PayPal’s deployment of Go engenders a platform of creativity for developers, allowing them to produce simple, efficient, and reliable software at scale for PayPal’s worldwide markets. + +As PayPal continues to modernize their software-defined networking (SDN) infrastructure with Go, they are seeing performance benefits in addition to more maintainable code. For example, Go now powers routers, load balances, and an increasing number of production systems. + +{{backgroundquote ` + author: Bala Natarajan + title: Sr. Director of Engineering + quote: | + In our tightly managed environments where we run Go code, we have seen a CPU reduction of approximately ten percent with cleaner and maintainable code. +`}} + +## Go increases developer productivity + +As a global operation, PayPal needs its development teams to be effective at managing two kinds of scale: production scale, especially concurrent systems interacting with many other servers (such as cloud services); and development scale, especially large codebases developed by many programmers in coordination (such as open-source development) + +PayPal leverages Go to address these issues of scale. The company’s developers benefit from Go’s ability to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. As PayPal modernizes its system, support for networked and multicore computing is critical. Go not only delivers such support but delivers quickly—it takes at most a few seconds to compile a large executable on a single computer. + +There are currently over 100 Go developers at PayPal, and future developers who choose to adopt Go will have an easier time getting the language approved thanks to the many successful implementations already in production at the company. + +Most importantly, PayPal developers have increased their productivity with Go. Go’s concurrency mechanisms have made it easy to write programs that get the most out of PayPal’s multicore and networked machines. Developers using Go also benefit from the fact that it compiles quickly to machine code and their apps gain the convenience of garbage collection and the power of run-time reflection. + +## Speeding PayPal’s time to market + +The first-class languages at PayPal today are Java and Node, with Go primarily used as an infrastructure language. While Go may never replace Node.js for certain applications, Natarajan is pushing to make Go a first-class language at PayPal. + +Through his efforts, PayPal is also evaluating moving to the Google Kubernetes Engine (GKE) to speed their new products’ time-to-market. The GKE is a managed, production-ready environment for deploying containerized applications, and brings Google's latest innovations in developer productivity, automated operations, and open source flexibility. + +For PayPal, deploying to GKE would enable rapid development and iteration by making it easier for PayPal to deploy, update, and manage its applications and services. Plus PayPal will find it easier to run Machine Learning, General Purpose GPU, High-Performance Computing, and other workloads that benefit from specialized hardware accelerators supported by the GKE. + +Most importantly for PayPal, the combination of Go development and the GKE allows the company to scale effortless to meet demand, as Kubernetes autoscaling will allow PayPal to handle increased user demand for services—keeping them available when it matters most, then scale back in the quiet periods to save money. + + +## Getting your enterprise started with Go + +PayPal’s story is not unique; dozens of other large enterprises are discovering how Go can help them ship reliable software faster. There are over one million developers using Go worldwide—spanning banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as [American Express](https://go.dev/solutions/americanexpress), [Mercado Libre](https://go.dev/solutions/mercadolibre), Capital One, Dropbox, IBM, Monzo, New York Times, Salesforce, Square, Target, Twitch, Uber, and of course Google. + +To learn more about how Go can help your enterprise build reliable, scalable software as it does at PayPal, visit [go.dev](https://go.dev) today. diff --git a/go.dev/_content/solutions/paypal/index.md b/go.dev/_content/solutions/paypal/index.md deleted file mode 100644 index 96803316..00000000 --- a/go.dev/_content/solutions/paypal/index.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: PayPal Taps Go to Modernize and Scale -date: 2020-06-01 -layout: solution -company: PayPal -logoSrc: paypal.svg -heroImgSrc: go_paypal_case_study_logo.png -carouselImgSrc: go_paypal_case_study.png -series: Case Studies -quote: Go’s value in producing clean, efficient code that readily scales as software deployment scales made the language a strong fit to support PayPal’s goals. ---- - -{{pullquote ` - author: Bala Natarajan - title: Sr. Director of Engineering, Developer Experience - company: PayPal - quote: | - Since our NoSQL and DB proxy used quite a bit of system details in a multi-threaded mode, the code got complex managing the different conditions, given that Go provides channels and routines to deal with complexity, we were able to structure the code to meet our requirements. -`}} - -## New code infrastructure built on Go - -PayPal was created to democratize financial services and empower people and businesses to join and thrive in the global economy. Central to this effort is PayPal’s Payments Platform, which uses a combination of proprietary and third-party technologies to efficiently and securely facilitate transactions between millions of merchants and consumers worldwide. As the Payments Platform grew larger and more complicated, PayPal sought to modernize its systems and reduce time-to-market for new applications. - -Go’s value in producing clean, efficient code that readily scales as software deployment scales made the language a strong fit to support PayPal’s goals. - -Central to the Payment Processing Platform is a proprietary NoSQL database that PayPal had developed in C++. The complexity of the code, however, was substantially decreasing its developers’ ability to evolve the platform. Go’s simple code layouts, goroutines (lightweight threads of execution) and channels (which serve as the pipes that connect concurrent goroutines), made Go a natural choice for the NoSQL development team to simplify and modernize the platform. - -As a proof of concept, a development team spent six months learning Go and reimplementing the NoSQL system from the ground up in Go, during which they also provided insights on how Go could be implemented more broadly at PayPal. As of today, thirty percent of the clusters have been migrated to use the new NoSQL database. - - -## Using Go to simplify for scale - -As PayPal’s platform becomes more intricate, Go provides a way to readily simplify the complexity of creating and running software at scale. The language provides PayPal with great libraries and fast tools, plus concurrency, garbage collection, and type safety. - -With Go, PayPal enables its developers to spend more time looking at code and thinking strategically, by freeing them from the noise of C++ and Java development. - -After the success of this newly re-written NoSQL system, more platform and content teams within PayPal began adopting Go. Natarajan’s current team is responsible for PayPal’s build, test, and release pipelines—all built in Go. The company has a large build and test farm which is completely managed using Go infrastructure to support builds-as-a-service (and tests-as-a-service) for developers across the company. - - Go gopher factory - -## Modernizing PayPal systems with Go - -With the distributed computing capabilities required by PayPal, Go was the right language to refresh their systems. PayPal needed programming that is concurrent and parallel, compiled for high performance and highly portable, and that brings developers the benefits of a modular, composable open-source architecture—Go has delivered all that and more to help PayPal modernize its systems. - -Security and supportability are key matters at PayPal, and the company’s operational pipelines are increasingly dominated by Go because the language’s cleanliness and modularity help them achieve these goals. PayPal’s deployment of Go engenders a platform of creativity for developers, allowing them to produce simple, efficient, and reliable software at scale for PayPal’s worldwide markets. - -As PayPal continues to modernize their software-defined networking (SDN) infrastructure with Go, they are seeing performance benefits in addition to more maintainable code. For example, Go now powers routers, load balances, and an increasing number of production systems. - -{{backgroundquote ` - author: Bala Natarajan - title: Sr. Director of Engineering - quote: | - In our tightly managed environments where we run Go code, we have seen a CPU reduction of approximately ten percent with cleaner and maintainable code. -`}} - -## Go increases developer productivity - -As a global operation, PayPal needs its development teams to be effective at managing two kinds of scale: production scale, especially concurrent systems interacting with many other servers (such as cloud services); and development scale, especially large codebases developed by many programmers in coordination (such as open-source development) - -PayPal leverages Go to address these issues of scale. The company’s developers benefit from Go’s ability to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. As PayPal modernizes its system, support for networked and multicore computing is critical. Go not only delivers such support but delivers quickly—it takes at most a few seconds to compile a large executable on a single computer. - -There are currently over 100 Go developers at PayPal, and future developers who choose to adopt Go will have an easier time getting the language approved thanks to the many successful implementations already in production at the company. - -Most importantly, PayPal developers have increased their productivity with Go. Go’s concurrency mechanisms have made it easy to write programs that get the most out of PayPal’s multicore and networked machines. Developers using Go also benefit from the fact that it compiles quickly to machine code and their apps gain the convenience of garbage collection and the power of run-time reflection. - -## Speeding PayPal’s time to market - -The first-class languages at PayPal today are Java and Node, with Go primarily used as an infrastructure language. While Go may never replace Node.js for certain applications, Natarajan is pushing to make Go a first-class language at PayPal. - -Through his efforts, PayPal is also evaluating moving to the Google Kubernetes Engine (GKE) to speed their new products’ time-to-market. The GKE is a managed, production-ready environment for deploying containerized applications, and brings Google's latest innovations in developer productivity, automated operations, and open source flexibility. - -For PayPal, deploying to GKE would enable rapid development and iteration by making it easier for PayPal to deploy, update, and manage its applications and services. Plus PayPal will find it easier to run Machine Learning, General Purpose GPU, High-Performance Computing, and other workloads that benefit from specialized hardware accelerators supported by the GKE. - -Most importantly for PayPal, the combination of Go development and the GKE allows the company to scale effortless to meet demand, as Kubernetes autoscaling will allow PayPal to handle increased user demand for services—keeping them available when it matters most, then scale back in the quiet periods to save money. - - -## Getting your enterprise started with Go - -PayPal’s story is not unique; dozens of other large enterprises are discovering how Go can help them ship reliable software faster. There are over one million developers using Go worldwide—spanning banking and commerce, gaming and media, technology, and other industries, at enterprises as diverse as [American Express](https://go.dev/solutions/americanexpress), [Mercado Libre](https://go.dev/solutions/mercadolibre), Capital One, Dropbox, IBM, Monzo, New York Times, Salesforce, Square, Target, Twitch, Uber, and of course Google. - -To learn more about how Go can help your enterprise build reliable, scalable software as it does at PayPal, visit [go.dev](https://go.dev) today. diff --git a/go.dev/_content/solutions/paypal/logo.svg b/go.dev/_content/solutions/paypal/logo.svg deleted file mode 100644 index 2923b9f5..00000000 --- a/go.dev/_content/solutions/paypal/logo.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/go.dev/_content/solutions/riotgames.md b/go.dev/_content/solutions/riotgames.md new file mode 100644 index 00000000..c595fd22 --- /dev/null +++ b/go.dev/_content/solutions/riotgames.md @@ -0,0 +1,10 @@ +--- +linkTitle: "Riot Games - Leveraging Golang for Game Development and Operations" +description: "Learn how Riot uses Go to develop, deploy, and operate backend microserves at scale–globally. They share thier experience across use cases, with specific examples, and speak to the value of the gopher community." +layout: solution +company: Riot Games +logoSrc: riotgames.png +series: Case Studies +link: https://technology.riotgames.com/news/leveraging-golang-game-development-and-operations +inLandingPageGrid: true +--- \ No newline at end of file diff --git a/go.dev/_content/solutions/riotgames/index.md b/go.dev/_content/solutions/riotgames/index.md deleted file mode 100644 index c595fd22..00000000 --- a/go.dev/_content/solutions/riotgames/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -linkTitle: "Riot Games - Leveraging Golang for Game Development and Operations" -description: "Learn how Riot uses Go to develop, deploy, and operate backend microserves at scale–globally. They share thier experience across use cases, with specific examples, and speak to the value of the gopher community." -layout: solution -company: Riot Games -logoSrc: riotgames.png -series: Case Studies -link: https://technology.riotgames.com/news/leveraging-golang-game-development-and-operations -inLandingPageGrid: true ---- \ No newline at end of file diff --git a/go.dev/_content/solutions/riotgames/riotgames.png b/go.dev/_content/solutions/riotgames/riotgames.png deleted file mode 100644 index facb585f..00000000 Binary files a/go.dev/_content/solutions/riotgames/riotgames.png and /dev/null differ diff --git a/go.dev/_content/solutions/salesforce.md b/go.dev/_content/solutions/salesforce.md new file mode 100644 index 00000000..5dbfe051 --- /dev/null +++ b/go.dev/_content/solutions/salesforce.md @@ -0,0 +1,10 @@ +--- +linkTitle: "Salesforce - From Python/C to Go" +description: "One of the big advantages is that Go's cross-platform features make porting code easy." +layout: solution +company: Salesforce +logoSrc: salesforce.svg +series: Case Studies +link: https://www.zdnet.com/article/salesforce-why-we-ditched-python-for-googles-go-language-in-einstein-analytics/ +inLandingPageGrid: true +--- diff --git a/go.dev/_content/solutions/salesforce/index.md b/go.dev/_content/solutions/salesforce/index.md deleted file mode 100644 index 5dbfe051..00000000 --- a/go.dev/_content/solutions/salesforce/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -linkTitle: "Salesforce - From Python/C to Go" -description: "One of the big advantages is that Go's cross-platform features make porting code easy." -layout: solution -company: Salesforce -logoSrc: salesforce.svg -series: Case Studies -link: https://www.zdnet.com/article/salesforce-why-we-ditched-python-for-googles-go-language-in-einstein-analytics/ -inLandingPageGrid: true ---- diff --git a/go.dev/_content/solutions/salesforce/logo.svg b/go.dev/_content/solutions/salesforce/logo.svg deleted file mode 100755 index e82db677..00000000 --- a/go.dev/_content/solutions/salesforce/logo.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/_content/solutions/target.md b/go.dev/_content/solutions/target.md new file mode 100644 index 00000000..3b7d54dd --- /dev/null +++ b/go.dev/_content/solutions/target.md @@ -0,0 +1,10 @@ +--- +linkTitle: "Target - Recommending Go" +layout: solution +company: Target +logoSrc: target.svg +series: Case Studies +link: https://tech.target.com/infrastructure/2018/06/18/Recommending-GoLang-at-Target.html +description: "We loved the simplified syntax, strong standard library, great external community, and well-built and maintained libraries. We loved the fast compile times and incredibly small images we could build when deploying containers. As we continue to grow and scale our technical solutions to our guests, we find the concurrency primitives in Go particularly useful." +inLandingPageGrid: true +--- diff --git a/go.dev/_content/solutions/target/index.md b/go.dev/_content/solutions/target/index.md deleted file mode 100644 index 3b7d54dd..00000000 --- a/go.dev/_content/solutions/target/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -linkTitle: "Target - Recommending Go" -layout: solution -company: Target -logoSrc: target.svg -series: Case Studies -link: https://tech.target.com/infrastructure/2018/06/18/Recommending-GoLang-at-Target.html -description: "We loved the simplified syntax, strong standard library, great external community, and well-built and maintained libraries. We loved the fast compile times and incredibly small images we could build when deploying containers. As we continue to grow and scale our technical solutions to our guests, we find the concurrency primitives in Go particularly useful." -inLandingPageGrid: true ---- diff --git a/go.dev/_content/solutions/target/logo.svg b/go.dev/_content/solutions/target/logo.svg deleted file mode 100644 index 98868c57..00000000 --- a/go.dev/_content/solutions/target/logo.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/go.dev/_content/solutions/twitch.md b/go.dev/_content/solutions/twitch.md new file mode 100644 index 00000000..40b34db2 --- /dev/null +++ b/go.dev/_content/solutions/twitch.md @@ -0,0 +1,10 @@ +--- +linkTitle: "Twitch - Go’s march to low latency GC" +description: "We use Go at Twitch for many of our busiest systems. Its simplicity, safety, performance, and readability make it a good tool for the problems we encounter with serving live video and chat to our millions of users." +layout: solution +company: Twitch +logoSrc: twitch.svg +series: Case Studies +link: https://blog.twitch.tv/en/2016/07/05/gos-march-to-low-latency-gc-a6fa96f06eb7/ +inLandingPageGrid: true +--- diff --git a/go.dev/_content/solutions/twitch/index.md b/go.dev/_content/solutions/twitch/index.md deleted file mode 100644 index 40b34db2..00000000 --- a/go.dev/_content/solutions/twitch/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -linkTitle: "Twitch - Go’s march to low latency GC" -description: "We use Go at Twitch for many of our busiest systems. Its simplicity, safety, performance, and readability make it a good tool for the problems we encounter with serving live video and chat to our millions of users." -layout: solution -company: Twitch -logoSrc: twitch.svg -series: Case Studies -link: https://blog.twitch.tv/en/2016/07/05/gos-march-to-low-latency-gc-a6fa96f06eb7/ -inLandingPageGrid: true ---- diff --git a/go.dev/_content/solutions/twitch/logo.svg b/go.dev/_content/solutions/twitch/logo.svg deleted file mode 100644 index 6afd8113..00000000 --- a/go.dev/_content/solutions/twitch/logo.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - diff --git a/go.dev/_content/solutions/twitter.md b/go.dev/_content/solutions/twitter.md new file mode 100644 index 00000000..6e0cd1e7 --- /dev/null +++ b/go.dev/_content/solutions/twitter.md @@ -0,0 +1,10 @@ +--- +title: "Twitter - 5 billion sessions a day in realtime" +description: "We now see about five billion sessions per day, and growing. Hundreds of millions of devices send millions of events every second to the Answers endpoint. During the time that it took you to read to here, the Answers back-end will have received and processed about 10,000,000 analytics events." +layout: solution +company: Twitter +logoSrc: twitter.svg +series: Case Studies +link: https://blog.twitter.com/engineering/en_us/a/2015/handling-five-billion-sessions-a-day-in-real-time.html +inLandingPageGrid: true +--- diff --git a/go.dev/_content/solutions/twitter/index.md b/go.dev/_content/solutions/twitter/index.md deleted file mode 100644 index 6e0cd1e7..00000000 --- a/go.dev/_content/solutions/twitter/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "Twitter - 5 billion sessions a day in realtime" -description: "We now see about five billion sessions per day, and growing. Hundreds of millions of devices send millions of events every second to the Answers endpoint. During the time that it took you to read to here, the Answers back-end will have received and processed about 10,000,000 analytics events." -layout: solution -company: Twitter -logoSrc: twitter.svg -series: Case Studies -link: https://blog.twitter.com/engineering/en_us/a/2015/handling-five-billion-sessions-a-day-in-real-time.html -inLandingPageGrid: true ---- diff --git a/go.dev/_content/solutions/twitter/logo.svg b/go.dev/_content/solutions/twitter/logo.svg deleted file mode 100755 index 2832e7b5..00000000 --- a/go.dev/_content/solutions/twitter/logo.svg +++ /dev/null @@ -1 +0,0 @@ -Twitter_Logo_Blue \ No newline at end of file diff --git a/go.dev/_content/solutions/uber.md b/go.dev/_content/solutions/uber.md new file mode 100644 index 00000000..50485fd2 --- /dev/null +++ b/go.dev/_content/solutions/uber.md @@ -0,0 +1,10 @@ +--- +title: "Uber - GPU-power analytics engine in Go" +description: "AresDB [,written in Go,] is widely used at Uber to power our real-time data analytics dashboards, enabling us to make data-driven decisions at scale about myriad aspects of our business." +layout: solution +company: Uber +logoSrc: uber.svg +series: Case Studies +link: https://eng.uber.com/aresdb/ +inLandingPageGrid: true +--- diff --git a/go.dev/_content/solutions/uber/index.md b/go.dev/_content/solutions/uber/index.md deleted file mode 100644 index 50485fd2..00000000 --- a/go.dev/_content/solutions/uber/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "Uber - GPU-power analytics engine in Go" -description: "AresDB [,written in Go,] is widely used at Uber to power our real-time data analytics dashboards, enabling us to make data-driven decisions at scale about myriad aspects of our business." -layout: solution -company: Uber -logoSrc: uber.svg -series: Case Studies -link: https://eng.uber.com/aresdb/ -inLandingPageGrid: true ---- diff --git a/go.dev/_content/solutions/uber/logo.svg b/go.dev/_content/solutions/uber/logo.svg deleted file mode 100644 index 7950b0b8..00000000 --- a/go.dev/_content/solutions/uber/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/go.dev/_content/solutions/webdev-green.svg b/go.dev/_content/solutions/webdev-green.svg new file mode 100644 index 00000000..b4e73efc --- /dev/null +++ b/go.dev/_content/solutions/webdev-green.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/_content/solutions/webdev-white.svg b/go.dev/_content/solutions/webdev-white.svg new file mode 100644 index 00000000..370f57e8 --- /dev/null +++ b/go.dev/_content/solutions/webdev-white.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/_content/solutions/webdev.md b/go.dev/_content/solutions/webdev.md new file mode 100644 index 00000000..c2bf0d2d --- /dev/null +++ b/go.dev/_content/solutions/webdev.md @@ -0,0 +1,211 @@ +--- +title: "Go for Web Development" +linkTitle: "Web Development" +description: "With enhanced memory performance and support for several IDEs, Go powers fast and scalable web applications." +date: 2019-10-04T15:26:31-04:00 +layout: solution +series: Use Cases +books: +icon: + file: webdev-green.svg + alt: web dev icon +icon-white: + file: webdev-white.svg + alt: web dev icon +--- + +## Overview {#overview .sectionHeading} + +### Go delivers speed, security, and developer-friendly tools for Web Applications + +Go is designed to enable developers to rapidly develop scalable and secure web applications. Go ships with an easy to use, secure and performant web server and includes it own web templating library. Go has excellent support for all of the latest technologies from [HTTP/2](https://pkg.go.dev/net/http), to databases like [MySQL](https://pkg.go.dev/mod/github.com/go-sql-driver/mysql), [MongoDB](https://pkg.go.dev/mod/go.mongodb.org/mongo-driver) and [ElasticSearch](https://pkg.go.dev/mod/github.com/elastic/go-elasticsearch/v7), to the latest encryption standards including [TLS 1.3](https://pkg.go.dev/crypto/tls). Go web applications run natively on [Google App Engine](https://cloud.google.com/appengine/) and [Google Cloud Run](https://cloud.google.com/run/) (for easy scaling) or on any environment, cloud, or operating system thanks to Go’s extreme portability. + +## Key Benefits {#key-benefits .sectionHeading} + +### Deploy across platforms in record speed + +For enterprises, Go is preferred for providing rapid cross-platform deployment. With its goroutines, native compilation, and the URI-based package namespacing, Go code compiles to a single, small binary—with zero dependencies—making it very fast. + +### Leverage Go’s out-of-the-box performance to scale with ease + +Tigran Bayburtsyan, Co-Founder and CTO at Hexact Inc., summarizes five key reasons his company switched to Go: + +- **Compiles into a single binary** — “Using static linking, Go actually combining all dependency libraries and modules into one single binary file based on OS type and architecture.” + +- **Static type system** — “Type system is really important for large scale applications.” + +- **Performance** — “Go performed better because of its concurrency model and CPU scalability. Whenever we need to process some internal request, we are doing it with separate Goroutines which are 10x cheaper in resources than Python Threads.” + +- **No need for a web framework** — “In most of the cases you really don’t need any third-party library.” + +- **Great IDE support and debugging** — “After rewriting all projects to Go, we got 64 percent less code than we had earlier.” + + +{{projects ` + - company: Caddy + url: https://caddyserver.com/ + logoSrc: caddy.svg + desc: Caddy 2 is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go. Caddy offers greater memory safety than servers written in C. A hardened TLS stack powered by the Go standard library serves a significant portion of all Internet traffic. + ctas: + - text: Caddy 2 + url: https://caddyserver.com/ + - company: Cloudflare + url: https://www.cloudflare.com/en-gb/ + logoSrc: cloudflare-icon.svg + desc: Cloudflare speeds up and protects millions of websites, APIs, SaaS services, and other properties connected to the Internet. “Go is at the heart of CloudFlare’s services including handling compression for high-latency HTTP connections, our entire DNS infrastructure, SSL, load testing and more.” + ctas: + - text: Cloudflare and Go + url: https://blog.cloudflare.com/what-weve-been-doing-with-go/ + - company: gov.uk + url: https://gov.uk/ + logoSrc: govuk.svg + desc: The simplicity and safety of the Go language were a good fit for the United Kingdom’s government’s HTTP infrastructure, and some brief experiments with the excellent net/http package convinced web developers they were on the right track. “In particular, Go’s concurrency model makes it absurdly easy to build performant I/O-bound applications.” + ctas: + - text: Building a new router for gov.uk + url: https://technology.blog.gov.uk/2013/12/05/building-a-new-router-for-gov-uk/ + - text: Using Go in government + url: https://technology.blog.gov.uk/2013/12/05/building-a-new-router-for-gov-uk/ + - company: Hugo + url: http://gohugo.io/ + logoSrc: hugo.svg + desc: Hugo is a fast and modern website engine written in Go, and designed to make website creation fun again. Websites built with Hugo are extremely fast and secure and can be hosted anywhere without any dependencies. + ctas: + - text: Hugo + url: http://gohugo.io/ + - company: Mattermost + url: https://mattermost.com/ + logoSrc: mattermost.png + desc: Mattermost is a flexible, open source messaging platform that enables secure team collaboration. It’s written in Go and React. + ctas: + - text: Mattermost + url: https://mattermost.com/ + - company: Medium + url: https://medium.org/ + logoSrc: medium.svg + desc: Medium uses Go to power their social graph, their image server and several auxiliary services. “We’ve found Go very easy to build, package, and deploy. We like the type-safety without the verbosity and JVM tuning of Java.” + ctas: + - text: Medium's Go Services + url: https://medium.engineering/how-medium-goes-social-b7dbefa6d413 + - company: The Economist + url: https://economist.com/ + logoSrc: economist.svg + desc: The Economist needed more flexibility to deliver content to increasingly diverse digital channels. Services written in Go were a key component of the new system that would enable The Economist to deliver scalable, high performing services and quickly iterate new products. “Overall, it was determined that Go was the language best designed for usability and efficiency in a distributed, cloud-based system.” + ctas: + - text: The Economist's Go microservices + url: https://www.infoq.com/articles/golang-the-economist/ +`}} + +## Get Started {#get-started .sectionHeading} + +### Go books on web development + +{{books ` + - title: Web Development with Go + url: https://www.amazon.com/Web-Development-Go-Building-Scalable-ebook/dp/B01JCOC6Z6 + thumbnail: /images/books/web-development-with-go.jpg + - title: Go Web Programming + url: https://www.amazon.com/Web-Programming-Sau-Sheong-Chang/dp/1617292567 + thumbnail: /images/books/go-web-programming.jpg + - title: "Web Development Cookbook: Build full-stack web applications with Go" + url: https://www.amazon.com/Web-Development-Cookbook-full-stack-applications-ebook/dp/B077TVQ28W + thumbnail: /images/books/go-web-development-cookbook.jpg + - title: Building RESTful Web services with Go + url: https://www.amazon.com/Building-RESTful-Web-services-gracefully-ebook/dp/B072QB8KL1 + thumbnail: /images/books/building-restful-web-services-with-go.jpg + - title: Mastering Go Web Services + url: https://www.amazon.com/Mastering-Web-Services-Nathan-Kozyra-ebook/dp/B00W5GUKL6 + thumbnail: /images/books/mastering-go-web-services.jpg +`}} + +{{libraries ` + - title: Web frameworks + viewMoreUrl: https://pkg.go.dev/search?q=web+framework + items: + - text: Buffalo + url: https://gobuffalo.io/en/ + desc: A framework for rapid web development in Go, curating Go and JS libraries together. + - text: Echo + url: https://echo.labstack.com/ + desc: A high performance, extensible, and minimalist Go web framework + - text: Flamingo + url: https://www.flamingo.me/ + desc: A fast open-source framework based on Go with clean and scalable architecture + - text: Gin + url: https://gin-gonic.com/ + desc: A web framework written in Go, with a martini-like API. + - text: Gorilla + url: http://www.gorillatoolkit.org/ + desc: A web toolkit for the Go programming language. + - title: Routers + viewMoreUrl: https://pkg.go.dev/search?q=http%20router + items: + - text: julienschmidt/httprouter + url: https://pkg.go.dev/github.com/julienschmidt/httprouter?tab=overview + desc: A lightweight high performance HTTP request router + - text: gorilla/mux + url: https://pkg.go.dev/github.com/gorilla/mux?tab=overview + desc: A powerful HTTP router and URL matcher for building Go web servers with 🦍 + - text: Chi + url: https://pkg.go.dev/github.com/go-chi/chi?tab=overview + desc: A lightweight, idiomatic and composable router for building Go HTTP services. + - text: net/http + url: https://pkg.go.dev/net/http + desc: A standard library HTTP package + - title: Template Engines + viewMoreUrl: https://pkg.go.dev/search?q=templates + items: + - text: html/template + url: https://pkg.go.dev/html/template + desc: A standard library HTML template engine + - text: flosch/pongo2 + url: https://pkg.go.dev/github.com/flosch/pongo2?tab=overview + desc: A Django-syntax like templating-language + - title: Databases & Drivers + viewMoreUrl: https://pkg.go.dev/search?q=database%20OR%20sql + items: + - text: database/sql + url: https://pkg.go.dev/database/sql + desc: A standard library interface with driver support for MySQL, Postgres, Oracle, MS SQL, BigQuery and most SQL databases + - text: mongo-driver/mongo + url: https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo?tab=overview + desc: The MongoDB supported driver for Go + - text: olivere/elastic + url: https://pkg.go.dev/github.com/olivere/elastic?tab=overview + desc: A Elasticsearch client for Go + - text: GORM + url: https://gorm.io/ + desc: An ORM library for Go + - text: Bleve + url: http://blevesearch.com/ + desc: Full-text search and indexing for Go + - text: CockroachDB + url: https://www.cockroachlabs.com/ + desc: An evolution of the database—architected for the cloud to deliver resilient, consistent, distributed SQL at scale + - title: Web Libraries + viewMoreUrl: https://pkg.go.dev/search?q=web + items: + - text: markbates/goth + url: https://pkg.go.dev/github.com/markbates/goth?tab=overview + desc: Authentication for web apps + - text: jinzhu/gorm + url: https://pkg.go.dev/github.com/jinzhu/gorm?tab=overview + desc: An ORM library for Go + - text: dgrijalva/jwt-go + url: https://pkg.go.dev/github.com/dgrijalva/jwt-go?tab=overview + desc: A Go implementation of json web tokens + - title: Other Projects + items: + - text: gopherjs + url: https://pkg.go.dev/github.com/gopherjs/gopherjs?tab=overview + desc: A compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers. +`}} + +### Courses +* [Learn to Create Web Applications using Go](https://www.usegolang.com), a paid online course + +### Projects +* {{pkg "github.com/gopherjs/gopherjs" "gopherjs"}}, a compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers. +* [Hugo](https://gohugo.io/), The world’s fastest framework for building websites +* [Mattermost](https://mattermost.com/), a flexible, open source messaging platform +that enables secure team collaboration +* [Caddy](https://caddyserver.com/), a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go diff --git a/go.dev/_content/solutions/webdev/index.md b/go.dev/_content/solutions/webdev/index.md deleted file mode 100644 index c2bf0d2d..00000000 --- a/go.dev/_content/solutions/webdev/index.md +++ /dev/null @@ -1,211 +0,0 @@ ---- -title: "Go for Web Development" -linkTitle: "Web Development" -description: "With enhanced memory performance and support for several IDEs, Go powers fast and scalable web applications." -date: 2019-10-04T15:26:31-04:00 -layout: solution -series: Use Cases -books: -icon: - file: webdev-green.svg - alt: web dev icon -icon-white: - file: webdev-white.svg - alt: web dev icon ---- - -## Overview {#overview .sectionHeading} - -### Go delivers speed, security, and developer-friendly tools for Web Applications - -Go is designed to enable developers to rapidly develop scalable and secure web applications. Go ships with an easy to use, secure and performant web server and includes it own web templating library. Go has excellent support for all of the latest technologies from [HTTP/2](https://pkg.go.dev/net/http), to databases like [MySQL](https://pkg.go.dev/mod/github.com/go-sql-driver/mysql), [MongoDB](https://pkg.go.dev/mod/go.mongodb.org/mongo-driver) and [ElasticSearch](https://pkg.go.dev/mod/github.com/elastic/go-elasticsearch/v7), to the latest encryption standards including [TLS 1.3](https://pkg.go.dev/crypto/tls). Go web applications run natively on [Google App Engine](https://cloud.google.com/appengine/) and [Google Cloud Run](https://cloud.google.com/run/) (for easy scaling) or on any environment, cloud, or operating system thanks to Go’s extreme portability. - -## Key Benefits {#key-benefits .sectionHeading} - -### Deploy across platforms in record speed - -For enterprises, Go is preferred for providing rapid cross-platform deployment. With its goroutines, native compilation, and the URI-based package namespacing, Go code compiles to a single, small binary—with zero dependencies—making it very fast. - -### Leverage Go’s out-of-the-box performance to scale with ease - -Tigran Bayburtsyan, Co-Founder and CTO at Hexact Inc., summarizes five key reasons his company switched to Go: - -- **Compiles into a single binary** — “Using static linking, Go actually combining all dependency libraries and modules into one single binary file based on OS type and architecture.” - -- **Static type system** — “Type system is really important for large scale applications.” - -- **Performance** — “Go performed better because of its concurrency model and CPU scalability. Whenever we need to process some internal request, we are doing it with separate Goroutines which are 10x cheaper in resources than Python Threads.” - -- **No need for a web framework** — “In most of the cases you really don’t need any third-party library.” - -- **Great IDE support and debugging** — “After rewriting all projects to Go, we got 64 percent less code than we had earlier.” - - -{{projects ` - - company: Caddy - url: https://caddyserver.com/ - logoSrc: caddy.svg - desc: Caddy 2 is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go. Caddy offers greater memory safety than servers written in C. A hardened TLS stack powered by the Go standard library serves a significant portion of all Internet traffic. - ctas: - - text: Caddy 2 - url: https://caddyserver.com/ - - company: Cloudflare - url: https://www.cloudflare.com/en-gb/ - logoSrc: cloudflare-icon.svg - desc: Cloudflare speeds up and protects millions of websites, APIs, SaaS services, and other properties connected to the Internet. “Go is at the heart of CloudFlare’s services including handling compression for high-latency HTTP connections, our entire DNS infrastructure, SSL, load testing and more.” - ctas: - - text: Cloudflare and Go - url: https://blog.cloudflare.com/what-weve-been-doing-with-go/ - - company: gov.uk - url: https://gov.uk/ - logoSrc: govuk.svg - desc: The simplicity and safety of the Go language were a good fit for the United Kingdom’s government’s HTTP infrastructure, and some brief experiments with the excellent net/http package convinced web developers they were on the right track. “In particular, Go’s concurrency model makes it absurdly easy to build performant I/O-bound applications.” - ctas: - - text: Building a new router for gov.uk - url: https://technology.blog.gov.uk/2013/12/05/building-a-new-router-for-gov-uk/ - - text: Using Go in government - url: https://technology.blog.gov.uk/2013/12/05/building-a-new-router-for-gov-uk/ - - company: Hugo - url: http://gohugo.io/ - logoSrc: hugo.svg - desc: Hugo is a fast and modern website engine written in Go, and designed to make website creation fun again. Websites built with Hugo are extremely fast and secure and can be hosted anywhere without any dependencies. - ctas: - - text: Hugo - url: http://gohugo.io/ - - company: Mattermost - url: https://mattermost.com/ - logoSrc: mattermost.png - desc: Mattermost is a flexible, open source messaging platform that enables secure team collaboration. It’s written in Go and React. - ctas: - - text: Mattermost - url: https://mattermost.com/ - - company: Medium - url: https://medium.org/ - logoSrc: medium.svg - desc: Medium uses Go to power their social graph, their image server and several auxiliary services. “We’ve found Go very easy to build, package, and deploy. We like the type-safety without the verbosity and JVM tuning of Java.” - ctas: - - text: Medium's Go Services - url: https://medium.engineering/how-medium-goes-social-b7dbefa6d413 - - company: The Economist - url: https://economist.com/ - logoSrc: economist.svg - desc: The Economist needed more flexibility to deliver content to increasingly diverse digital channels. Services written in Go were a key component of the new system that would enable The Economist to deliver scalable, high performing services and quickly iterate new products. “Overall, it was determined that Go was the language best designed for usability and efficiency in a distributed, cloud-based system.” - ctas: - - text: The Economist's Go microservices - url: https://www.infoq.com/articles/golang-the-economist/ -`}} - -## Get Started {#get-started .sectionHeading} - -### Go books on web development - -{{books ` - - title: Web Development with Go - url: https://www.amazon.com/Web-Development-Go-Building-Scalable-ebook/dp/B01JCOC6Z6 - thumbnail: /images/books/web-development-with-go.jpg - - title: Go Web Programming - url: https://www.amazon.com/Web-Programming-Sau-Sheong-Chang/dp/1617292567 - thumbnail: /images/books/go-web-programming.jpg - - title: "Web Development Cookbook: Build full-stack web applications with Go" - url: https://www.amazon.com/Web-Development-Cookbook-full-stack-applications-ebook/dp/B077TVQ28W - thumbnail: /images/books/go-web-development-cookbook.jpg - - title: Building RESTful Web services with Go - url: https://www.amazon.com/Building-RESTful-Web-services-gracefully-ebook/dp/B072QB8KL1 - thumbnail: /images/books/building-restful-web-services-with-go.jpg - - title: Mastering Go Web Services - url: https://www.amazon.com/Mastering-Web-Services-Nathan-Kozyra-ebook/dp/B00W5GUKL6 - thumbnail: /images/books/mastering-go-web-services.jpg -`}} - -{{libraries ` - - title: Web frameworks - viewMoreUrl: https://pkg.go.dev/search?q=web+framework - items: - - text: Buffalo - url: https://gobuffalo.io/en/ - desc: A framework for rapid web development in Go, curating Go and JS libraries together. - - text: Echo - url: https://echo.labstack.com/ - desc: A high performance, extensible, and minimalist Go web framework - - text: Flamingo - url: https://www.flamingo.me/ - desc: A fast open-source framework based on Go with clean and scalable architecture - - text: Gin - url: https://gin-gonic.com/ - desc: A web framework written in Go, with a martini-like API. - - text: Gorilla - url: http://www.gorillatoolkit.org/ - desc: A web toolkit for the Go programming language. - - title: Routers - viewMoreUrl: https://pkg.go.dev/search?q=http%20router - items: - - text: julienschmidt/httprouter - url: https://pkg.go.dev/github.com/julienschmidt/httprouter?tab=overview - desc: A lightweight high performance HTTP request router - - text: gorilla/mux - url: https://pkg.go.dev/github.com/gorilla/mux?tab=overview - desc: A powerful HTTP router and URL matcher for building Go web servers with 🦍 - - text: Chi - url: https://pkg.go.dev/github.com/go-chi/chi?tab=overview - desc: A lightweight, idiomatic and composable router for building Go HTTP services. - - text: net/http - url: https://pkg.go.dev/net/http - desc: A standard library HTTP package - - title: Template Engines - viewMoreUrl: https://pkg.go.dev/search?q=templates - items: - - text: html/template - url: https://pkg.go.dev/html/template - desc: A standard library HTML template engine - - text: flosch/pongo2 - url: https://pkg.go.dev/github.com/flosch/pongo2?tab=overview - desc: A Django-syntax like templating-language - - title: Databases & Drivers - viewMoreUrl: https://pkg.go.dev/search?q=database%20OR%20sql - items: - - text: database/sql - url: https://pkg.go.dev/database/sql - desc: A standard library interface with driver support for MySQL, Postgres, Oracle, MS SQL, BigQuery and most SQL databases - - text: mongo-driver/mongo - url: https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo?tab=overview - desc: The MongoDB supported driver for Go - - text: olivere/elastic - url: https://pkg.go.dev/github.com/olivere/elastic?tab=overview - desc: A Elasticsearch client for Go - - text: GORM - url: https://gorm.io/ - desc: An ORM library for Go - - text: Bleve - url: http://blevesearch.com/ - desc: Full-text search and indexing for Go - - text: CockroachDB - url: https://www.cockroachlabs.com/ - desc: An evolution of the database—architected for the cloud to deliver resilient, consistent, distributed SQL at scale - - title: Web Libraries - viewMoreUrl: https://pkg.go.dev/search?q=web - items: - - text: markbates/goth - url: https://pkg.go.dev/github.com/markbates/goth?tab=overview - desc: Authentication for web apps - - text: jinzhu/gorm - url: https://pkg.go.dev/github.com/jinzhu/gorm?tab=overview - desc: An ORM library for Go - - text: dgrijalva/jwt-go - url: https://pkg.go.dev/github.com/dgrijalva/jwt-go?tab=overview - desc: A Go implementation of json web tokens - - title: Other Projects - items: - - text: gopherjs - url: https://pkg.go.dev/github.com/gopherjs/gopherjs?tab=overview - desc: A compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers. -`}} - -### Courses -* [Learn to Create Web Applications using Go](https://www.usegolang.com), a paid online course - -### Projects -* {{pkg "github.com/gopherjs/gopherjs" "gopherjs"}}, a compiler from Go to JavaScript allowing developers to write front-end code in Go which will run in all browsers. -* [Hugo](https://gohugo.io/), The world’s fastest framework for building websites -* [Mattermost](https://mattermost.com/), a flexible, open source messaging platform -that enables secure team collaboration -* [Caddy](https://caddyserver.com/), a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go diff --git a/go.dev/_content/solutions/webdev/webdev-green.svg b/go.dev/_content/solutions/webdev/webdev-green.svg deleted file mode 100644 index b4e73efc..00000000 --- a/go.dev/_content/solutions/webdev/webdev-green.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/_content/solutions/webdev/webdev-white.svg b/go.dev/_content/solutions/webdev/webdev-white.svg deleted file mode 100644 index 370f57e8..00000000 --- a/go.dev/_content/solutions/webdev/webdev-white.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/_content/solutions/wildlifestudios.md b/go.dev/_content/solutions/wildlifestudios.md new file mode 100644 index 00000000..2f6b6176 --- /dev/null +++ b/go.dev/_content/solutions/wildlifestudios.md @@ -0,0 +1,15 @@ +--- +linkTitle: How Wildlife Studios builds backend systems in Go +description: Wildlife is a Brazilian native global company focused on mobile + gaming. We aim to develop games that will make billions of people happy. We + have almost 40 million daily active users, and we rely on Go as the main + language for our core platform, given its features to scale our backend + services. +logoSrc: wildlife.svg +layout: solution +company: Wildlife Studios +series: Case Studies +link: + https://medium.com/tech-at-wildlife-studios/pitaya-wildlifes-golang-go-af57865f7a11 +inLandingPageGrid: true +--- diff --git a/go.dev/_content/solutions/wildlifestudios/index.md b/go.dev/_content/solutions/wildlifestudios/index.md deleted file mode 100644 index 2f6b6176..00000000 --- a/go.dev/_content/solutions/wildlifestudios/index.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -linkTitle: How Wildlife Studios builds backend systems in Go -description: Wildlife is a Brazilian native global company focused on mobile - gaming. We aim to develop games that will make billions of people happy. We - have almost 40 million daily active users, and we rely on Go as the main - language for our core platform, given its features to scale our backend - services. -logoSrc: wildlife.svg -layout: solution -company: Wildlife Studios -series: Case Studies -link: - https://medium.com/tech-at-wildlife-studios/pitaya-wildlifes-golang-go-af57865f7a11 -inLandingPageGrid: true ---- diff --git a/go.dev/_content/solutions/wildlifestudios/logo.png b/go.dev/_content/solutions/wildlifestudios/logo.png deleted file mode 100644 index 8d1c43b8..00000000 Binary files a/go.dev/_content/solutions/wildlifestudios/logo.png and /dev/null differ diff --git a/go.dev/cmd/internal/site/page.go b/go.dev/cmd/internal/site/page.go index 6ce5b5bf..1caea40b 100644 --- a/go.dev/cmd/internal/site/page.go +++ b/go.dev/cmd/internal/site/page.go @@ -8,7 +8,6 @@ import ( "bytes" "fmt" "io/ioutil" - "os" "path" "strings" "time" @@ -48,43 +47,33 @@ type Page struct { // loadPage loads the site's page from the given file. // It returns the page but also adds the page to site.pages and site.pagesByID. func (site *Site) loadPage(file string) (*Page, error) { + var section string id := strings.TrimPrefix(file, "_content/") - if strings.HasSuffix(id, "/_index.md") { - id = strings.TrimSuffix(id, "/_index.md") + if id == "index.md" { + id = "" + section = "" } else if strings.HasSuffix(id, "/index.md") { id = strings.TrimSuffix(id, "/index.md") + section = id } else { id = strings.TrimSuffix(id, ".md") + section = path.Dir(id) + if section == "." { + section = "" + } } - if file == "_content/index.md" { - id = "" + parent := path.Dir(id) + if parent == "." { + parent = "" } p := site.newPage(id) p.file = file + p.section = section + p.parent = parent p.Params["Series"] = "" p.Params["series"] = "" - // Determine section. - for dir := path.Dir(file); dir != "."; dir = path.Dir(dir) { - if _, err := os.Stat(site.file(dir + "/_index.md")); err == nil { - p.section = strings.TrimPrefix(dir, "_content/") - break - } - } - - // Determine parent. - p.parent = p.section - if p.parent == p.id { - p.parent = "" - for dir := path.Dir("_content/" + p.id); dir != "."; dir = path.Dir(dir) { - if _, err := os.Stat(site.file(dir + "/_index.md")); err == nil { - p.parent = strings.TrimPrefix(dir, "_content/") - break - } - } - } - // Load content, including leading yaml. data, err := ioutil.ReadFile(site.file(file)) if err != nil { diff --git a/go.dev/testdata/golden/solutions/americanexpress/amex-logo.png b/go.dev/testdata/golden/solutions/americanexpress/amex-logo.png deleted file mode 100644 index 298ccf6e..00000000 Binary files a/go.dev/testdata/golden/solutions/americanexpress/amex-logo.png and /dev/null differ diff --git a/go.dev/testdata/golden/solutions/capital-one/logo.svg b/go.dev/testdata/golden/solutions/capital-one/logo.svg deleted file mode 100644 index 5c3fdda2..00000000 --- a/go.dev/testdata/golden/solutions/capital-one/logo.svg +++ /dev/null @@ -1,2 +0,0 @@ - -image/svg+xml diff --git a/go.dev/testdata/golden/solutions/clis-green.svg b/go.dev/testdata/golden/solutions/clis-green.svg new file mode 100644 index 00000000..01fed5b7 --- /dev/null +++ b/go.dev/testdata/golden/solutions/clis-green.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/clis-white.svg b/go.dev/testdata/golden/solutions/clis-white.svg new file mode 100644 index 00000000..a08127d7 --- /dev/null +++ b/go.dev/testdata/golden/solutions/clis-white.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/clis/CLI-green.svg b/go.dev/testdata/golden/solutions/clis/CLI-green.svg deleted file mode 100644 index 01fed5b7..00000000 --- a/go.dev/testdata/golden/solutions/clis/CLI-green.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/clis/cli-white.svg b/go.dev/testdata/golden/solutions/clis/cli-white.svg deleted file mode 100644 index a08127d7..00000000 --- a/go.dev/testdata/golden/solutions/clis/cli-white.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/cloud-green.svg b/go.dev/testdata/golden/solutions/cloud-green.svg new file mode 100644 index 00000000..b143a1db --- /dev/null +++ b/go.dev/testdata/golden/solutions/cloud-green.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/cloud-white.svg b/go.dev/testdata/golden/solutions/cloud-white.svg new file mode 100644 index 00000000..6dfc4f27 --- /dev/null +++ b/go.dev/testdata/golden/solutions/cloud-white.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/cloud/cloud-green.svg b/go.dev/testdata/golden/solutions/cloud/cloud-green.svg deleted file mode 100644 index b143a1db..00000000 --- a/go.dev/testdata/golden/solutions/cloud/cloud-green.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/cloud/cloud-white.svg b/go.dev/testdata/golden/solutions/cloud/cloud-white.svg deleted file mode 100644 index 6dfc4f27..00000000 --- a/go.dev/testdata/golden/solutions/cloud/cloud-white.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/cloudflare/logo.png b/go.dev/testdata/golden/solutions/cloudflare/logo.png deleted file mode 100644 index 90388fca..00000000 Binary files a/go.dev/testdata/golden/solutions/cloudflare/logo.png and /dev/null differ diff --git a/go.dev/testdata/golden/solutions/cockroachlabs/logo.png b/go.dev/testdata/golden/solutions/cockroachlabs/logo.png deleted file mode 100644 index 98ec96aa..00000000 Binary files a/go.dev/testdata/golden/solutions/cockroachlabs/logo.png and /dev/null differ diff --git a/go.dev/testdata/golden/solutions/curve/logo.png b/go.dev/testdata/golden/solutions/curve/logo.png deleted file mode 100644 index 194f220d..00000000 Binary files a/go.dev/testdata/golden/solutions/curve/logo.png and /dev/null differ diff --git a/go.dev/testdata/golden/solutions/devops-green.svg b/go.dev/testdata/golden/solutions/devops-green.svg new file mode 100644 index 00000000..d84348eb --- /dev/null +++ b/go.dev/testdata/golden/solutions/devops-green.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/devops-white.svg b/go.dev/testdata/golden/solutions/devops-white.svg new file mode 100644 index 00000000..c98d8737 --- /dev/null +++ b/go.dev/testdata/golden/solutions/devops-white.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/devops/ops-green.svg b/go.dev/testdata/golden/solutions/devops/ops-green.svg deleted file mode 100644 index d84348eb..00000000 --- a/go.dev/testdata/golden/solutions/devops/ops-green.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/devops/ops-white.svg b/go.dev/testdata/golden/solutions/devops/ops-white.svg deleted file mode 100644 index c98d8737..00000000 --- a/go.dev/testdata/golden/solutions/devops/ops-white.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/dropbox/logo.svg b/go.dev/testdata/golden/solutions/dropbox/logo.svg deleted file mode 100644 index f129a229..00000000 --- a/go.dev/testdata/golden/solutions/dropbox/logo.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/go.dev/testdata/golden/solutions/grail/logo.png b/go.dev/testdata/golden/solutions/grail/logo.png deleted file mode 100644 index 2dd9c59e..00000000 Binary files a/go.dev/testdata/golden/solutions/grail/logo.png and /dev/null differ diff --git a/go.dev/testdata/golden/solutions/index.html b/go.dev/testdata/golden/solutions/index.html index afd2b4df..5b938abc 100644 --- a/go.dev/testdata/golden/solutions/index.html +++ b/go.dev/testdata/golden/solutions/index.html @@ -869,7 +869,7 @@ cloud icon
    @@ -892,7 +892,7 @@ CLI icon
    @@ -915,7 +915,7 @@ web dev icon
    @@ -938,7 +938,7 @@ ops icon diff --git a/go.dev/testdata/golden/solutions/mercadolibre/logo.svg b/go.dev/testdata/golden/solutions/mercadolibre/logo.svg deleted file mode 100644 index 3fccb14c..00000000 --- a/go.dev/testdata/golden/solutions/mercadolibre/logo.svg +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/go.dev/testdata/golden/solutions/netflix/logo.svg b/go.dev/testdata/golden/solutions/netflix/logo.svg deleted file mode 100644 index 0ce1bf48..00000000 --- a/go.dev/testdata/golden/solutions/netflix/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/paypal/logo.svg b/go.dev/testdata/golden/solutions/paypal/logo.svg deleted file mode 100644 index 2923b9f5..00000000 --- a/go.dev/testdata/golden/solutions/paypal/logo.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/go.dev/testdata/golden/solutions/riotgames/riotgames.png b/go.dev/testdata/golden/solutions/riotgames/riotgames.png deleted file mode 100644 index facb585f..00000000 Binary files a/go.dev/testdata/golden/solutions/riotgames/riotgames.png and /dev/null differ diff --git a/go.dev/testdata/golden/solutions/salesforce/logo.svg b/go.dev/testdata/golden/solutions/salesforce/logo.svg deleted file mode 100644 index e82db677..00000000 --- a/go.dev/testdata/golden/solutions/salesforce/logo.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/target/logo.svg b/go.dev/testdata/golden/solutions/target/logo.svg deleted file mode 100644 index 98868c57..00000000 --- a/go.dev/testdata/golden/solutions/target/logo.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/go.dev/testdata/golden/solutions/twitch/logo.svg b/go.dev/testdata/golden/solutions/twitch/logo.svg deleted file mode 100644 index 6afd8113..00000000 --- a/go.dev/testdata/golden/solutions/twitch/logo.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - diff --git a/go.dev/testdata/golden/solutions/twitter/logo.svg b/go.dev/testdata/golden/solutions/twitter/logo.svg deleted file mode 100644 index 2832e7b5..00000000 --- a/go.dev/testdata/golden/solutions/twitter/logo.svg +++ /dev/null @@ -1 +0,0 @@ -Twitter_Logo_Blue \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/uber/logo.svg b/go.dev/testdata/golden/solutions/uber/logo.svg deleted file mode 100644 index 7950b0b8..00000000 --- a/go.dev/testdata/golden/solutions/uber/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/go.dev/testdata/golden/solutions/webdev-green.svg b/go.dev/testdata/golden/solutions/webdev-green.svg new file mode 100644 index 00000000..b4e73efc --- /dev/null +++ b/go.dev/testdata/golden/solutions/webdev-green.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/webdev-white.svg b/go.dev/testdata/golden/solutions/webdev-white.svg new file mode 100644 index 00000000..370f57e8 --- /dev/null +++ b/go.dev/testdata/golden/solutions/webdev-white.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/webdev/webdev-green.svg b/go.dev/testdata/golden/solutions/webdev/webdev-green.svg deleted file mode 100644 index b4e73efc..00000000 --- a/go.dev/testdata/golden/solutions/webdev/webdev-green.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/webdev/webdev-white.svg b/go.dev/testdata/golden/solutions/webdev/webdev-white.svg deleted file mode 100644 index 370f57e8..00000000 --- a/go.dev/testdata/golden/solutions/webdev/webdev-white.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/go.dev/testdata/golden/solutions/wildlifestudios/logo.png b/go.dev/testdata/golden/solutions/wildlifestudios/logo.png deleted file mode 100644 index 8d1c43b8..00000000 Binary files a/go.dev/testdata/golden/solutions/wildlifestudios/logo.png and /dev/null differ -- cgit v1.3 From 06809778bfb27c6b860af6bad916fd9949033d8e Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 17 May 2021 13:28:04 -0400 Subject: [x/go.dev] all: do not force every URL to end in slash Hugo generates every page into its own directory with an index.html file, so that all URLs end in slash. Our other web sites do not do this. For example: https://blog.golang.org/ports https://golang.org/pkg/math https://golang.org/ref/spec As part of trying to simplify to a common core serving infrastructure, drop the "every URL ends in slash" requirement for this site. Note that due to what appears to be a bug in the App Engine config, go.dev serves two of every page, both with and without the URL For example, today on go.dev, these serve identical content and neither redirects to the other: https://go.dev/about https://go.dev/about/ This CL is only changing the generated HTML links, not the locations of the generated files. That will happen later. Golden copies updated to match. Change-Id: I5707360f6932878b4df689c593b28311c4cbc9b5 X-GoDev-Commit: b036875aad6369b69ce430db535c92df5d45eb6e --- go.dev/_content/index.md | 6 ++-- go.dev/_content/menus.yaml | 12 ++++---- go.dev/cmd/internal/site/tmpl.go | 5 +++- go.dev/testdata/golden/about/index.html | 16 +++++----- go.dev/testdata/golden/categories/index.html | 16 +++++----- go.dev/testdata/golden/copyright/index.html | 16 +++++----- go.dev/testdata/golden/index.html | 28 +++++++++--------- go.dev/testdata/golden/learn/index.html | 16 +++++----- .../testdata/golden/series/case-studies/index.html | 16 +++++----- go.dev/testdata/golden/series/index.html | 16 +++++----- go.dev/testdata/golden/series/use-cases/index.html | 16 +++++----- .../golden/solutions/americanexpress/index.html | 18 ++++++------ go.dev/testdata/golden/solutions/armut/index.html | 18 ++++++------ .../golden/solutions/capital-one/index.html | 18 ++++++------ go.dev/testdata/golden/solutions/chrome/index.html | 2 +- go.dev/testdata/golden/solutions/clis/index.html | 18 ++++++------ go.dev/testdata/golden/solutions/cloud/index.html | 18 ++++++------ .../golden/solutions/cloudflare/index.html | 18 ++++++------ .../golden/solutions/cockroachlabs/index.html | 18 ++++++------ .../testdata/golden/solutions/coredata/index.html | 2 +- go.dev/testdata/golden/solutions/curve/index.html | 18 ++++++------ go.dev/testdata/golden/solutions/devops/index.html | 18 ++++++------ .../testdata/golden/solutions/dropbox/index.html | 18 ++++++------ .../testdata/golden/solutions/facebook/index.html | 18 ++++++------ .../testdata/golden/solutions/firebase/index.html | 2 +- .../golden/solutions/google/chrome/index.html | 18 ++++++------ .../golden/solutions/google/coredata/index.html | 18 ++++++------ .../golden/solutions/google/firebase/index.html | 18 ++++++------ go.dev/testdata/golden/solutions/google/index.html | 16 +++++----- .../solutions/google/sitereliability/index.html | 18 ++++++------ go.dev/testdata/golden/solutions/grail/index.html | 18 ++++++------ go.dev/testdata/golden/solutions/index.html | 34 +++++++++++----------- .../golden/solutions/mercadolibre/index.html | 18 ++++++------ .../testdata/golden/solutions/microsoft/index.html | 18 ++++++------ .../testdata/golden/solutions/netflix/index.html | 18 ++++++------ go.dev/testdata/golden/solutions/paypal/index.html | 18 ++++++------ .../testdata/golden/solutions/riotgames/index.html | 18 ++++++------ .../golden/solutions/salesforce/index.html | 18 ++++++------ .../golden/solutions/sitereliability/index.html | 2 +- go.dev/testdata/golden/solutions/target/index.html | 18 ++++++------ go.dev/testdata/golden/solutions/twitch/index.html | 18 ++++++------ .../testdata/golden/solutions/twitter/index.html | 18 ++++++------ go.dev/testdata/golden/solutions/uber/index.html | 18 ++++++------ go.dev/testdata/golden/solutions/webdev/index.html | 18 ++++++------ .../golden/solutions/wildlifestudios/index.html | 18 ++++++------ go.dev/testdata/golden/tags/index.html | 16 +++++----- go.dev/testdata/golden/tos/index.html | 16 +++++----- 47 files changed, 380 insertions(+), 377 deletions(-) diff --git a/go.dev/_content/index.md b/go.dev/_content/index.md index 28488e15..64264486 100644 --- a/go.dev/_content/index.md +++ b/go.dev/_content/index.md @@ -37,7 +37,7 @@ title: go.dev
    - Get Started + Get Started

    Companies using Go

    Organizations in every industry use Go to power their software and services - + View all stories

    @@ -266,7 +266,7 @@ title: go.dev Explore a wealth of learning resources, including guided journeys, courses, books, and more.

    diff --git a/go.dev/_content/menus.yaml b/go.dev/_content/menus.yaml index bb537735..801f1503 100644 --- a/go.dev/_content/menus.yaml +++ b/go.dev/_content/menus.yaml @@ -1,8 +1,8 @@ main: - name: Why Go - url: /solutions + url: /solutions/ - name: Getting Started - url: /learn + url: /learn/ - name: Discover Packages url: https://pkg.go.dev - name: About @@ -10,15 +10,15 @@ main: footer: - name: Why Go - url: /solutions + url: /solutions/ children: - name: Use Cases - url: /solutions#use-cases + url: /solutions/#use-cases - name: Case Studies - url: /solutions#case-studies + url: /solutions/#case-studies - name: Getting Started - url: /learn + url: /learn/ children: - name: Playground url: https://play.golang.org diff --git a/go.dev/cmd/internal/site/tmpl.go b/go.dev/cmd/internal/site/tmpl.go index 35104485..c76f10dd 100644 --- a/go.dev/cmd/internal/site/tmpl.go +++ b/go.dev/cmd/internal/site/tmpl.go @@ -203,7 +203,10 @@ func (p *Page) Path() string { if p.id == "" { return "/" } - return "/" + p.id + "/" + if strings.HasSuffix(p.file, "/index.md") { + return "/" + p.id + "/" + } + return "/" + p.id } func (p *Page) Section() string { diff --git a/go.dev/testdata/golden/about/index.html b/go.dev/testdata/golden/about/index.html index fb0ebb2d..46b05ebe 100644 --- a/go.dev/testdata/golden/about/index.html +++ b/go.dev/testdata/golden/about/index.html @@ -69,10 +69,10 @@
    • - Why Go + Why Go
    • - Getting Started + Getting Started
    • Discover Packages @@ -97,10 +97,10 @@