CINXE.COM
<!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 9]><!--><html class='no-js' lang='en'><!--<![endif]--><head> <meta content='IE=edge' http-equiv='X-UA-Compatible'> <meta charset='utf-8'> <meta content='width=device-width, initial-scale=1.0, maximum-scale=1, minimum-scale=1, user-scalable=no' name='viewport'> <meta content='en' name='Content-Language'> <link rel="stylesheet" media="screen" href="https://leanpub.com/assets/stylesheets/app-bundle-c25fedbf67e4e3860c3d.css" /> <link rel="apple-touch-icon-precomposed" type="image/png" href="https://leanpub.com/assets/favicons/apple-touch-icon-57x57-3dc48b9be1873ac9bf6d580e7836e3e5.png" sizes="57x57" /> <link rel="apple-touch-icon-precomposed" type="image/png" href="https://leanpub.com/assets/favicons/apple-touch-icon-60x60-06b95deca3f378372b051ca8ea42cfbd.png" sizes="60x60" /> <link rel="apple-touch-icon-precomposed" type="image/png" href="https://leanpub.com/assets/favicons/apple-touch-icon-72x72-935ba702f9d3da9b4404aa2b797920e5.png" sizes="72x72" /> <link rel="apple-touch-icon-precomposed" type="image/png" href="https://leanpub.com/assets/favicons/apple-touch-icon-76x76-937dbc8b688db389b5b872c5ffdffe2d.png" sizes="76x76" /> <link rel="apple-touch-icon-precomposed" type="image/png" href="https://leanpub.com/assets/favicons/apple-touch-icon-114x114-9db66ed49dfe9c3ed799923955da36e2.png" sizes="114x114" /> <link rel="apple-touch-icon-precomposed" type="image/png" href="https://leanpub.com/assets/favicons/apple-touch-icon-120x120-3fd2359930103db35eb499036b81ba90.png" sizes="120x120" /> <link rel="apple-touch-icon-precomposed" type="image/png" href="https://leanpub.com/assets/favicons/apple-touch-icon-144x144-5bee791d2b53cc426eb14e7f6e40a024.png" sizes="144x144" /> <link rel="apple-touch-icon-precomposed" type="image/png" href="https://leanpub.com/assets/favicons/apple-touch-icon-152x152-af69d0ec0fe11cf82324b06ff9a56e3b.png" sizes="152x152" /> <link rel="icon" type="image/png" href="https://leanpub.com/assets/favicons/favicon-16x16-19545df363d1089bccdc59d17ee5b781.png" sizes="16x16" /> <link rel="icon" type="image/png" href="https://leanpub.com/assets/favicons/favicon-32x32-9a0898109481d6450269c966cdf6a2d7.png" sizes="32x32" /> <link rel="icon" type="image/png" href="https://leanpub.com/assets/favicons/favicon-96x96-98f4372a68f5617fc907b7bde8d94e05.png" sizes="96x96" /> <link rel="icon" type="image/png" href="https://leanpub.com/assets/favicons/favicon-128x128-bf73acc329429fbf555afe3b067aa2d6.png" sizes="128x128" /> <link rel="icon" type="image/png" href="https://leanpub.com/assets/favicons/favicon-196x196-24a71f1b4fb02600f635b59a116daf05.png" sizes="196x196" /> <meta content='Leanpub' name='application-name'> <meta content='#ffffff' name='msapplication-TileColor'> <meta content='favicons/mstile-144x144.png' name='msapplication-TileImage'> <meta content='favicons/mstile-150x150.png' name='msapplication-square150x150logo'> <meta content='favicons/mstile-310x150.png' name='msapplication-wide310x150logo'> <meta content='favicons/mstile-310x310.png' name='msapplication-square310x310logo'> <meta content='favicons/mstile-70x70.png' name='msapplication-square70x70logo'> <link href='//fonts.googleapis.com/' rel='dns-prefetch'> <script src='https://ajax.googleapis.com/ajax/libs/webfont/1.6.16/webfont.js'></script> <script> if (typeof WebFont !== 'undefined') { WebFont.load({ google: { families: [ 'Noto+Sans:ital,wght@0,400;0,700;1,400;1,700', 'Noto+Serif:ital,wght@0,400;0,700;1,400;1,700', 'Inter:wght@400;700', ] } }); } </script> <link rel="stylesheet" media="screen" href="https://leanpub.com/assets/font_awesome-bbab983f4954a5c7dd952efdd403ebe8.css" /> <script> window.__BASE_URL__ = "https://leanpub.com/" window.__RAILS_ENV__ = "production" window.__IGNORE_ANALYTICS__ = false </script> <script> var _rollbarConfig = { accessToken: "3d279f41d3804636adbbba833c2c0d2d", captureUncaught: true, captureUnhandledRejections: true, code_version: "37ccd27f", payload: { environment: "production" } }; // Rollbar Snippet !function(r){function o(n){if(e[n])return e[n].exports;var t=e[n]={exports:{},id:n,loaded:!1};return r[n].call(t.exports,t,t.exports,o),t.loaded=!0,t.exports}var e={};return o.m=r,o.c=e,o.p="",o(0)}([function(r,o,e){"use strict";var n=e(1),t=e(4);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/2.5.2/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,o,e){"use strict";function n(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}function t(r,o){this.options=r,this._rollbarOldOnError=null;var e=s++;this.shimId=function(){return e},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[e]={handler:o,messages:[]})}function a(r,o){if(r){var e=o.globalAlias||"Rollbar";if("object"==typeof r[e])return r[e];r._rollbarShims={},r._rollbarWrappedError=null;var t=new p(o);return n(function(){o.captureUncaught&&(t._rollbarOldOnError=r.onerror,i.captureUncaughtExceptions(r,t,!0),i.wrapGlobals(r,t,!0)),o.captureUnhandledRejections&&i.captureUnhandledRejections(r,t,!0);var n=o.autoInstrument;return o.enabled!==!1&&(void 0===n||n===!0||"object"==typeof n&&n.network)&&r.addEventListener&&(r.addEventListener("load",t.captureLoad.bind(t)),r.addEventListener("DOMContentLoaded",t.captureDomContentLoaded.bind(t))),r[e]=t,t})()}}function l(r){return n(function(){var o=this,e=Array.prototype.slice.call(arguments,0),n={shim:o,method:r,args:e,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)})}var i=e(2),s=0,d=e(3),c=function(r,o){return new t(r,o)},p=function(r){return new d(c,r)};t.prototype.loadFull=function(r,o,e,t,a){var l=function(){var o;if(void 0===r._rollbarDidLoad){o=new Error("rollbar.js did not load");for(var e,n,t,l,i=0;e=r._rollbarShims[i++];)for(e=e.messages||[];n=e.shift();)for(t=n.args||[],i=0;i<t.length;++i)if(l=t[i],"function"==typeof l){l(o);break}}"function"==typeof a&&a(o)},i=!1,s=o.createElement("script"),d=o.getElementsByTagName("script")[0],c=d.parentNode;s.crossOrigin="",s.src=t.rollbarJsUrl,e||(s.async=!0),s.onload=s.onreadystatechange=n(function(){if(!(i||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){s.onload=s.onreadystatechange=null;try{c.removeChild(s)}catch(r){}i=!0,l()}}),c.insertBefore(s,d)},t.prototype.wrap=function(r,o,e){try{var n;if(n="function"==typeof o?o:function(){return o||{}},"function"!=typeof r)return r;if(r._isWrap)return r;if(!r._rollbar_wrapped&&(r._rollbar_wrapped=function(){e&&"function"==typeof e&&e.apply(this,arguments);try{return r.apply(this,arguments)}catch(e){var o=e;throw o&&("string"==typeof o&&(o=new String(o)),o._rollbarContext=n()||{},o._rollbarContext._wrappedSource=r.toString(),window._rollbarWrappedError=o),o}},r._rollbar_wrapped._isWrap=!0,r.hasOwnProperty))for(var t in r)r.hasOwnProperty(t)&&(r._rollbar_wrapped[t]=r[t]);return r._rollbar_wrapped}catch(o){return r}};for(var u="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleUnhandledRejection,captureEvent,captureDomContentLoaded,captureLoad".split(","),f=0;f<u.length;++f)t.prototype[u[f]]=l(u[f]);r.exports={setupShim:a,Rollbar:p}},function(r,o){"use strict";function e(r,o,e){if(r){var t;if("function"==typeof o._rollbarOldOnError)t=o._rollbarOldOnError;else if(r.onerror){for(t=r.onerror;t._rollbarOldOnError;)t=t._rollbarOldOnError;o._rollbarOldOnError=t}var a=function(){var e=Array.prototype.slice.call(arguments,0);n(r,o,t,e)};e&&(a._rollbarOldOnError=t),r.onerror=a}}function n(r,o,e,n){r._rollbarWrappedError&&(n[4]||(n[4]=r._rollbarWrappedError),n[5]||(n[5]=r._rollbarWrappedError._rollbarContext),r._rollbarWrappedError=null),o.handleUncaughtException.apply(o,n),e&&e.apply(r,n)}function t(r,o,e){if(r){"function"==typeof r._rollbarURH&&r._rollbarURH.belongsToShim&&r.removeEventListener("unhandledrejection",r._rollbarURH);var n=function(r){var e,n,t;try{e=r.reason}catch(r){e=void 0}try{n=r.promise}catch(r){n="[unhandledrejection] error getting `promise` from event"}try{t=r.detail,!e&&t&&(e=t.reason,n=t.promise)}catch(r){}e||(e="[unhandledrejection] error getting `reason` from event"),o&&o.handleUnhandledRejection&&o.handleUnhandledRejection(e,n)};n.belongsToShim=e,r._rollbarURH=n,r.addEventListener("unhandledrejection",n)}}function a(r,o,e){if(r){var n,t,a="EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(",");for(n=0;n<a.length;++n)t=a[n],r[t]&&r[t].prototype&&l(o,r[t].prototype,e)}}function l(r,o,e){if(o.hasOwnProperty&&o.hasOwnProperty("addEventListener")){for(var n=o.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var t=function(o,e,t){n.call(this,o,r.wrap(e),t)};t._rollbarOldAdd=n,t.belongsToShim=e,o.addEventListener=t;for(var a=o.removeEventListener;a._rollbarOldRemove&&a.belongsToShim;)a=a._rollbarOldRemove;var l=function(r,o,e){a.call(this,r,o&&o._rollbar_wrapped||o,e)};l._rollbarOldRemove=a,l.belongsToShim=e,o.removeEventListener=l}}r.exports={captureUncaughtExceptions:e,captureUnhandledRejections:t,wrapGlobals:a}},function(r,o){"use strict";function e(r,o){this.impl=r(o,this),this.options=o,n(e.prototype)}function n(r){for(var o=function(r){return function(){var o=Array.prototype.slice.call(arguments,0);if(this.impl[r])return this.impl[r].apply(this.impl,o)}},e="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleUnhandledRejection,_createItem,wrap,loadFull,shimId,captureEvent,captureDomContentLoaded,captureLoad".split(","),n=0;n<e.length;n++)r[e[n]]=o(e[n])}e.prototype._swapAndProcessMessages=function(r,o){this.impl=r(this.options);for(var e,n,t;e=o.shift();)n=e.method,t=e.args,this[n]&&"function"==typeof this[n]&&("captureDomContentLoaded"===n||"captureLoad"===n?this[n].apply(this,[t[0],e.ts]):this[n].apply(this,t));return this},r.exports=e},function(r,o){"use strict";r.exports=function(r){return function(o){if(!o&&!window._rollbarInitialized){r=r||{};for(var e,n,t=r.globalAlias||"Rollbar",a=window.rollbar,l=function(r){return new a(r)},i=0;e=window._rollbarShims[i++];)n||(n=e.handler),e.handler._swapAndProcessMessages(l,e.messages);window[t]=n,window._rollbarInitialized=!0}}}}]); // End Rollbar Snippet </script> <script src="https://www.google.com/recaptcha/api.js?render=6LdDCakUAAAAAEFI0Kyx_gg9t-G4r1mOWrIwFLd0"></script> <script src="https://leanpub.com/assets/modernizr-a38b94cc0625ba4488942166ee4d23a4.js"></script> <title data-react-helmet="true">Production Go by Herman Schaaf et al. [Leanpub PDF/iPad/Kindle]</title><meta data-react-helmet="true" name="og:site_name" content="Leanpub"/><meta data-react-helmet="true" name="leanpub:page_name" content="book"/><meta data-react-helmet="true" name="title" content="Production Go"/><meta data-react-helmet="true" name="description" content="Production Go is the only book that teaches not only the basics of the Go language, but also how to develop and maintain production-ready Go applications. "/><meta data-react-helmet="true" name="author" content="Herman Schaaf"/><meta data-react-helmet="true" name="author" content="Shawn Smith"/><meta data-react-helmet="true" name="DCTERMS.title" content="Production Go"/><meta data-react-helmet="true" name="DCTERMS.description" content="Production Go is the only book that teaches not only the basics of the Go language, but also how to develop and maintain production-ready Go applications. "/><meta data-react-helmet="true" name="DCTERMS.type" content="book"/><meta data-react-helmet="true" name="DCTERMS.creator" content="Herman Schaaf"/><meta data-react-helmet="true" name="DCTERMS.creator" content="Shawn Smith"/><meta data-react-helmet="true" name="DCTERMS.publisher" content="Leanpub"/><meta data-react-helmet="true" name="DCTERMS.date" content="2013-08-22T13:41:31.000Z"/><meta data-react-helmet="true" name="DCTERMS.language" content="eng"/><meta data-react-helmet="true" property="og:title" content="Production Go"/><meta data-react-helmet="true" property="og:type" content="book"/><meta data-react-helmet="true" property="og:image" content="https://d2sofvawe08yqg.cloudfront.net/productiongo/s_hero2x?1620389943"/><meta data-react-helmet="true" property="og:url" content="http://leanpub.next/productiongo"/><meta data-react-helmet="true" property="og:publisher" content="Leanpub"/><meta data-react-helmet="true" property="og:description" content="Production Go is the only book that teaches not only the basics of the Go language, but also how to develop and maintain production-ready Go applications. "/><meta data-react-helmet="true" name="twitter:card" content="summary"/><meta data-react-helmet="true" name="twitter:site" content="@Leanpub"/><meta data-react-helmet="true" name="twitter:title" content="Production Go"/><meta data-react-helmet="true" name="twitter:description" content="Production Go is the only book that teaches not only the basics of the Go language, but also how to develop and maintain production-ready Go applications. "/><meta data-react-helmet="true" name="twitter:image" content="https://d2sofvawe08yqg.cloudfront.net/productiongo/s_featured?1620389943"/><meta data-react-helmet="true" name="twitter:url" content="http://leanpub.next/productiongo"/> </head> <body> <div id='react-root'><div class="app"><section class="Header"><nav class="Header__Nav"><a class="Header__Nav__Logo" href="/"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABDCAYAAABjoACgAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABSRJREFUeNrsXP11mzAQx375P+oEYQOzQdig3iDOBHUnKBs4mYB0grgTQCYwmcBkAuMJXCk9xYqK0DfgoHvvHnl20En3ofsd5hRFgQIFChQoUKBBaOZz8NPphPAlwZxivsEcY6aftVGDuYLrK/xdzWaz2lB+DLIILxjZSHALlU3kvWEuQX5zMQbAi17iyy0oPXE0bAXKeJQZA5T+w5P8Fyx/O7owwotOMeeYDyf/VBB5gjkUPcg/wFrToZWOMK8w70/DEFF2AlwMNIc96AD1tgWBsDWEOYoC0dz1iPlBN1+YGCDHl5WDSdfAlJDDPVtlT2cVFQPb0hM2wL3ODVcGQnQnWsKCCaqp8QRLDeREk7kNvSdPVUQDe3sMqCnRlB97dx08wZ3CvrgBNOQq16w1c80e7kGO5rCENcnmsOsjB5wEXxF49rsNpjFenUA9kLRsO+yW9AJ/lyzsJAkPXzYduYd49098zxMHS1PGo6mn3suisQNm32FudTA85syn9yMRIhHAwo1CxMhoxyINmEPe8n859z9riezUUhci5IV8GiCVGQCUfvCEvzM2GuCzA0QGVXymKN+XAVKfBlgKhGbwfdID9iZenTDyEsY5dPKErQEywbhauW+uKVcGE/uoC8gc3rclvN0SVFOBAxSaKCT1OD9vMPS6A+ppC7ekHPDAraO6xATe/tLQkRMDjCECPhlhhFWxlhPOXUhk4NxiKs8eTCCsCwOkI4sAG7r1NG7adwSUpuH3BajsLQIUYVt4OqquK2cRUFFMPkFdV33mAJFVjxfq/S7qgKPt2HOHXhAiwHMEiFBDM+H9v7FFWC4jYBEiwG8EJIKC5GIjwPaBXMeva4kPAyCJB0wxB4iiADk1QAfEbEIN0J4HVGH53ML7CdUTrgE+6cA0ClQNIFLw24V7v4ta4M0mDziJgAnv/71FwEIiHAUDKOvMSwQsggEGyAHMOzuXGgHWvwl0vC7vPQewguNo2lR7iwB4sywKBtDfhjp0pxUBcVcBoiJkqsWYimPaGOD1C3h/6mic1yEM0ITtp58IuBF8XgUD/KcLVd05jYCboP8BcgB5J/MrRICLt5kZXfRmgCZAUKUosDNAR7NBFQyglgdkDRuyl3MThzVADUwmeozOxxLw8siEr6NzSxNy4JkVI7fmCqfKYwTQNZWmBkAWNQARqtydyNzDexDtVLyL1B97b0H21vScCcNaYKn7SMI0AkTbD1n4H1h406JI1FL8LMAjj5zHkpbWGhIc4QeIuFXU3iROxvgdtTRLw30xF1E0yl5anKDpSKy6lIBejBDCpqu9B9p0aEtozO57TGvnzvIogJw/DoDrBfvoEeO+X8G9e8t2qA2sBcnQlGCMjQ1EKyQG4JW+9nxuw6dDMkAm4pSQez6forX/WKWB0cQArd7L/Q/xjucBDupIucX3fWDHM9+QZ9K8PZMYQNSU/S36d2DH3cAw9AGu6wHn8JF7MB8EhdrMpQGaKPQBdEFRpGOAK4MS3VT5ZXQ+CozH4uzY9HixxGF00fqDHoMmqlrj6Hy0mskjCiTSpain7MqjN5QASUtNSLfloCs9lyE2UDo9v8IIUjI1yPfIX1+xUHhmmBytTpDqmI/q6Vx7HpY6kk+hrUmyz3wbIO/rp0nJvLKe5hBrwl0jAxQKnpZ5PR2kY2vgomE/xPupTEEoi8zChQH2gH3XY3gZFxa/A0YjmE8CunluMUihDUOZZzcun4s4NwLAvGak8xu9DgMFChQo0HD0V4ABAKiCSwHftnDCAAAAAElFTkSuQmCC" alt="Leanpub"/></a><div class="Header__Middle"></div><button class="btn--plain DropdownContainer__Trigger "><div class="Header__Nav__Logo relative__nav__logo"><i class="HeaderIcon fa fa-bars"></i><i class="AccountItem__Trigger fa fa-caret-down"></i></div></button></nav></section><div id="scroll-wrapper" class="scroll-wrapper undefined false"><div class="main"><article class="book-show" lang="en"><div class="quick-buy-header"><div class="container--large"><div class="quick-buy-item-details"><div class="book-cover s_hero "><img src="https://d2sofvawe08yqg.cloudfront.net/productiongo/s_hero?1620389943" style="width:auto;height:auto"/></div><h6 class="quick-buy-title">Production Go</h6></div><div class="quick-buy-purchase-details"><div class="pricing"><div class="price--minimum"><div class="price__value"><span>Free!</span></div><div class="price__title"><span>Minimum price</span></div></div><span><div class="price--suggested"><div class="price__value"><span>$7.99</span></div><div class="price__title"><span>Suggested price</span></div></div><span class="tooltip--pricing"><button class="tooltip-item"><i class="fa fa-question-circle"></i></button></span></span></div><button class="btn--solid"><span>Add Ebook to Cart</span></button></div></div></div><span></span><section class="book-hero"><div class="container--medium--title"><h3 class="book-hero__title ltr">Production Go</h3><h6 class="book-hero__subtitle">Build modern, production-ready web services in Go</h6></div><div class="shelf-hero container--medium"><aside class="book-hero__summary ltr"><div class="book-hero__cover"><div class="book-cover s_hero "><img src="https://d2sofvawe08yqg.cloudfront.net/productiongo/s_hero?1620389943" style="width:auto;height:auto"/></div><div class="book-progress"><div class="progress-bar" title="[object Object]"><span class="progress-bar__meter" style="width:85%"></span></div><p class="percent-complete"><span>This book is 85% complete</span></p><p class="last-updated"><span>Last updated on 2022-06-24</span></p></div></div><div class="book-hero__author"><div><div class="avatars"><div class="avatar--tiny"><a href="https://leanpub.com/u/hermanschaaf"><img class="avatar__image" src="https://d39qdlcrvnra4b.cloudfront.net/avatars/182421/small/herman.png?1506027429" alt="Herman Schaaf"/></a></div><div class="avatar--tiny"><a href="https://leanpub.com/u/shawnps"><img class="avatar__image" src="https://d39qdlcrvnra4b.cloudfront.net/avatars/1155130/small/s.png?1505953941" alt="Shawn Smith"/></a></div></div><div class="names"><a class="link" href="https://leanpub.com/u/hermanschaaf">Herman Schaaf</a><span> and </span><a class="link" href="https://leanpub.com/u/shawnps">Shawn Smith</a></div></div></div><div class="book-hero__blurb"><p>Production Go is the book about creating and maintaining modern production applications written in Go. It assumes prior programming knowledge, and is recommended for professional programmers.</p></div></aside><aside class="book-hero__purchase"><div><div class="pricing"><div class="price--minimum"><div class="price__value"><span>Free!</span></div><div class="price__title"><span>Minimum price</span></div></div><span><div class="price--suggested"><div class="price__value"><span>$7.99</span></div><div class="price__title"><span>Suggested price</span></div></div><span class="tooltip--pricing"><button class="tooltip-item"><i class="fa fa-question-circle"></i></button></span></span></div><div class="cartable-form"><span></span><div class="cartable-form__actions"><div class="cartable-input"><div class="cartable-input__wrapper"><label><span>You Pay in US $</span></label><div class="cartable-form__action--with-hint"><input type="text" class="cartable-input__input"/><p class="hint"><span><strong>EU customers:</strong> Price excludes VAT.<br/> VAT is added during checkout.</span></p></div></div></div><div class="cartable-form__action--with-hint"><button class="btn--solid"><span>Add Ebook to Cart</span></button></div><div class="cartable-form__action"></div><div class="cartable-form__action"><button class="btn--wishlist"><span>Add to Wish List</span></button></div></div></div></div><div class="book-hero__actions"><div><a class="btn--sample-download btn--hollow"><i class="fa fa-file-pdf-o"></i></a></div><div><a class="btn--hollow"><span>Table of Contents</span><i class="fa fa-list-ol"></i></a></div><div><a href="/productiongo/read" class="btn--hollow"><span><span>Free To Read Online</span></span><i class="fa fa-file-o"></i></a></div></div></aside></div><div class="book-hero__meta-container"><div class="book-hero__metadata"><ul class="stats__list"><li class="stats__list-item"><span class="stats__list-item-metric">1,662</span><p class="stats__list-item__title"><span>Readers</span></p></li><li class="stats__list-item"><span class="stats__list-item-metric">156</span><p class="stats__list-item__title"><span>Pages</span></p></li><li class="stats__list-item"><span class="stats__list-item-metric">24,166</span><p class="stats__list-item__title"><span>Words</span></p></li><li class="stats__list-item"><a href="#happiness-guarantee"><span class="stats__list-item-metric"><span>60 days</span></span><p class="stats__list-item__title"><span>guarantee</span></p></a></li><li class="stats__list-item"><i class="fa fa-globe stats__list-item-icon"></i><p class="stats__list-item__title">English</p></li><li class="stats__list-item" title="For Mac and PC"><i class="fa fa-laptop stats__list-item-icon"></i><p class="stats__list-item__title">PDF</p></li><li class="stats__list-item" title="For phones and tablets"><i class="fa fa-mobile stats__list-item-icon"></i><i class="fa fa-tablet stats__list-item-icon"></i><p class="stats__list-item__title">EPUB</p></li><li class="stats__list-item" title="On the web"><span class="stats__list-item--leanpub-icon"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 347.827 237.519" style="enable-background:new 0 0 347.827 237.519;" xml:space="preserve"> <path class="st0" d="M321.584,21.423C309.91,14.855,279.145,0,239.679,0c-35.436,0-55.606,10.893-65.766,17.889 C163.754,10.893,143.584,0,108.148,0C68.682,0,37.917,14.855,26.242,21.423L0,237.519h0.783c14.836,0,29.441-3.421,42.86-9.752 c14.957-7.057,38.538-15.36,66.698-15.36c34.255,0,53.752,15.291,63.573,25.112c9.821-9.821,29.318-25.112,63.573-25.112 c28.16,0,51.741,8.303,66.698,15.36c13.418,6.331,28.023,9.752,42.86,9.752h0.783L321.584,21.423z M303.403,202.544 c-13.892-5.715-27.909-9.622-41.664-11.615c-8.081-1.17-16.241-1.764-24.253-1.764c-22.779,0-43.361,5.68-61.175,16.883 l-2.398,1.491l-2.385-1.484c-17.826-11.21-38.409-16.89-61.188-16.89c-8.012,0-16.171,0.594-24.251,1.764 c-13.755,1.992-27.774,5.9-41.666,11.615l-17.659,7.265L47.831,36.451l1.56-0.689c17.758-7.848,40.543-12.533,60.95-12.533 c25.278,0,46.649,8.049,63.573,23.936c16.924-15.886,38.294-23.936,63.572-23.936c20.407,0,43.192,4.686,60.95,12.533l1.56,0.689 l21.065,173.358L303.403,202.544z M241.984,181.205c-2.178-0.086-4.35-0.132-6.512-0.132c-22.871,0-43.604,5.647-61.626,16.777 c-18.031-11.133-38.759-16.777-61.626-16.777c-8.044,0-16.234,0.595-24.343,1.77c-13.807,1.999-27.86,5.915-41.768,11.636 l-7.933,3.263L56.999,42.849c16.281-6.903,36.783-11,55.222-11c23.941,0,43.983,7.904,59.569,23.491l2.057,2.057l2.056-2.057 c15.017-15.017,34.18-22.88,56.968-23.437L241.984,181.205z"/> </svg> </span><p class="stats__list-item__title">WEB</p></li></ul></div></div></section><span style="font-size:0"></span><section class="about-book"><div class="container--medium"><h1 class="section__title"><span>About the Book</span></h1><div class="about-book__content" dir="ltr" data-dir="ltr"><div class="about-book__copy"><p>With its focus on simplicity and getting things done, Go is a great language for developing performant, robust and maintainable applications. Production Go first teaches the basics of the Go language, then discusses how to bring an application from development to real users. The authors draw from years of experience running high-volume real-world Go applications to explain the tricks behind making—and keeping—Go applications performant, robust and maintainable.</p></div><div class="about-book__meta"><ul class="meta-list"><li class="meta-list__item"><h3 class="meta-list__item-title"><span>Share this book</span></h3><ul class="social-sharing"><li class="twitter"><span class="icon-link--twitter" aria-label="twitter" tabindex="0"></span></li><li class="facebook"><span class="icon-link--facebook" aria-label="facebook" tabindex="0"></span></li></ul></li><li class="meta-list__item"><h3 class="meta-list__item-title"><span>Categories</span></h3><ul class="meta-list__item categories"><li>Computers and Programming</li><li>Software</li><li>Go</li></ul></li><li class="meta-list__item"><h3 class="meta-list__item-title"><span>Feedback</span></h3><a class="btn--hollow --interactive" href="/productiongo/email_author/new"><span>Email the Author(s)</span></a></li></ul></div></div></div></section><section class="about-authors"><section class="lane--author"><div class="container--medium"><header class="lane__header--center"><h4><span>About the Authors</span></h4></header><div data-item-count="2" class="lane__contents--author lane__contents--center"><div><div class="lane-item--author"><a class="avatar-with-name--vertical link" href="/u/hermanschaaf"><div class="avatar--small"><img class="avatar__image" src="https://d39qdlcrvnra4b.cloudfront.net/avatars/182421/small/herman.png?1506027429" alt="Herman Schaaf"/></div><span class="avatar-with-name__name">Herman Schaaf</span></a><div class="profile-icons"><a class="icon-link--github" href="https://github.com/hermanschaaf"></a><a class="icon-link--twitter" href="https://twitter.com/ironzeb"></a></div><div class="lane-item__author_blurb text-left"><p>Herman Schaaf is a London-based software engineer writing production Go at Skyscanner.</p></div></div></div><div><div class="lane-item--author"><a class="avatar-with-name--vertical link" href="/u/shawnps"><div class="avatar--small"><img class="avatar__image" src="https://d39qdlcrvnra4b.cloudfront.net/avatars/1155130/small/s.png?1505953941" alt="Shawn Smith"/></div><span class="avatar-with-name__name">Shawn Smith</span></a><div class="profile-icons"><a class="icon-link--github" href="https://github.com/shawnps"></a><a class="icon-link--twitter" href="https://twitter.com/shawnps"></a></div><div class="lane-item__author_blurb text-left"><p>Shawn Smith is a software engineer based in Japan. His first contribution to Go was in Fall 2012, and he's been using Go primarily ever since.</p></div></div></div></div></div></section></section><span></span><span></span><span></span><section class="layer"><div class="container--large"><div class="container--small section-toc" id="toc"><header class="lane__header--center"><h4><span>Table of Contents</span></h4></header><div class="truncate__text"><div class="truncate__text"><div><div><ul class='toc no-parts'> <li> Introduction </li> <li> Installing Go <ul> <li> Installation </li> <li> Writing Code </li> <li> Editor Integrations </li> <li> (Optional) Linters and Correctness Tooling </li> </ul> </li> <li> Basics <ul> <li> Program Structure </li> <li> Variables and Constants </li> <li> Basic Data Types </li> <li> Structs </li> <li> Operators </li> <li> Conditional Statements </li> <li> Arrays </li> <li> Slices </li> <li> Maps </li> <li> Loops </li> <li> Functions </li> <li> Exported Names </li> <li> Pointers </li> <li> Goroutines </li> <li> Channels </li> <li> Interfaces </li> <li> Error Handling </li> <li> Reading Input </li> <li> Writing Output </li> </ul> </li> <li> Style and Error Handling <ul> <li> Style </li> <li> Error Handling </li> <li> Wrapping Up </li> </ul> </li> <li> Strings <ul> <li> Appending to Strings </li> <li> Splitting strings </li> <li> Counting and finding substrings </li> <li> Advanced string functions </li> <li> Ranging over a string </li> </ul> </li> <li> Supporting Unicode <ul> <li> A very brief history of string encodings </li> <li> Strings are byte slices </li> <li> Printing strings </li> <li> Runes and safely ranging over strings </li> <li> Text Normalization </li> <li> Summary </li> </ul> </li> <li> Concurrency <ul> <li> sync.WaitGroup </li> <li> errgroup </li> <li> Channels </li> <li> Goroutines in web handlers </li> <li> Pollers </li> <li> Race conditions </li> </ul> </li> <li> Testing <ul> <li> Why do we need tests? </li> <li> Writing Tests </li> <li> Testing HTTP Handlers </li> <li> Mocking </li> <li> Generating Coverage Reports </li> <li> Writing Examples </li> </ul> </li> <li> Benchmarks <ul> <li> A simple benchmark </li> <li> Comparing benchmarks </li> <li> Resetting benchmark timers </li> <li> Benchmarking memory allocations </li> <li> Modulo vs Bitwise-and </li> </ul> </li> <li> Tooling <ul> <li> Godoc </li> <li> Go Guru </li> <li> Race Detector </li> <li> Go Report Card </li> <li> Staticcheck </li> <li> Go-fuzz </li> <li> govalidate </li> <li> Pinning tools with Go modules </li> </ul> </li> <li> Security <ul> <li> Keep Go Up to Date </li> <li> CSRF </li> <li> HTTP Strict Transport Security (HSTS) </li> <li> Content Security Policy (CSP) </li> <li> SQL Injection </li> <li> See Also </li> </ul> </li> <li> Going into Production <ul> <li> Continuous Integration & Continuous Deployment (CI/CD) </li> <li> Deployment </li> <li> Logging </li> <li> Monitoring </li> <li> Alerting </li> </ul> </li> <li> Further Reading </li> <li> Acknowledgements <ul> <li> Licenses </li> </ul> </li> <li> Notes </li> </ul> </div></div></div></div></div></div></section><div class="happiness-guarantee" id="happiness-guarantee"><div class="container--large"><h3 class="hg-title"><span>The Leanpub 60 Day 100% Happiness Guarantee</span></h3><p><span>Within <strong>60 days of purchase</strong> you can get a <strong>100% refund</strong> on any Leanpub purchase, in <strong>two clicks</strong>.<br/><br/>Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.<br/><br/><em>You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!</em><br/><br/>So, there's no reason not to click the Add to Cart button, is there?<br/><br/><a href="/refunds">See full terms...</a></span></p></div></div><div class="royalties-counter--dark section--earth-green" id="royalties-counter"><div class="container--small"><h3 class="royalties-counter-title"><span>Earn $8 on a $10 Purchase, and $16 on a $20 Purchase</span></h3><h4 class="royalties-counter__string"><span>We pay <strong>80% royalties</strong> on purchases of <strong>$7.99 or more</strong>, and <strong>80% royalties minus a 50 cent flat fee</strong> on purchases between <strong>$0.99 and $7.98</strong>. <strong>You earn $8 on a $10 sale, and $16 on a $20 sale</strong>. So, if we sell <strong>5000 non-refunded copies of your book for $20</strong>, you'll earn <strong>$80,000</strong>.<br/><br/><em>(Yes, some authors have already earned much more than that on Leanpub.)</em><br/><br/>In fact, authors have earned<span class='royalties-counter__price'><a href='/authors'>over $13 million</a></span>writing, publishing and selling on Leanpub.<br/><br/><strong><a href='/authors' class='link'>Learn more about writing on Leanpub</a></strong></span></h4></div></div><div class="free-updates"><div class="container--small"><h3 class="free-updates-title"><span>Free Updates. DRM Free.</span></h3><p><span>If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).<br/><br/>Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.<br/><br/>Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.</span></p><p><a href="https://help.leanpub.com/reader-help/what-formats-do-leanpub-books-come-in"><span>Learn more about Leanpub's ebook formats and where to read them</span></a></p></div></div><div class="become-an-author"><div class="container--small"><h3 class="baa-title"><span>Write and Publish on Leanpub</span></h3><p><span>You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!<br/><br/>Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.<br/><br/>Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.</span></p><p><a href="/authors"><span>Learn more about writing on Leanpub</span></a></p></div></div></article><div class="footer"><div class="container--small"><div><h1 class="footer-logo"><a href="/"><img src="data:image/png;base64,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"/></a></h1><h3 class="footer-slogan">Publish Early, Publish Often</h3></div><div><ul class="footer-list-break"><li><h5 class="footer-headings">Path</h5></li><li><div class="footer-descriptions-top">There are many paths, but the one you're on right now on Leanpub is...</div></li><li><div> › Productiongo</div></li></ul></div><div class="footer-links"><ul class="footer-list"><ul class="footer-columns"><li><h5 class="footer-headings">READERS</h5></li></ul><ul class="footer-list-break"><li><h5 class="footer-list-title">Newsletters</h5></li><li><a href="/newsletters">Weekly Sale</a></li><li><a href="/newsletters">Monthly Sale</a></li></ul><ul class="footer-list-break"><li><h5 class="footer-list-title">Store</h5></li><li><a href="/">Home</a></li><li><a href="/redeem">Redeem a Token</a></li><li><a href="/bookstore/book?search">Search</a></li></ul><ul class="footer-list-break"><li><h5 class="footer-list-title">Support</h5></li><li><a href="https://help.leanpub.com/en/articles/3788293-the-leanpub-faq">Leanpub FAQ</a></li><li><a href="https://help.leanpub.com/en/articles/4405350-leanpub-author-faq">Leanpub Author FAQ</a></li><li><a href="https://help.leanpub.com/en/">Search our Help Center</a></li><li><a href="https://help.leanpub.com/en/articles/110768-if-i-can-t-find-an-answer-to-my-question-in-this-help-center-what-should-i-do">How to Contact Us</a></li></ul><ul class="footer-columns"><li><h5 class="footer-headings">FRONTMATTER PODCAST</h5></li></ul><ul class="footer-list-break"><li><a href="/podcasts/featured">Featured Episode</a></li><li><a href="/podcasts/frontmatter">Episode List</a></li></ul><ul class="footer-columns"><li><h5 class="footer-headings">MEMBERSHIPS</h5></li></ul><ul class="footer-list-break"><li><a href="/reader_memberships">Reader Memberships</a></li><li><a href="/departmentmemberships">Department Reader Memberships</a></li><li><a href="/author_memberships">Author Memberships</a></li><li><a href="/membership">Your Membership</a></li></ul><ul class="footer-columns"><li><h5 class="footer-headings">COMPANY</h5></li></ul><ul class="footer-list-break"><li><h5 class="footer-list-title">About</h5></li><li><a href="/about">About Leanpub</a></li><li><a href="/blog">Blog</a></li><li><a href="/contact">Contact</a></li><li><a href="/press">Press</a></li></ul><ul class="footer-list-break"><li><h5 class="footer-list-title">Essays</h5></li><li><a href="/ai_services">AI Services</a></li><li><a href="/imagine_a_world">Imagine a world...</a></li><li><a href="/manifesto">Manifesto</a></li></ul><ul class="footer-list-break"><li><h5 class="footer-list-title">More</h5></li><li><a href="/partner_program">Partner Program</a></li><li><a href="/causes">Causes</a></li><li><a href="/accessibility">Accessibility</a></li></ul></ul><ul class="footer-list"><ul class="footer-columns"><li><h5 class="footer-headings">AUTHORS</h5></li></ul><ul class="footer-list-break"><li><h5 class="footer-list-title">Write and Publish on Leanpub</h5></li><li><a href="/create/book">Create a Book</a></li><li><a href="/create/course">Create a Course</a></li><li><a href="/course_set_admin/leanpub/course_sets/new">Create a Track</a></li><li><a href="/testimonials">Testimonials</a></li><li><a href="/authors">Why Leanpub</a></li></ul><ul class="footer-list-break"><li><h5 class="footer-list-title">Services</h5></li><li><a href="/course_ai/buy">CourseAI</a></li><li><a href="/translate_ai/buy">TranslateAI</a></li></ul><ul class="footer-list-break"><li><h5 class="footer-list-title">Author Newsletter</h5></li><li><a href="/newsletters">The Leanpub Author Update</a></li></ul><ul class="footer-list-break"><li><h5 class="footer-list-title">Author Support</h5></li><li><a href="https://help.leanpub.com/author-help">Author Help Center</a></li><li><a href="https://community.leanpub.com/c/authors">Leanpub Authors Forum</a></li><li><a href="https://leanpub.com/manual/read">The Leanpub Manual</a></li><li><a href="/help/supported_languages">Supported Languages</a></li><li><a href="https://leanpub.com/lfm/read">The LFM Manual</a></li><li><a href="https://leanpub.com/markua/read">The Markua Manual</a></li><li><a href="/help/api">API Docs</a></li></ul><ul class="footer-list-break"><li><h5 class="footer-list-title">Organizations</h5></li><li><a href="/organizations">Learn More</a></li><li><a href="/p/register">Sign Up</a></li></ul><ul class="footer-columns"><li><h5 class="footer-headings">LEGAL</h5></li></ul><ul class="footer-list-break"><li><a href="/terms">Terms of Service</a></li><li><a href="/takedown">Copyright Policy</a></li><li><a href="/privacy">Privacy Policy</a></li><li><a href="/refunds">Refund Policy</a></li></ul></ul></div><p class="footer-copyright">* * *</p><p class="footer-copyright">Leanpub is copyright © 2010-<!-- -->2024<!-- --> <a href="http://ruboss.com">Ruboss Technology Corp.</a><br/>All rights reserved.</p><p class="footer-copyright">This site is protected by reCAPTCHA<br/>and the Google <a rel="noopener noreferrer" target="_blank" href="https://policies.google.com/privacy">Privacy Policy</a> and <a rel="noopener noreferrer" target="_blank" href="https://policies.google.com/terms">Terms of Service</a> apply.</p></div></div></div></div><ul class="react-flash-container"></ul><div class="modal-wrapper"></div><span></span></div></div> <div class='cookies-banner alert alert--info' style='display: none'> Leanpub requires cookies in order to provide you the best experience. <a class='dismiss link'>Dismiss</a> </div> <script type='text/javascript'> window.addEventListener('load', function() { var shouldShowCookies = document.cookie.indexOf('should_show_cookies') !== -1 if (shouldShowCookies) { var banner = document.querySelector('.cookies-banner') // IE < 9 check if (banner.style.removeProperty) { banner.style.removeProperty('display'); } else { banner.style.removeAttribute('display'); } document.querySelector('.cookies-banner').classList.add('shown') // Note that we have to use vanilla JS here because ujs (remote links) code doesn't live in the react app, and i don't // want to have to write this shit twice. document.querySelector('.cookies-banner .dismiss').addEventListener('click', function() { document.querySelector('.cookies-banner').remove() var xhr = new XMLHttpRequest() xhr.open("POST", "/api/v1/accepted_terms/dismiss_cookies", true); xhr.send() }) } }) </script> </body> <script charSet="UTF-8" data-reactroot="">window.__data={"AdminFlag":{"all":{},"errors":{},"indexes":{},"loading":{}},"Answer":{"all":{},"errors":{},"indexes":{},"loading":{}},"Asset":{"all":{},"errors":{},"indexes":{},"loading":{}},"Author":{"all":{"9254":{"type":"Author","cause_royalty_percentage":"0.0","created_at":"2013-08-22T13:41:31.000Z","name":"Herman Schaaf","position":null,"profile_blurb":"\u003Cp\u003EHerman Schaaf is a London-based software engineer writing production Go at Skyscanner.\u003C\u002Fp\u003E","state":"accepted","updated_at":"2017-09-22T22:21:21.000Z","username":"hermanschaaf","user_id":182421,"book_id":8877,"cause_id":null,"tiny_avatar_url":"https:\u002F\u002Fd39qdlcrvnra4b.cloudfront.net\u002Favatars\u002F182421\u002Ftiny\u002Fherman.png?1506027429","view_invitation_path":null,"id":9254,"user":[{"id":182421,"type":"User"}],"book":[{"id":8877,"type":"Book"}]},"45706":{"type":"Author","cause_royalty_percentage":"0.0","created_at":"2017-09-20T10:29:07.000Z","name":"Shawn Smith","position":1,"profile_blurb":"\u003Cp\u003EShawn Smith is a software engineer based in Japan. His first contribution to Go was in Fall 2012, and he's been using Go primarily ever since.\u003C\u002Fp\u003E","state":"accepted","updated_at":"2017-09-20T10:29:37.000Z","username":"shawnps","user_id":1155130,"book_id":8877,"cause_id":null,"tiny_avatar_url":"https:\u002F\u002Fd39qdlcrvnra4b.cloudfront.net\u002Favatars\u002F1155130\u002Ftiny\u002Fs.png?1505953941","view_invitation_path":null,"id":45706,"user":[{"id":1155130,"type":"User"}],"book":[{"id":8877,"type":"Book"}]}},"errors":{},"indexes":{},"loading":{},"stats":{}},"AuthorServicesBook":{"all":{},"errors":{},"indexes":{},"loading":{}},"Book":{"all":{"8877":{"type":"Book","about_the_book":"\u003Cp\u003EWith its focus on simplicity and getting things done, Go is a great language for developing performant, robust and maintainable applications. Production Go first teaches the basics of the Go language, then discusses how to bring an application from development to real users. The authors draw from years of experience running high-volume real-world Go applications to explain the tricks behind making—and keeping—Go applications performant, robust and maintainable.\u003C\u002Fp\u003E","author_count":2,"author_community_preview_short_url":null,"author_preview_short_url":null,"author_sample_preview_short_url":null,"authors_are_editors":false,"available_downloadable_epub":true,"available_downloadable_pdf":true,"categories":[{"id":53,"slug":"computer_programming","description":"","mature_content":false,"created_at":"2015-09-14T21:13:24.000Z","updated_at":"2020-11-12T06:14:20.000Z","can_be_short":false,"parent_category_id":null,"name":"Computers and Programming","book_categories_count":1787},{"id":11,"slug":"software","description":"","mature_content":false,"created_at":"2012-06-11T19:12:39.000Z","updated_at":"2020-11-12T06:14:20.000Z","can_be_short":false,"parent_category_id":53,"name":"Software","book_categories_count":552},{"id":185,"slug":"go","description":"","mature_content":false,"created_at":"2017-09-20T13:33:47.000Z","updated_at":"2017-09-20T13:33:47.000Z","can_be_short":false,"parent_category_id":53,"name":"Go","book_categories_count":72}],"cc_license_text":"Creative Commons Attribution","cc_slug":"by","cc_version":null,"clicky_analytics_code":"","community_edition_about_the_book":"","community_edition_callout_quote":"","community_edition_epub_url":"\u002Fproductiongo\u002Fce\u002Fepub","community_edition_pdf_url":"\u002Fproductiongo\u002Fce\u002Fpdf","community_edition_require_firstname":"required","community_edition_require_lastname":"required","community_edition_teaser_text":"","community_edition_whats_included":"","copyright_type":"default","contact_author_method":"email","contact_author_url":null,"created_at":"2013-08-22T13:41:31.000Z","default_package_id":7354,"meta_description":"Production Go is the only book that teaches not only the basics of the Go language, but also how to develop and maintain production-ready Go applications. ","editor_read_only":false,"forum_url":null,"forced_markua":false,"free_purchase_requires_membership":false,"enabled_forums":false,"embargo":false,"name":"Production Go","epub_available":true,"epub_community_edition_available":false,"epub_download_url":null,"epub_file_size":null,"free_purchase_only":false,"google_analytics_code":"UA-106871807-1","generate_community_edition":null,"generated_on_leanpub":true,"has_epub_sample":true,"has_pdf_sample":true,"has_sample":true,"image":"https:\u002F\u002Fd2sofvawe08yqg.cloudfront.net\u002Fproductiongo\u002Fs_featured?1620389943","installments_completed":null,"installments_planned":null,"input_format":"lfm","language_code3":"eng","language_id":124,"language_name":"English","last_published_at":"2022-06-24T11:40:35.000Z","last_published_sync_mode":"github","leanpub_app_available":true,"mature_content":false,"new_edition_id":null,"page_count_published":156,"pdf_available":true,"pdf_community_edition_available":false,"pre_publish_mailchimp_list_id":"leanpub","preview_generated_at":"2022-06-24T11:32:14.000Z","primary_author_id":9254,"publisher_id":1,"sample_epub_url":"https:\u002F\u002Fs3.amazonaws.com\u002Fsamples.leanpub.com\u002Fproductiongo-sample.epub?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0XBXHW3Q9GGV69BT7E82%2F20241121%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241121T231622Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=17e04aa9af9ea3fe97a16ecc049a185cddc56c46c4449ea2a4792cd697f4ee20","sample_url":"https:\u002F\u002Fs3.amazonaws.com\u002Fsamples.leanpub.com\u002Fproductiongo-sample.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0XBXHW3Q9GGV69BT7E82%2F20241121%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20241121T231622Z&X-Amz-Expires=518400&X-Amz-SignedHeaders=host&X-Amz-Signature=3dedb6ad1c00ff33e7f264c0944b19982ad4fa48b9350d3025a4337b2beb3cc9","show_also_by_authors":false,"show_community_edition_on_book_page":false,"show_num_readers":true,"show_feedback_page":true,"show_full_title_for_translations":false,"show_installments":null,"show_page_count":true,"show_read_link":"full","show_word_count":true,"slug":"productiongo","state":"published","subtitle":"Build modern, production-ready web services in Go","suggested_tweet":"","sync_mode":"github","tagline":"Production Go is the book about creating and maintaining modern production applications written in Go. It assumes prior programming knowledge, and is recommended for professional programmers.","thank_you_message":null,"title":"Production Go","json_toc":"[{\"level\":2,\"title\":\"Introduction\",\"quiz_type\":null,\"path\":\"#leanpub-auto-introduction\",\"file_count\":1,\"quiz_id\":null,\"section_num\":null},{\"level\":2,\"title\":\"Installing Go\",\"quiz_type\":null,\"path\":\"#leanpub-auto-installing-go\",\"file_count\":2,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Installation\",\"quiz_type\":null,\"path\":\"#leanpub-auto-installation\",\"file_count\":2,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Writing Code\",\"quiz_type\":null,\"path\":\"#leanpub-auto-writing-code\",\"file_count\":2,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Editor Integrations\",\"quiz_type\":null,\"path\":\"#leanpub-auto-editor-integrations\",\"file_count\":2,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"(Optional) Linters and Correctness Tooling\",\"quiz_type\":null,\"path\":\"#leanpub-auto-optional-linters-and-correctness-tooling\",\"file_count\":2,\"quiz_id\":null,\"section_num\":null},{\"level\":2,\"title\":\"Basics\",\"quiz_type\":null,\"path\":\"#basics\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Program Structure\",\"quiz_type\":null,\"path\":\"#leanpub-auto-program-structure\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Variables and Constants\",\"quiz_type\":null,\"path\":\"#leanpub-auto-variables-and-constants\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Basic Data Types\",\"quiz_type\":null,\"path\":\"#leanpub-auto-basic-data-types\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Structs\",\"quiz_type\":null,\"path\":\"#leanpub-auto-structs\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Operators\",\"quiz_type\":null,\"path\":\"#leanpub-auto-operators\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Conditional Statements\",\"quiz_type\":null,\"path\":\"#leanpub-auto-conditional-statements\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Arrays\",\"quiz_type\":null,\"path\":\"#leanpub-auto-arrays\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Slices\",\"quiz_type\":null,\"path\":\"#leanpub-auto-slices\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Maps\",\"quiz_type\":null,\"path\":\"#leanpub-auto-maps\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Loops\",\"quiz_type\":null,\"path\":\"#leanpub-auto-loops\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Functions\",\"quiz_type\":null,\"path\":\"#leanpub-auto-functions\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Exported Names\",\"quiz_type\":null,\"path\":\"#leanpub-auto-exported-names\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Pointers\",\"quiz_type\":null,\"path\":\"#leanpub-auto-pointers\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Goroutines\",\"quiz_type\":null,\"path\":\"#leanpub-auto-goroutines\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Channels\",\"quiz_type\":null,\"path\":\"#basics-channels\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Interfaces\",\"quiz_type\":null,\"path\":\"#leanpub-auto-interfaces\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Error Handling\",\"quiz_type\":null,\"path\":\"#leanpub-auto-error-handling\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Reading Input\",\"quiz_type\":null,\"path\":\"#leanpub-auto-reading-input\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Writing Output\",\"quiz_type\":null,\"path\":\"#leanpub-auto-writing-output\",\"file_count\":3,\"quiz_id\":null,\"section_num\":null},{\"level\":2,\"title\":\"Style and Error Handling\",\"quiz_type\":null,\"path\":\"#leanpub-auto-style-and-error-handling\",\"file_count\":4,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Style\",\"quiz_type\":null,\"path\":\"#leanpub-auto-style\",\"file_count\":4,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Error Handling\",\"quiz_type\":null,\"path\":\"#leanpub-auto-error-handling-1\",\"file_count\":4,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Wrapping Up\",\"quiz_type\":null,\"path\":\"#leanpub-auto-wrapping-up\",\"file_count\":4,\"quiz_id\":null,\"section_num\":null},{\"level\":2,\"title\":\"Strings\",\"quiz_type\":null,\"path\":\"#strings-chapter\",\"file_count\":5,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Appending to Strings\",\"quiz_type\":null,\"path\":\"#leanpub-auto-appending-to-strings\",\"file_count\":5,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Splitting strings\",\"quiz_type\":null,\"path\":\"#leanpub-auto-splitting-strings\",\"file_count\":5,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Counting and finding substrings\",\"quiz_type\":null,\"path\":\"#leanpub-auto-counting-and-finding-substrings\",\"file_count\":5,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Advanced string functions\",\"quiz_type\":null,\"path\":\"#leanpub-auto-advanced-string-functions\",\"file_count\":5,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Ranging over a string\",\"quiz_type\":null,\"path\":\"#leanpub-auto-ranging-over-a-string\",\"file_count\":5,\"quiz_id\":null,\"section_num\":null},{\"level\":2,\"title\":\"Supporting Unicode\",\"quiz_type\":null,\"path\":\"#strings-unicode\",\"file_count\":6,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"A very brief history of string encodings\",\"quiz_type\":null,\"path\":\"#leanpub-auto-a-very-brief-history-of-string-encodings\",\"file_count\":6,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Strings are byte slices\",\"quiz_type\":null,\"path\":\"#leanpub-auto-strings-are-byte-slices\",\"file_count\":6,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Printing strings\",\"quiz_type\":null,\"path\":\"#leanpub-auto-printing-strings\",\"file_count\":6,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Runes and safely ranging over strings\",\"quiz_type\":null,\"path\":\"#leanpub-auto-runes-and-safely-ranging-over-strings\",\"file_count\":6,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Text Normalization\",\"quiz_type\":null,\"path\":\"#leanpub-auto-text-normalization\",\"file_count\":6,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Summary\",\"quiz_type\":null,\"path\":\"#leanpub-auto-summary\",\"file_count\":6,\"quiz_id\":null,\"section_num\":null},{\"level\":2,\"title\":\"Concurrency\",\"quiz_type\":null,\"path\":\"#concurrency\",\"file_count\":7,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"sync.WaitGroup\",\"quiz_type\":null,\"path\":\"#leanpub-auto-syncwaitgroup\",\"file_count\":7,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"errgroup\",\"quiz_type\":null,\"path\":\"#leanpub-auto-errgroup\",\"file_count\":7,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Channels\",\"quiz_type\":null,\"path\":\"#leanpub-auto-channels\",\"file_count\":7,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Goroutines in web handlers\",\"quiz_type\":null,\"path\":\"#leanpub-auto-goroutines-in-web-handlers\",\"file_count\":7,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Pollers\",\"quiz_type\":null,\"path\":\"#leanpub-auto-pollers\",\"file_count\":7,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Race conditions\",\"quiz_type\":null,\"path\":\"#leanpub-auto-race-conditions\",\"file_count\":7,\"quiz_id\":null,\"section_num\":null},{\"level\":2,\"title\":\"Testing\",\"quiz_type\":null,\"path\":\"#testing\",\"file_count\":8,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Why do we need tests?\",\"quiz_type\":null,\"path\":\"#leanpub-auto-why-do-we-need-tests\",\"file_count\":8,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Writing Tests\",\"quiz_type\":null,\"path\":\"#writing-tests\",\"file_count\":8,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Testing HTTP Handlers\",\"quiz_type\":null,\"path\":\"#leanpub-auto-testing-http-handlers\",\"file_count\":8,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Mocking\",\"quiz_type\":null,\"path\":\"#leanpub-auto-mocking\",\"file_count\":8,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Generating Coverage Reports\",\"quiz_type\":null,\"path\":\"#leanpub-auto-generating-coverage-reports\",\"file_count\":8,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Writing Examples\",\"quiz_type\":null,\"path\":\"#leanpub-auto-writing-examples\",\"file_count\":8,\"quiz_id\":null,\"section_num\":null},{\"level\":2,\"title\":\"Benchmarks\",\"quiz_type\":null,\"path\":\"#writing-benchmarks\",\"file_count\":9,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"A simple benchmark\",\"quiz_type\":null,\"path\":\"#leanpub-auto-a-simple-benchmark\",\"file_count\":9,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Comparing benchmarks\",\"quiz_type\":null,\"path\":\"#leanpub-auto-comparing-benchmarks\",\"file_count\":9,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Resetting benchmark timers\",\"quiz_type\":null,\"path\":\"#leanpub-auto-resetting-benchmark-timers\",\"file_count\":9,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Benchmarking memory allocations\",\"quiz_type\":null,\"path\":\"#leanpub-auto-benchmarking-memory-allocations\",\"file_count\":9,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Modulo vs Bitwise-and\",\"quiz_type\":null,\"path\":\"#leanpub-auto-modulo-vs-bitwise-and\",\"file_count\":9,\"quiz_id\":null,\"section_num\":null},{\"level\":2,\"title\":\"Tooling\",\"quiz_type\":null,\"path\":\"#tooling\",\"file_count\":10,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Godoc\",\"quiz_type\":null,\"path\":\"#leanpub-auto-godoc\",\"file_count\":10,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Go Guru\",\"quiz_type\":null,\"path\":\"#leanpub-auto-go-guru\",\"file_count\":10,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Race Detector\",\"quiz_type\":null,\"path\":\"#racedetector\",\"file_count\":10,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Go Report Card\",\"quiz_type\":null,\"path\":\"#leanpub-auto-go-report-card\",\"file_count\":10,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Staticcheck\",\"quiz_type\":null,\"path\":\"#leanpub-auto-staticcheck\",\"file_count\":10,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Go-fuzz\",\"quiz_type\":null,\"path\":\"#leanpub-auto-go-fuzz\",\"file_count\":10,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"govalidate\",\"quiz_type\":null,\"path\":\"#leanpub-auto-govalidate\",\"file_count\":10,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Pinning tools with Go modules\",\"quiz_type\":null,\"path\":\"#tooling-pinning\",\"file_count\":10,\"quiz_id\":null,\"section_num\":null},{\"level\":2,\"title\":\"Security\",\"quiz_type\":null,\"path\":\"#leanpub-auto-security\",\"file_count\":11,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Keep Go Up to Date\",\"quiz_type\":null,\"path\":\"#leanpub-auto-keep-go-up-to-date\",\"file_count\":11,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"CSRF\",\"quiz_type\":null,\"path\":\"#leanpub-auto-csrf\",\"file_count\":11,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"HTTP Strict Transport Security (HSTS)\",\"quiz_type\":null,\"path\":\"#leanpub-auto-http-strict-transport-security-hsts\",\"file_count\":11,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Content Security Policy (CSP)\",\"quiz_type\":null,\"path\":\"#leanpub-auto-content-security-policy-csp\",\"file_count\":11,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"SQL Injection\",\"quiz_type\":null,\"path\":\"#leanpub-auto-sql-injection\",\"file_count\":11,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"See Also\",\"quiz_type\":null,\"path\":\"#leanpub-auto-see-also\",\"file_count\":11,\"quiz_id\":null,\"section_num\":null},{\"level\":2,\"title\":\"Going into Production\",\"quiz_type\":null,\"path\":\"#leanpub-auto-going-into-production\",\"file_count\":12,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Continuous Integration \\u0026amp; Continuous Deployment (CI\u002FCD)\",\"quiz_type\":null,\"path\":\"#leanpub-auto-continuous-integration--continuous-deployment-cicd\",\"file_count\":12,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Deployment\",\"quiz_type\":null,\"path\":\"#leanpub-auto-deployment\",\"file_count\":12,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Logging\",\"quiz_type\":null,\"path\":\"#leanpub-auto-logging\",\"file_count\":12,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Monitoring\",\"quiz_type\":null,\"path\":\"#leanpub-auto-monitoring\",\"file_count\":12,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Alerting\",\"quiz_type\":null,\"path\":\"#leanpub-auto-alerting\",\"file_count\":12,\"quiz_id\":null,\"section_num\":null},{\"level\":2,\"title\":\"Further Reading\",\"quiz_type\":null,\"path\":\"#leanpub-auto-further-reading\",\"file_count\":13,\"quiz_id\":null,\"section_num\":null},{\"level\":2,\"title\":\"Acknowledgements\",\"quiz_type\":null,\"path\":\"#leanpub-auto-acknowledgements\",\"file_count\":14,\"quiz_id\":null,\"section_num\":null},{\"level\":3,\"title\":\"Licenses\",\"quiz_type\":null,\"path\":\"#leanpub-auto-licenses\",\"file_count\":14,\"quiz_id\":null,\"section_num\":null}]","title_page_url_s_mini":"https:\u002F\u002Fd2sofvawe08yqg.cloudfront.net\u002Fproductiongo\u002Fs_mini?1620389943","title_page_url_s_mini2x":"https:\u002F\u002Fd2sofvawe08yqg.cloudfront.net\u002Fproductiongo\u002Fs_mini2x?1620389943","title_page_url_s_list":"https:\u002F\u002Fd2sofvawe08yqg.cloudfront.net\u002Fproductiongo\u002Fs_list?1620389943","title_page_url_s_list2x":"https:\u002F\u002Fd2sofvawe08yqg.cloudfront.net\u002Fproductiongo\u002Fs_list2x?1620389943","title_page_url_s_shelf":"https:\u002F\u002Fd2sofvawe08yqg.cloudfront.net\u002Fproductiongo\u002Fs_shelf?1620389943","title_page_url_s_shelf2x":"https:\u002F\u002Fd2sofvawe08yqg.cloudfront.net\u002Fproductiongo\u002Fs_shelf2x?1620389943","title_page_url_s_featured":"https:\u002F\u002Fd2sofvawe08yqg.cloudfront.net\u002Fproductiongo\u002Fs_featured?1620389943","title_page_url_s_featured2x":"https:\u002F\u002Fd2sofvawe08yqg.cloudfront.net\u002Fproductiongo\u002Fs_featured2x?1620389943","title_page_url_s_hero":"https:\u002F\u002Fd2sofvawe08yqg.cloudfront.net\u002Fproductiongo\u002Fs_hero?1620389943","title_page_url_s_hero2x":"https:\u002F\u002Fd2sofvawe08yqg.cloudfront.net\u002Fproductiongo\u002Fs_hero2x?1620389943","toc":"\u003Cul class='toc no-parts'\u003E\n \u003Cli\u003E\n Introduction\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Installing Go\n \u003Cul\u003E\n \u003Cli\u003E\n Installation\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Writing Code\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Editor Integrations\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n (Optional) Linters and Correctness Tooling\n \u003C\u002Fli\u003E\n \u003C\u002Ful\u003E\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Basics\n \u003Cul\u003E\n \u003Cli\u003E\n Program Structure\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Variables and Constants\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Basic Data Types\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Structs\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Operators\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Conditional Statements\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Arrays\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Slices\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Maps\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Loops\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Functions\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Exported Names\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Pointers\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Goroutines\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Channels\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Interfaces\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Error Handling\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Reading Input\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Writing Output\n \u003C\u002Fli\u003E\n \u003C\u002Ful\u003E\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Style and Error Handling\n \u003Cul\u003E\n \u003Cli\u003E\n Style\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Error Handling\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Wrapping Up\n \u003C\u002Fli\u003E\n \u003C\u002Ful\u003E\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Strings\n \u003Cul\u003E\n \u003Cli\u003E\n Appending to Strings\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Splitting strings\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Counting and finding substrings\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Advanced string functions\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Ranging over a string\n \u003C\u002Fli\u003E\n \u003C\u002Ful\u003E\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Supporting Unicode\n \u003Cul\u003E\n \u003Cli\u003E\n A very brief history of string encodings\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Strings are byte slices\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Printing strings\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Runes and safely ranging over strings\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Text Normalization\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Summary\n \u003C\u002Fli\u003E\n \u003C\u002Ful\u003E\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Concurrency\n \u003Cul\u003E\n \u003Cli\u003E\n sync.WaitGroup\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n errgroup\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Channels\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Goroutines in web handlers\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Pollers\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Race conditions\n \u003C\u002Fli\u003E\n \u003C\u002Ful\u003E\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Testing\n \u003Cul\u003E\n \u003Cli\u003E\n Why do we need tests?\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Writing Tests\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Testing HTTP Handlers\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Mocking\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Generating Coverage Reports\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Writing Examples\n \u003C\u002Fli\u003E\n \u003C\u002Ful\u003E\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Benchmarks\n \u003Cul\u003E\n \u003Cli\u003E\n A simple benchmark\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Comparing benchmarks\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Resetting benchmark timers\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Benchmarking memory allocations\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Modulo vs Bitwise-and\n \u003C\u002Fli\u003E\n \u003C\u002Ful\u003E\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Tooling\n \u003Cul\u003E\n \u003Cli\u003E\n Godoc\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Go Guru\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Race Detector\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Go Report Card\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Staticcheck\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Go-fuzz\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n govalidate\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Pinning tools with Go modules\n \u003C\u002Fli\u003E\n \u003C\u002Ful\u003E\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Security\n \u003Cul\u003E\n \u003Cli\u003E\n Keep Go Up to Date\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n CSRF\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n HTTP Strict Transport Security (HSTS)\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Content Security Policy (CSP)\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n SQL Injection\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n See Also\n \u003C\u002Fli\u003E\n \u003C\u002Ful\u003E\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Going into Production\n \u003Cul\u003E\n \u003Cli\u003E\n Continuous Integration & Continuous Deployment (CI\u002FCD)\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Deployment\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Logging\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Monitoring\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Alerting\n \u003C\u002Fli\u003E\n \u003C\u002Ful\u003E\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Further Reading\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Acknowledgements\n \u003Cul\u003E\n \u003Cli\u003E\n Licenses\n \u003C\u002Fli\u003E\n \u003C\u002Ful\u003E\n \u003C\u002Fli\u003E\n \u003Cli\u003E\n Notes\n \u003C\u002Fli\u003E\n\u003C\u002Ful\u003E\n","translated_from_id":null,"tweet_text":"Read Production Go on Leanpub!","unpublished_sample":true,"updated_at":"2024-11-20T10:12:24.000Z","vimeo_url":null,"available_web_book":true,"word_count":24166,"word_count_published":24166,"youtube_url":null,"team_discount_package_id":7354,"external_forum_url":null,"num_copies_sold":1662,"page_count":156,"percent_complete":85,"seo_title":"Production Go by Herman Schaaf et al. [Leanpub PDF\u002FiPad\u002FKindle]","title_direction":"ltr","past_editions_reader_count":[],"id":8877,"past_edition":null,"new_edition":null,"default_package":[{"id":7354,"type":"Package"}],"language":[{"id":124,"type":"Language"}],"translated_from":null,"accepted_authors":[{"id":9254,"type":"Author"},{"id":45706,"type":"Author"}],"positioned_accepted_authors":[{"id":9254,"type":"Author"},{"id":45706,"type":"Author"}],"packages":[{"id":7354,"type":"Package"}],"published_bundles":[],"positioned_testimonials":[],"past_editions":[],"translations":[],"contributors":[]}},"errors":{},"indexes":{"{\"landing\":true}":[8877]},"loading":{"{\"landing\":true}":false},"stats":{}},"BookPurchase":{"all":{},"errors":{},"indexes":{},"loading":{}},"Bundle":{"all":{},"errors":{},"indexes":{},"loading":{}},"BundlePackage":{"all":{},"errors":{},"indexes":{},"loading":{}},"BundlePurchase":{"all":{},"errors":{},"indexes":{},"loading":{}},"CartItem":{"all":{},"errors":{},"indexes":{},"loading":{}},"CartPurchase":{"all":{},"errors":{},"indexes":{},"loading":{}},"Category":{"all":{},"errors":{},"indexes":{},"loading":{}},"Cause":{"all":{},"errors":{},"indexes":{"{\"book_slug\":\"productiongo\"}":[]},"loading":{"{\"book_slug\":\"productiongo\"}":false}},"Chapter":{"all":{},"errors":{},"indexes":{},"loading":{},"dirty":false},"Choice":{"all":{},"errors":{},"indexes":{},"loading":{}},"CommunityEditionSignup":{"all":{},"errors":{},"indexes":{},"loading":{}},"Contributor":{"all":{},"errors":{},"indexes":{},"loading":{}},"CorrectChoice":{"all":{},"errors":{},"indexes":{},"loading":{}},"Coupon":{"all":{},"errors":{},"indexes":{},"loading":{},"newsletterCoupons":null,"newsletterCouponsLoading":false,"newsletterCouponsErrors":null},"Course":{"all":{},"errors":{},"indexes":{},"loading":{}},"CourseAttempt":{"all":{},"errors":{},"indexes":{},"loading":{}},"CourseAuthor":{"all":{},"errors":{},"indexes":{},"loading":{}},"CoursePurchase":{"all":{},"errors":{},"indexes":{},"loading":{}},"CourseSet":{"all":{},"errors":{},"indexes":{},"loading":{}},"CourseSetAttempt":{"all":{},"errors":{},"indexes":{},"loading":{}},"CourseSetPackage":{"all":{},"errors":{},"indexes":{},"loading":{}},"CourseSetPurchase":{"all":{},"errors":{},"indexes":{},"loading":{}},"CourseVersion":{"all":{},"errors":{},"indexes":{},"loading":{}},"CurrentUser":{"all":{},"errors":{},"indexes":{},"loading":{},"id":null},"Editor":{"all":{},"errors":{},"indexes":{},"loading":{}},"EditorFile":{"all":{},"errors":{},"indexes":{},"loading":{}},"EditorResource":{"all":{},"errors":{},"indexes":{},"loading":{}},"GoogleDocsBook":{"all":{},"errors":{},"indexes":{},"loading":{}},"Invitation":{"all":{},"errors":{},"indexes":{},"loading":{}},"Language":{"all":{"124":{"type":"Language","books_count":26604,"code":"eng","created_at":"2015-04-24T03:26:30.000Z","name":"English","code2":"en","direction":"ltr","updated_at":"2024-11-21T23:14:49.000Z","id":124}},"errors":{},"indexes":{},"loading":{}},"Notification":{"all":{},"errors":{},"indexes":{},"loading":{}},"Order":{"all":{},"errors":{},"indexes":{},"loading":{}},"OrderItem":{"all":{},"errors":{},"indexes":{},"loading":{}},"Package":{"all":{"7354":{"type":"Package","created_at":"2013-12-09T20:27:51.000Z","packagable_id":8877,"packagable_type":"Book","packagable_slug":"productiongo","allow_free_purchases":true,"description":"","free_minimum":true,"free_purchase_only":false,"free_purchase_requires_membership":false,"is_package":true,"leanpub_can_adjust_prices":false,"leanpub_can_create_team_discounts":false,"maximum_price":20,"minimum_paid_price":"7.99","name":"The Book","package":true,"quantity":1,"ratio_of_revenue_to_authors":"1.0","ratio_of_revenue_to_causes":"0.0","royalties_to_revenue_ratio":"0.8","short_about_the_book":null,"short_description":"","short_tagline":"\u003Cp\u003EProduction Go is the book about creating and maintaining modern production applications written...\u003C\u002Fp\u003E","show_what_author_gets":true,"show_what_cause_gets":false,"slug":"book","subtitle":"Build modern, production-ready web services in Go","suggested_price":"7.99","stripe_name":"Production Go","stripe_package_name":"The Book","stripe_description":"The Book","stripe_image":"https:\u002F\u002Fd2sofvawe08yqg.cloudfront.net\u002Fproductiongo\u002Fs_list2x?1620389943","tagline":"\u003Cp\u003EProduction Go is the book about creating and maintaining modern production applications written in Go. It assumes prior programming knowledge, and is recommended for professional programmers.\u003C\u002Fp\u003E","team_discount":false,"title":"Production Go","title_page_url_s_list":"https:\u002F\u002Fd2sofvawe08yqg.cloudfront.net\u002Fproductiongo\u002Fs_list?1620389943","title_page_url_s_shelf":"https:\u002F\u002Fd2sofvawe08yqg.cloudfront.net\u002Fproductiongo\u002Fs_shelf?1620389943","title_page_url_s_featured":"https:\u002F\u002Fd2sofvawe08yqg.cloudfront.net\u002Fproductiongo\u002Fs_featured?1620389943","title_page_url_s_hero":"https:\u002F\u002Fd2sofvawe08yqg.cloudfront.net\u002Fproductiongo\u002Fs_hero?1620389943","updated_at":"2018-11-02T06:46:22.000Z","id":7354,"packagable":[{"id":8877,"type":"Book"}],"asset_packagings":[],"assets":[]}},"errors":{},"indexes":{},"loading":{}},"PackageDiscount":{"all":{},"errors":{},"indexes":{},"loading":{}},"PartnerSale":{"all":{},"errors":{},"indexes":{},"loading":{}},"PendingProduct":{"all":{},"errors":{},"indexes":{},"loading":{}},"PendingServiceProduct":{"all":{},"errors":{},"indexes":{},"loading":{}},"Plan":{"all":{},"errors":{},"indexes":{},"loading":{}},"Podcast":{"all":{},"errors":{},"indexes":{},"loading":{}},"PodcastEpisode":{"all":{},"errors":{},"indexes":{},"loading":{}},"PossibleReader":{"all":{},"errors":{},"indexes":{},"loading":{},"showForm":true},"Publisher":{"all":{"1":{"links":{"self":"\u002Fp\u002Fleanpub"},"type":"Publisher","created_at":"2012-10-20T04:42:39.000Z","can_use_books_tab":true,"can_use_bundles_tab":true,"can_use_courses_tab":true,"can_use_course_sets_tab":true,"publisher_blurb":"\u003Cp\u003ELeanpub empowers authors to self-publish in-progress ebooks.\u003C\u002Fp\u003E","reversed_logo_url":"missing_avatar.jpg","logo_url":"https:\u002F\u002Fs3.amazonaws.com\u002Fpublisherlogos.leanpub.com\u002Flogos\u002F1\u002Fverso_page\u002Fleanpub_logo.png?1501739906","name":"Leanpub","slug":"leanpub","university":false,"about_university":null,"cover_url":"missing_avatar.jpg","cover_uploaded":false,"updated_at":"2017-08-03T05:58:28.000Z","has_subscription":true,"id":1,"editors":[]}},"errors":null,"indexes":{"{\"book_slug\":\"productiongo\"}":[1]},"loading":{"{\"book_slug\":\"productiongo\"}":false},"index":{},"slugValidity":null,"userValidity":null,"creating":false},"Purchase":{"all":{},"errors":{},"indexes":{},"loading":{},"markingAsPinged":{}},"PurchasedPackage":{"all":{},"errors":{},"indexes":{},"loading":{}},"Question":{"all":{},"errors":{},"indexes":{},"loading":{}},"QuestionAttempt":{"all":{},"errors":{},"indexes":{},"loading":{}},"QuestionWithHint":{"all":{},"errors":{},"indexes":{},"loading":{}},"Quiz":{"all":{},"errors":{},"indexes":{},"loading":{}},"QuizAttempt":{"all":{},"errors":{},"indexes":{},"loading":{}},"RetiredQuiz":{"all":{},"errors":{},"indexes":{},"loading":{}},"ServicePurchase":{"all":{},"errors":{},"indexes":{},"loading":{}},"ShelfBook":{"all":{},"errors":{},"indexes":{},"loading":{}},"ShelfSpot":{"all":{},"errors":{},"indexes":{},"loading":{},"shelfBooks":{},"full":[],"taxData":null,"options":null},"ShelfSpotOption":{"indexes":{},"globalAuthorPlansLoading":false,"all":{},"globalInstructodPlansErrors":null,"globalInstructodPlansLoading":false,"pricing":null,"globalAuthorPlansErrors":null,"errors":{},"pricingErrors":null,"pricingLoading":false,"globalInstructodPlans":null,"loading":{},"globalAuthorPlans":null},"ShoppingCart":{"cart":null,"errors":null,"loading":false},"SimpleAuthor":{"all":{},"errors":{},"indexes":{},"loading":{}},"SimpleBook":{"all":{},"errors":{},"indexes":{},"loading":{}},"SimpleBundle":{"all":{},"errors":{},"indexes":{},"loading":{}},"SimpleCourse":{"all":{},"errors":{},"indexes":{},"loading":{}},"SimpleCourseAuthor":{"all":{},"errors":{},"indexes":{},"loading":{}},"SimpleCourseSet":{"all":{},"errors":{},"indexes":{},"loading":{}},"SocialPost":{"all":{},"errors":{},"indexes":{},"loading":{}},"StepFunctionExecution":{"all":{},"errors":{},"indexes":{},"loading":{}},"StoreBook":{"all":{},"errors":{},"indexes":{},"loading":{}},"Subscription":{"all":{},"errors":{},"loading":{},"taxData":{}},"TaxInfo":{"all":{},"errors":{},"indexes":{},"loading":{}},"Testimonial":{"all":{},"errors":{},"indexes":{},"loading":{}},"Theme":{"all":{},"errors":{},"indexes":{},"loading":{}},"Transcript":{"all":{},"errors":{},"indexes":{},"loading":{}},"User":{"all":{"182421":{"type":"User","avatar_url_full":"https:\u002F\u002Fd39qdlcrvnra4b.cloudfront.net\u002Favatars\u002F182421\u002Ffull\u002Fherman.png?1506027429","avatar_url_medium":"https:\u002F\u002Fd39qdlcrvnra4b.cloudfront.net\u002Favatars\u002F182421\u002Fmedium\u002Fherman.png?1506027429","avatar_url_small":"https:\u002F\u002Fd39qdlcrvnra4b.cloudfront.net\u002Favatars\u002F182421\u002Fsmall\u002Fherman.png?1506027429","avatar_url_tiny":"https:\u002F\u002Fd39qdlcrvnra4b.cloudfront.net\u002Favatars\u002F182421\u002Ftiny\u002Fherman.png?1506027429","created_at":"2013-08-22T13:41:31.000Z","facebook_url":null,"family_name_pp":"Schaaf","githubname":"hermanschaaf","given_names_pp":"Herman","instagramname":null,"latest_podcast_episode":null,"linkedinname":null,"mastodon_name":null,"mastodon_url":"","name":"Herman Schaaf","profile_blurb":"\u003Cp\u003ELondon-based software engineer developing production Go systems at Skyscanner.\u003C\u002Fp\u003E","twittername":"ironzeb","unpaid_royalties":"19.2","updated_at":"2022-06-24T07:39:09.000Z","username":"hermanschaaf","wishlist_count":1,"wishlist_id":1111997,"youtube_name":null,"id":182421},"1155130":{"type":"User","avatar_url_full":"https:\u002F\u002Fd39qdlcrvnra4b.cloudfront.net\u002Favatars\u002F1155130\u002Ffull\u002Fs.png?1505953941","avatar_url_medium":"https:\u002F\u002Fd39qdlcrvnra4b.cloudfront.net\u002Favatars\u002F1155130\u002Fmedium\u002Fs.png?1505953941","avatar_url_small":"https:\u002F\u002Fd39qdlcrvnra4b.cloudfront.net\u002Favatars\u002F1155130\u002Fsmall\u002Fs.png?1505953941","avatar_url_tiny":"https:\u002F\u002Fd39qdlcrvnra4b.cloudfront.net\u002Favatars\u002F1155130\u002Ftiny\u002Fs.png?1505953941","created_at":"2017-09-20T10:28:32.000Z","facebook_url":null,"family_name_pp":"Smith","githubname":"shawnps","given_names_pp":"Shawn","instagramname":null,"latest_podcast_episode":null,"linkedinname":null,"mastodon_name":null,"mastodon_url":"","name":"Shawn Smith","profile_blurb":"\u003Cp\u003EShawn Smith is a software engineer based in Japan. His first contribution to Go was in Fall 2012, and he's been using Go primarily ever since.\u003C\u002Fp\u003E","twittername":"shawnps","unpaid_royalties":"19.2","updated_at":"2018-11-03T02:42:39.000Z","username":"shawnps","wishlist_count":0,"wishlist_id":1987927,"youtube_name":null,"id":1155130}},"errors":null,"indexes":{},"loading":{},"sessionErrors":null,"errorMap":{},"gdpr_status":null},"UserDropdownData":{"all":{},"errors":{},"indexes":{},"loading":{}},"Wishlist":{"all":{},"errors":{},"indexes":{},"loading":{}},"WishlistItem":{"all":{},"errors":{},"indexes":{},"loading":{}},"WritingPurchase":{"all":{},"errors":null,"loading":{},"slugValidity":null,"userValidity":null,"creating":false},"AuthorRoyalty":{"royalties":null},"AuthorPlan":{"plan":null},"Audio":{"src":null,"isPaused":true,"isMuted":false,"isLoaded":false,"currentTime":0,"duration":0},"CoursePage":{"all":{},"loading":{},"errors":{}},"Flash":{"all":{}},"Geoip":{"country_code":"US"},"Mailchimp":{"errors":{},"loading":{},"subscriptionStatus":{}},"MetricsEntry":{"all":{},"errors":{},"indexes":{},"loading":{}},"NumReader":{"all":{},"errors":{},"loading":{}},"PublishWord":{"indexes":{},"all":{},"upload":null,"aiUsageOptions":null,"errors":{},"uploadErrors":null,"aiUsageOptionsErrors":null,"aiUsageOptionsLoading":false,"uploadLoading":false,"loading":{}},"Portion":{"all":{},"errors":{},"indexes":{},"loading":{}},"ReadUrl":{"all":{},"loading":{},"errors":{}},"Request":{"requests":{"https:\u002F\u002Fleanpub.com\u002Fapi\u002Fv1\u002Fcache\u002Fbooks\u002Fproductiongo.json?landing=true&preset_include=book_show":false,"https:\u002F\u002Fleanpub.com\u002Fapi\u002Fv1\u002Fcache\u002Fcauses.json?book_slug=productiongo":false,"https:\u002F\u002Fleanpub.com\u002Fapi\u002Fv1\u002Fcache\u002Fpublishers.json?book_slug=productiongo&include=editors":false},"wait":0,"statusCode":200},"router":{"location":{"pathname":"\u002F","search":"","hash":"","key":"y4yxro"},"action":"POP"},"TranslateWord":{"indexes":{},"all":{},"upload":null,"languageOptions":null,"pricing":null,"errors":{},"uploadErrors":null,"pricingErrors":null,"languageOptionsErrors":null,"languageOptionsLoading":false,"pricingLoading":false,"uploadLoading":false,"loading":{}},"Translation":{"loadedTranslations":{},"loadingTranslation":false,"currentLocale":"en","errors":{}},"UI":{"syntax":"color","minimap":false,"showHeader":true,"gutterActionsPosition":{},"settingsOpen":false,"currentBookSlug":null,"courseSidebarClosed":false,"visualEditorFocusMode":false,"currentEditorTab":"manuscript","fontSize":16,"packagableType":null,"gutterActionsMenuVisibility":false,"currentFilenames":{"manuscript":null,"resources":null,"images":null,"code":null},"gutterActionsVisibility":false,"bodyIsLocked":false,"showFooter":true,"headerHTML":"\u003Cspan\u003EEarn \u003Cb\u003E80% Royalties\u003C\u002Fb\u003E publishing \u003Cb\u003Eebooks\u003C\u002Fb\u003E and \u003Cb\u003Ecourses\u003C\u002Fb\u003E on Leanpub\u003C\u002Fspan\u003E","darkMode":false,"focusMode":false}}</script> <script src="https://leanpub.com/assets/polyfill-bundle-f2bf261e3f0b57d19161.js"></script> <script src="https://leanpub.com/assets/app-bundle-c25fedbf67e4e3860c3d.js"></script> <!-- Twitter universal website tag code --> <script> !function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments); },s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='//static.ads-twitter.com/uwt.js', a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script'); // Insert Twitter Pixel ID and Standard Event data below twq('init','nw0pa'); twq('track','PageView'); </script> <!-- End Twitter universal website tag code --> </html>