{"version":3,"sources":["webpack:///./src/views/Chap33ApplicationConfiguration.vue?2977","webpack:///src/views/Chap33ApplicationConfiguration.vue","webpack:///./src/views/Chap33ApplicationConfiguration.vue?1abb","webpack:///./src/views/Chap33ApplicationConfiguration.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","_v","directives","name","rawName","pre","staticRenderFns","components","FeedbackInvite","BuyCopyInvite","NewsletterInput","ChapterHeading","ChapterBibliography","TOCChapter","NavBar","BIconLink45deg","Footer","created","window","data","publicPath","metaInfo","title","htmlAttrs","lang","meta","charset","content","property","link","rel","href","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,UAAUA,EAAG,MAAM,CAACE,YAAY,mBAAmB,CAACF,EAAG,QAAQ,CAACA,EAAG,aAAa,CAACG,MAAM,CAAC,aAAa,oCAAoCH,EAAG,SAASA,EAAG,QAAQ,CAACG,MAAM,CAAC,KAAO,OAAO,GAAK,MAAM,CAACH,EAAG,iBAAiB,CAACG,MAAM,CAAC,gBAAgB,wCAAwC,aAAa,aAAa,YAAY,+BAA+BH,EAAG,MAAM,CAACE,YAAY,SAASC,MAAM,CAAC,GAAK,yCAAyCH,EAAG,KAAK,CAACG,MAAM,CAAC,cAAc,MAAM,CAACH,EAAG,OAAO,CAACE,YAAY,yBAAyB,CAACN,EAAIQ,GAAG,OAAOR,EAAIQ,GAAG,0CAA0CJ,EAAG,IAAI,CAACG,MAAM,CAAC,KAAO,yCAAyC,CAACH,EAAG,mBAAmB,CAACE,YAAY,oBAAoBC,MAAM,CAAC,aAAa,UAAU,KAAKH,EAAG,KAAK,CAACA,EAAG,KAAK,CAACA,EAAG,IAAI,CAACJ,EAAIQ,GAAG,wCAAwCJ,EAAG,KAAK,CAACA,EAAG,IAAI,CAACJ,EAAIQ,GAAG,sDAAsDJ,EA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AANA,SACA,CAAMC,SAANA,UAAMD,QAANA,WACA,CAAMC,SAANA,WAAMD,QAANA,GACA,CAAMC,SAANA,iBAAMD,QAANA,GACA,CAAMC,SAANA,SAAMD,QAANA,sBACA,CAAMC,SAANA,eAAMD,QAANA,wBACA,CAAMC,SAANA,eAAMD,QAANA,uBACA,CAAMC,SAANA,kBAAMD,QAANA,mBAEIE,KAAJA,CACA,CAAMC,IAANA,YAAMC,KAANA,yBCrbwW,I,YCOpWC,EAAY,eACd,EACAxC,EACAc,GACA,EACA,KACA,WACA,MAIa,aAAA0B,E","file":"js/chunk-2d0a496f.299da2a1.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('NavBar'),_c('div',{staticClass:\"container-fluid\"},[_c('b-row',[_c('TOCChapter',{attrs:{\"chapter-id\":\"Chap33ApplicationConfiguration\"}}),_c('b-col'),_c('b-col',{attrs:{\"role\":\"main\",\"md\":\"6\"}},[_c('ChapterHeading',{attrs:{\"chapter-title\":\"Chapter 33: Application Configuration\",\"image-name\":\"config.jpg\",\"image-alt\":\"Application Configuration\"}}),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"what-will-you-learn-in-this-chapter\"}}),_c('h1',{attrs:{\"data-number\":\"1\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"1\")]),_vm._v(\" What will you learn in this chapter? \"),_c('a',{attrs:{\"href\":\"#what-will-you-learn-in-this-chapter\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('ul',[_c('li',[_c('p',[_vm._v(\"How to configure an application?\")])]),_c('li',[_c('p',[_vm._v(\"How to add a command-line option to a program?\")])]),_c('li',[_c('p',[_vm._v(\"How to create and parse environment variables?\")])])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"technical-concepts-covered\"}}),_c('h1',{attrs:{\"data-number\":\"2\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"2\")]),_vm._v(\" Technical concepts covered \"),_c('a',{attrs:{\"href\":\"#technical-concepts-covered\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('ul',[_c('li',[_c('p',[_vm._v(\"Environment variable\")])]),_c('li',[_c('p',[_vm._v(\"Unmarshal\")])]),_c('li',[_c('p',[_vm._v(\"Command-line options\")])])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"introduction\"}}),_c('h1',{attrs:{\"data-number\":\"3\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"3\")]),_vm._v(\" Introduction \"),_c('a',{attrs:{\"href\":\"#introduction\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"When we write programs for ourselves, we are (often) writing directly in the source code some important options, like, for instance, the port on which our server will listen, the name of the database we are using... But what if you attempt to share your program with others? There is a significant probability that your users will not use the same database name as you are using in the development phase; they will also want to use another port for their server!\")]),_c('p',[_vm._v(\"And what about security! Do you want everybody to know your database password? You should not commit credentials in your code.\")]),_c('p',[_vm._v(\"In this section, we will cover how you can configure your applications.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"what-is-it\"}}),_c('BuyCopyInvite'),_c('h1',{attrs:{\"data-number\":\"4\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"4\")]),_vm._v(\" What is it? \"),_c('a',{attrs:{\"href\":\"#what-is-it\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"An application is configurable when it offers users the possibility of control the aspects of execution \"),_c('b-link',{staticClass:\"citation\",attrs:{\"data-cites\":\"rabkin2011static\",\"href\":\"#rabkin2011static\"}},[_vm._v(\"[@rabkin2011static]\")]),_vm._v(\". For instance, users can define the port on which a server will listen, the database credentials, the duration of the timeout of HTTP requests...\")],1),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"how-to-do-it\"}}),_c('h1',{attrs:{\"data-number\":\"5\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"5\")]),_vm._v(\" How to do it? \"),_c('a',{attrs:{\"href\":\"#how-to-do-it\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"In many open-source applications, the configuration is handled via key-value data structure \"),_c('b-link',{staticClass:\"citation\",attrs:{\"data-cites\":\"rabkin2011static\",\"href\":\"#rabkin2011static\"}},[_vm._v(\"[@rabkin2011static]\")]),_vm._v(\". Options are often denoted by a unique name. Unix systems use strings as option names. Windows use a tree structure.\")],1),_c('p',[_vm._v(\"In a real-world application, you often find a class (or a type struct) that exposes the configuration options. This class often parses a file to attribute values to each option. Applications often propose command-line options to adjust configurations.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"command-line-options\"}}),_c('h1',{attrs:{\"data-number\":\"6\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"6\")]),_vm._v(\" Command-line options \"),_c('a',{attrs:{\"href\":\"#command-line-options\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"To define a named command-line option, we can use the standard package \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"flag\")])]),_vm._v(\".\")]),_c('p',[_vm._v(\"Let’s take an example. You are building a REST API. Your application will expose a web server; you want the listening port to be configurable by the user.\")]),_c('p',[_vm._v(\"The first step is to define the new flag :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// configuration/cli/main.go \\n\\nport := flag.Int(\\\"port\\\", 4242, \\\"the port on which the server will listen\\\")\")])]),_c('p',[_vm._v(\"The first argument is the flag name; the second one is the default value; the third is the help text. The returned variable will be a pointer to an integer.\")]),_c('p',[_vm._v(\"There is an alternative syntax available. You first define a variable, then you pass a pointer to that variable as argument of the \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"IntVar\")])]),_vm._v(\" function :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"var port int\\nflag.IntVar(&port, \\\"port\\\", 4242, \\\"the port on which the server will listen\\\")\")])]),_c('p',[_vm._v(\"The next step is to parse the flags :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"flag.Parse()\")])]),_c('p',[_vm._v(\"The function \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"Parse\")])]),_vm._v(\" has to be called \"),_c('strong',[_vm._v(\"before\")]),_vm._v(\" using the variables that you defined. Internally it will iterate over all the arguments given in the command line and assign values to the flags you have defined.\")]),_c('p',[_vm._v(\"In the first version (\"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"flag.Int\")])]),_vm._v(\") the variable will be a pointer to an integer (\"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"*int\")])]),_vm._v(\"). In the second version (\"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"flag.Intvar\")])]),_vm._v(\") will be of type integer (\"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"int\")])]),_vm._v(\"). This specificity changes the way you use the variable afterward:\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// version 1 : Int\\n\\nport := flag.Int(\\\"port\\\", 4242, \\\"the port on which the server will listen\\\")\\nflag.Parse()\\nfmt.Printf(\\\"%d\\\",*port)\\n\\n// version 2 : IntVar\\n\\nvar port2 int flag.IntVar(&port2, \\\"port2\\\", 4242, \\\"the port on which the server will listen\\\") flag.Parse()\\nfmt.Printf(\\\"%d\\\\n\\\",port2)\")])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"other-types\"}}),_c('h3',{attrs:{\"data-number\":\"6.0.1\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"6.0.1\")]),_vm._v(\" Other types \"),_c('a',{attrs:{\"href\":\"#other-types\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"The \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"flag\")])]),_vm._v(\" package expose functions to add flags that have different types. Here is a list of the types on the left and the flag package’s corresponding functions.\")]),_c('div',{staticClass:\"list\"},[_c('p',[_vm._v(\"Int64, Int64Var\")]),_c('p',[_vm._v(\"String, StringVar\")]),_c('p',[_vm._v(\"Uint, UintVar\")]),_c('p',[_vm._v(\"Uint64, Uint64Var\")]),_c('p',[_vm._v(\"Float64, Float64Var\")]),_c('p',[_vm._v(\"Duration, DurationVar\")]),_c('p',[_vm._v(\"Bool, BoolVar\")])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"usage-in-the-command-line\"}}),_c('h3',{attrs:{\"data-number\":\"6.0.2\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"6.0.2\")]),_vm._v(\" Usage in the command line \"),_c('a',{attrs:{\"href\":\"#usage-in-the-command-line\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"To pass the specified flags to your program you have two options :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"$ myCompiledGoProgram -port=4242\")])]),_c('p',[_vm._v(\"or\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"$ myCompiledGoProgram -port 4242\")])]),_c('p',[_vm._v(\"This last usage is forbidden for boolean flags. Instead, the user of your application can set the flag to true by simply writing :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"$ myCompiledGoProgram -myBoolFlag\")])]),_c('p',[_vm._v(\"By doing so, the variable behind the flag will be set to true.\")]),_c('p',[_vm._v(\"To get a view of all flags available, you can use the help flag (which is added by default to your program !)\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"$ ./myCompiledGoProgram -help\\nUsage of ./myCompiledProgram:\\n -myBool\\n a test boolean\\n -port int\\n the port on which the server will listen (default 4242)\\n -port2 int\\n the port on which the server will listen (default 4242)\")])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"environment-variables\"}}),_c('h1',{attrs:{\"data-number\":\"7\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"7\")]),_vm._v(\" Environment variables \"),_c('a',{attrs:{\"href\":\"#environment-variables\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"Some cloud services support configuration via environment variables. Environment variables are easy to set with the export command. To create an environment variable named MYVAR, just type the following command in your terminal\"),_c('a',{staticClass:\"footnote-ref\",attrs:{\"href\":\"#fn1\",\"id\":\"fnref1\",\"role\":\"doc-noteref\"}},[_c('sup',[_vm._v(\"1\")])]),_vm._v(\" :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"$ export MYVAR=value\")])]),_c('p',[_vm._v(\"If you want to pass environment variables to your application, use the following syntax\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"$ export MYVAR=test && export MYVAR2=test2 && ./myCompiledProgram\")])]),_c('p',[_vm._v(\"Here we are setting two environment variables, and then we launch the program \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"myCompiledProgram\")])]),_c('strong',[_vm._v(\".\")])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"how-to-get-an-environment-variable-value\"}}),_c('h3',{attrs:{\"data-number\":\"7.0.1\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"7.0.1\")]),_vm._v(\" How to get an environment variable value \"),_c('a',{attrs:{\"href\":\"#how-to-get-an-environment-variable-value\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"To retrieve the value of an environment variable, you can use the \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"os\")])]),_vm._v(\" standard package. The package exposes a function named \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"Getenv\")])]),_vm._v(\". This function takes the name of the variable as argument and returns its value (as a string) :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// configuration/env/main.go \\nmyvar := os.Getenv(\\\"MYVAR\\\")\\nmyvar2 := os.Getenv(\\\"MYVAR2\\\")\\nfmt.Printf(\\\"myvar : '%s'\\\\n\\\", myvar)\\nfmt.Printf(\\\"myvar2 :'%s'\\\\n\\\", myvar2)\")])]),_c('p',[_vm._v(\"Another method allows you to retrieve environment variables : \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"LookupEnv\")])]),_vm._v(\". It’s better than the previous one because it will inform you if the variable is not present :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// configuration/env/main.go \\nport, found := os.LookupEnv(\\\"DB_PORT\\\")\\nif !found {\\n log.Fatal(\\\"impossible to start up, DB_PORT env var is mandatory\\\")\\n}\\nportParsed, err := strconv.ParseUint(port, 10, 8)\\nif err != nil {\\n log.Fatalf(\\\"impossible to parse db port: %s\\\", err)\\n}\\nlog.Println(portParsed)\")])]),_c('p',[_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"LookupEnv\")])]),_vm._v(\" will check if the environment variable exists\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"If it does not exists, the second result (\"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"found\")])]),_vm._v(\") will be equal to \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"false\")])])])]),_c('li',[_c('p',[_vm._v(\"In the previous example, we parse the port retrieved into an uint16 (base 10) with \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"strconv.ParseUint\")])])])])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"how-to-get-all-environment-variables\"}}),_c('h3',{attrs:{\"data-number\":\"7.0.2\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"7.0.2\")]),_vm._v(\" How to get ALL environment variables \"),_c('a',{attrs:{\"href\":\"#how-to-get-all-environment-variables\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"You can also get all the environment variables with the function Environ(), which will return a slice of strings :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"fmt.Println(os.Environ())\")])]),_c('p',[_vm._v(\"The returned slice is composed of all the variables in the format “key=value”. Each element of the slice is a key-value pair. The package does not isolate the value from the key. You have to parse the slice values.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"how-to-set-an-environment-variable\"}}),_c('h3',{attrs:{\"data-number\":\"7.0.3\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"7.0.3\")]),_vm._v(\" How to set an environment variable \"),_c('a',{attrs:{\"href\":\"#how-to-set-an-environment-variable\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"The os package exposes the \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"os.Setenv\")])]),_vm._v(\" function :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"err := os.Setenv(\\\"MYVAR3\\\",\\\"test3\\\")\\nif err != nil {\\n panic(err)\\n}\")])]),_c('p',[_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"os.Setenv\")])]),_vm._v(\" takes two arguments :\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"the name of the variable to set\")])]),_c('li',[_c('p',[_vm._v(\"its value.\")])])]),_c('p',[_vm._v(\"Note that this can generate an error. You have to handle that error.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"file-based-configuration\"}}),_c('BuyCopyInvite'),_c('h1',{attrs:{\"data-number\":\"8\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"8\")]),_vm._v(\" File-based configuration \"),_c('a',{attrs:{\"href\":\"#file-based-configuration\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"Configuration can also be saved in a file and parsed automatically by the application.\")]),_c('p',[_vm._v(\"The format of the file depends on the needs of the application. If you need a complex configuration with levels and hierarchy (in the fashion of the Windows Registry), then you might need to think about formats like JSON, YAML, or XML.\")]),_c('p',[_vm._v(\"Let’s take the example of a JSON configuration file :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"{\\n \\\"server\\\": {\\n \\\"host\\\": \\\"localhost\\\",\\n \\\"port\\\": 80\\n },\\n \\\"database\\\": {\\n \\\"host\\\": \\\"localhost\\\",\\n \\\"username\\\": \\\"myUsername\\\",\\n \\\"password\\\": \\\"abcdefgh\\\"\\n }\\n}\")])]),_c('p',[_vm._v(\"We will place this file somewhere in the machine that hosts the application. We have to parse this file inside the application to get those configuration values.\")]),_c('p',[_vm._v(\"To parse it, we first have to create a type struct in our program :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// configuration/file/main.go \\ntype Configuration struct {\\n Server Server `json:\\\"server\\\"`\\n Database DB `json:\\\"database\\\"`\\n}\\ntype Server struct {\\n Host string `json:\\\"host\\\"`\\n Port int `json:\\\"port\\\"`\\n}\\ntype DB struct {\\n Host string `json:\\\"host\\\"`\\n Username string `json:\\\"username\\\"`\\n Password string `json:\\\"password\\\"`\\n}\")])]),_c('p',[_vm._v(\"We create three types struct :\")]),_c('ul',[_c('li',[_c('p',[_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"Configuration\")])]),_vm._v(\" that will group the two other types :\")])]),_c('li',[_c('p',[_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"Server\")])]),_vm._v(\" that holds the properties of the JSON object \"),_c('strong',[_vm._v(\"server\")])])]),_c('li',[_c('p',[_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"DB\")])]),_vm._v(\" that store the properties of the JSON object \"),_c('strong',[_vm._v(\"database\")])])])]),_c('p',[_vm._v(\"Those type structs will allow you to unmarshal the JSON configuration file. The next step is to open the file and read its content :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// configuration/file/main.go \\n\\nconfFile, err := os.Open(\\\"myConf.json\\\")\\nif err != nil {\\n panic(err)\\n}\\ndefer confFile.Close()\\nconf, err := ioutil.ReadAll(confFile)\\nif err != nil {\\n panic(err)\\n}\")])]),_c('p',[_vm._v(\"Here we are calling \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"os.Open\")])]),_vm._v(\" to open the file \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"\\\"myConf.json\\\"\")])]),_vm._v(\" located for the example in the same directory as the executable. In real life, you should upload this file to an appropriate location on the machine.\")]),_c('p',[_vm._v(\"We get the whole content of the file by using \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"ioutil.ReadAll\")])]),_vm._v(\". This function returns a slice of bytes. The next step is to use this slice of raw bytes with \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"json.Unmarshal\")])]),_vm._v(\" :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// configuration/file/main.go \\n\\nmyConf := Configuration{}\\nerr = json.Unmarshal(conf, &myConf)\\nif err != nil {\\n panic(err)\\n}\\nfmt.Printf(\\\"%+v\\\",myConf)\")])]),_c('p',[_vm._v(\"We create a variable \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"myConf\")])]),_vm._v(\" that is initialized with an empty struct \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"Configuration\")])]),_c('strong',[_vm._v(\".\")]),_vm._v(\"Then we pass to \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"json.Unmarshal\")])]),_vm._v(\" the variable conf that contains the slice of bytes extracted from the file, and (as the second argument) a pointer to \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"myConf\")])]),_c('strong',[_vm._v(\".\")])]),_c('p',[_vm._v(\"In the end, our program outputs the following :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"{Server:{Host:localhost Port:80} Database:{Host:localhost Username:myUsername Password:abcdefgh}}\")])]),_c('p',[_vm._v(\"You can then share this variable with the whole application.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"the-github.comspf13viper-module\"}}),_c('h1',{attrs:{\"data-number\":\"9\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"9\")]),_vm._v(\" The github.com/spf13/viper module \"),_c('a',{attrs:{\"href\":\"#the-github.comspf13viper-module\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"The module \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"github.com/spf13/viper\")])]),_vm._v(\" is at the time of writing very popular among the Go community. It has more than 14.000 stars and more than 1.3k forks\"),_c('a',{staticClass:\"footnote-ref\",attrs:{\"href\":\"#fn2\",\"id\":\"fnref2\",\"role\":\"doc-noteref\"}},[_c('sup',[_vm._v(\"2\")])]),_vm._v(\".\")]),_c('p',[_vm._v(\"This package allows you to simply define a configuration for your application from files, environment variables, command line, buffers... It also supports an interesting feature: if your configuration changes during your application’s lifetime, it will be reloaded.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"read-from-a-file\"}}),_c('h2',{attrs:{\"data-number\":\"9.1\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"9.1\")]),_vm._v(\" Read from a file \"),_c('a',{attrs:{\"href\":\"#read-from-a-file\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"Let’s give it a try :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// configuration/viper/main.go \\n//...\\n// import \\\"github.com/spf13/viper\\\"\\nviper.SetConfigName(\\\"myConf\\\")\\nviper.(\\\".\\\")\\nerr := viper.ReadInConfig()\\nif err != nil {\\n log.Panicf(\\\"Fatal error config file: %s\\\\n\\\", err)\\n}\")])]),_c('p',[_vm._v(\"First, you have to define the name of the config file you want to load :\"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"viper.SetConfigName(\\\"myConf\\\")\")])]),_vm._v(\". Here we are loading the file named \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"myConf\")])]),_vm._v(\". Note that we do not give viper the extension name of the file. It will retrieve the correct encoding and parse the file.\")]),_c('p',[_vm._v(\"In the next line, we have to tell viper were to search with the function\"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"AddConfigPath\")])]),_vm._v(\". The point means “look in the current directory” for a file named myConf. The supported extension at the time of writing are :\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"json,\")])]),_c('li',[_c('p',[_vm._v(\"toml,\")])]),_c('li',[_c('p',[_vm._v(\"yaml,\")])]),_c('li',[_c('p',[_vm._v(\"yml,\")])]),_c('li',[_c('p',[_vm._v(\"properties,\")])]),_c('li',[_c('p',[_vm._v(\"props,\")])]),_c('li',[_c('p',[_vm._v(\"prop,\")])]),_c('li',[_c('p',[_vm._v(\"hcl\")])])]),_c('p',[_vm._v(\"Note that we could have added another path to search for config. The \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"AddConfigPath\")])]),_vm._v(\" function will append the path to a slice.\")]),_c('p',[_vm._v(\"When we call \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"ReadInConfig\")])]),_vm._v(\", the package will look for the file specified.\")]),_c('p',[_vm._v(\"You can then use the configuration loaded :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"fmt.Println(viper.AllKeys())\\n//[database.username database.password server.host server.port database.host]\\nfmt.Println(viper.GetString(\\\"database.username\\\"))\\n// myUsername\")])]),_c('p',[_vm._v(\"With the \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"AllKeys\")])]),_vm._v(\" function, you can retrieve all the existing configuration keys of your application. To read a specific configuration variable, you can use the function \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"GetString\")])]),_vm._v(\".\")]),_c('p',[_vm._v(\"The \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"GetString\")])]),_vm._v(\" function takes as parameter the key of the configuration option. The key is a reflection of the configuration file hierarchy. Here \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"\\\"database.username\\\"\")])]),_vm._v(\" means that we access the value of the property \"),_c('strong',[_vm._v(\"username\")]),_vm._v(\" from the object \"),_c('strong',[_vm._v(\"database\")]),_vm._v(\".\")]),_c('p',[_vm._v(\"The database object also has the property host. To access it, the key is simply \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"\\\"database.host\\\"\")])]),_vm._v(\".\")]),_c('p',[_vm._v(\"Viper exposes \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"GetXXX\")])]),_vm._v(\" functions for the types \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"bool\")])]),_vm._v(\", \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"float64\")])]),_vm._v(\", \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"int\")])]),_vm._v(\" , \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"string\")])]),_vm._v(\" , \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"map[string]interface{}\")])]),_vm._v(\", \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"map[string]string\")])]),_vm._v(\", slice of strings, time, and duration. It’s also possible to simply use Get to retrieve a configuration value. The returning type of this last function is the empty interface. I do not recommend it because it can lead to type errors. In our case, we are expecting a string, but if a user puts an integer into the config file, it will return an int. Your program will not work as expected and might panic.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"read-from-environment-variables\"}}),_c('h2',{attrs:{\"data-number\":\"9.2\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"9.2\")]),_vm._v(\" Read from environment variables \"),_c('a',{attrs:{\"href\":\"#read-from-environment-variables\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"Viper can parse environment variables automatically with a prefix :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"viper.SetEnvPrefix(\\\"myapp\\\")\\nviper.AutomaticEnv()\")])]),_c('p',[_vm._v(\"With those two lines, each time, you will call a getter method (\"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"GetString\")])]),_vm._v(\", \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"GetBool\")])]),_vm._v(\", ...) viper will look for environment variables with the prefix MYAPP_ :\")]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"fmt.Println(viper.GetInt(\\\"timeout\\\"))\")])]),_c('p',[_vm._v(\"will look for the value of an environment variable named \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"MYAPP_TIMEOUT\")])]),_vm._v(\".\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"problems-and-how-to-avoid-them\"}}),_c('h1',{attrs:{\"data-number\":\"10\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"10\")]),_vm._v(\" Problems and how to avoid them \"),_c('a',{attrs:{\"href\":\"#problems-and-how-to-avoid-them\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"missing-documentation\"}}),_c('h2',{attrs:{\"data-number\":\"10.1\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"10.1\")]),_vm._v(\" Missing documentation \"),_c('a',{attrs:{\"href\":\"#missing-documentation\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"Many projects are suffering from a lack of documentation concerning their configuration options.\")]),_c('p',[_vm._v(\"By documenting every single option available in a separate file, you are lowering your software’s adoption barrier.\")]),_c('p',[_vm._v(\"Inside a company, you might not be the person who will handle your application’s deployment. Hence you have to include in your estimates the documentation time. Better documentation means a reduced time to market for your solution.\")]),_c('p',[_vm._v(\"The interesting study of Ariel Rabkin and Randy Katz from the Berkeley University \"),_c('b-link',{staticClass:\"citation\",attrs:{\"data-cites\":\"rabkin2011static\",\"href\":\"#rabkin2011static\"}},[_vm._v(\"[@rabkin2011static]\")]),_vm._v(\" demonstrated that even for large open-source projects (they studied seven large projects like Cassandra, Hadoop, HBase...) the documentation of configuration was inaccurate :\")],1),_c('ul',[_c('li',[_c('p',[_vm._v(\"There are mentions of configuration options that do not exist in the application’s source code. They noted that sometimes the options are simply commented into the application source code.\")])]),_c('li',[_c('p',[_vm._v(\"Some options exist in the application source code that are not even documented.\")])])]),_c('p',[_vm._v(\"The solution is easy: create precise documentation of your configuration options and keep it up to date when the project evolves.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"configuration-mistakes\"}}),_c('h2',{attrs:{\"data-number\":\"10.2\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"10.2\")]),_vm._v(\" Configuration mistakes \"),_c('a',{attrs:{\"href\":\"#configuration-mistakes\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"During a study \"),_c('b-link',{staticClass:\"citation\",attrs:{\"data-cites\":\"nagaraja2004understanding\",\"href\":\"#nagaraja2004understanding\"}},[_vm._v(\"[@nagaraja2004understanding]\")]),_vm._v(\" technical operators were asked to perform operations on a realistic internet system (three-tier auction application). It has been observed that 50% of errors were configuration errors!\")],1),_c('p',[_vm._v(\"This figure is impressive and also very interesting. Systems can fail because of configuration mistakes. You cannot protect yourself against users that put the wrong port number in the configuration. But your application can protect itself from wrong configuration.\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"By detecting it and alerting the user.\")])]),_c('li',[_c('p',[_vm._v(\"By not replacing a fraudulent value with the default one.\")])])]),_c('pre',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\"}},[_vm._v(\"// configuration/error-detection/main.go \\n//...\\ndbPortRaw := os.Getenv(\\\"DATABASE_PORT\\\")\\ndbPort, err := strconv.ParseUint(port, 10, 16)\\nif err != nil {\\n log.Panicf(\\\"Impossible to parse database port number '%s'. Please double check the env variable DATABASE_PORT\\\",dbPortRaw)\\n}\")])]),_c('p',[_vm._v(\"In the previous code listing, we are retrieving the value of the environment variable \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"DATABASE_PORT\")])]),_vm._v(\". We then attempt to convert it to an \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"uint16\")])]),_vm._v(\". If an error occurs, we refuse to start the application and inform the user about what’s wrong.\")]),_c('p',[_vm._v(\"Note here that we tell the user what to do to fix this error. This is a good practice, it only takes you 10 seconds to write, but it might save 1 hour of research to your user.\")]),_c('p',[_vm._v(\"Double-check also that the program effectively uses all your configuration variables.\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"security\"}}),_c('h1',{attrs:{\"data-number\":\"11\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"11\")]),_vm._v(\" Security \"),_c('a',{attrs:{\"href\":\"#security\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('p',[_vm._v(\"Configuration variables are often composed of secrets: passwords, access tokens, encryption keys... A potential leak of those secrets may cause harm. None of the solutions above are perfect to store and secure production secrets. Rotation of those secrets is also not easy with the solution evoked before.\")]),_c('p',[_vm._v(\"Some open-source solutions exist to handle this very specific issue. They offer a large set of features to protect, monitor, and audit the usage of your secrets. At the time of writing, it seems that Vault, edited by Hashicorp, is the most popular.\"),_c('a',{staticClass:\"footnote-ref\",attrs:{\"href\":\"#fn3\",\"id\":\"fnref3\",\"role\":\"doc-noteref\"}},[_c('sup',[_vm._v(\"3\")])]),_vm._v(\" And it’s written in Go!\")]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"test-yourself\"}}),_c('BuyCopyInvite'),_c('h1',{attrs:{\"data-number\":\"12\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"12\")]),_vm._v(\" Test yourself \"),_c('a',{attrs:{\"href\":\"#test-yourself\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"questions\"}}),_c('h2',{attrs:{\"data-number\":\"12.1\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"12.1\")]),_vm._v(\" Questions \"),_c('a',{attrs:{\"href\":\"#questions\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('ol',{attrs:{\"type\":\"1\"}},[_c('li',[_c('p',[_vm._v(\"How to add a command-line option of type string to a program?\")])]),_c('li',[_c('p',[_vm._v(\"How to check if an environment variable exists & get its value in the same call?\")])]),_c('li',[_c('p',[_vm._v(\"How to set an environment variable?\")])]),_c('li',[_c('p',[_vm._v(\"How to configure your application with a file?\")])])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"answers\"}}),_c('h2',{attrs:{\"data-number\":\"12.2\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"12.2\")]),_vm._v(\" Answers \"),_c('a',{attrs:{\"href\":\"#answers\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('ol',{attrs:{\"type\":\"1\"}},[_c('li',[_c('p',[_vm._v(\"How to add a command-line option of type string to a program?\")]),_c('ol',{attrs:{\"type\":\"1\"}},[_c('li',[_c('p',[_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"var password stringflag.StringVar(&password,\\\"password\\\", \\\"default\\\",\\\"the db password\\\")// define other flags// parse input flagsflag.Parse()\")])])])]),_c('li',[_c('p',[_vm._v(\"password2 := flag.String(“password2”,“default”, “the db password”)\")])])])]),_c('li',[_c('p',[_vm._v(\"How to check if an environment variable exists & get its value in the same call?\")]),_c('ol',{attrs:{\"type\":\"1\"}},[_c('li',[_c('p',[_vm._v(\"With the function \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"LookupEnv\")])]),_vm._v(\" from the package \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"os\")])])])]),_c('li',[_c('p',[_vm._v(\"port, ok := os.LookupEnv(“DB_PORT”) if !ok { log.Fatal(“impossible to start up, DB_PORT env var is mandatory”) }\")])])])]),_c('li',[_c('p',[_vm._v(\"How to set an environment variable?\")]),_c('ol',{attrs:{\"type\":\"1\"}},[_c('li',[_c('p',[_vm._v(\"With the function \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"SetEnv\")])]),_vm._v(\" from the package \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"os\")])])])]),_c('li',[_c('p',[_vm._v(\"err := os.Setenv(“MYVAR3”, “test3”) if err != nil { panic(err) }\")])])])]),_c('li',[_c('p',[_vm._v(\"How to configure your application with a JSON file?\")]),_c('ol',{attrs:{\"type\":\"1\"}},[_c('li',[_c('p',[_vm._v(\"Create a specific type with all your config variables.\")])]),_c('li',[_c('p',[_vm._v(\"At bootstrap, open the JSON file\")])]),_c('li',[_c('p',[_vm._v(\"Unmarshal the file.\")])])])])]),_c('div',{staticClass:\"anchor\",attrs:{\"id\":\"key-takeaways\"}}),_c('h1',{attrs:{\"data-number\":\"13\"}},[_c('span',{staticClass:\"header-section-number\"},[_vm._v(\"13\")]),_vm._v(\" Key Takeaways \"),_c('a',{attrs:{\"href\":\"#key-takeaways\"}},[_c('b-icon-link45deg',{staticClass:\"heading-link-icon\",attrs:{\"font-scale\":\"0.7\"}})],1)]),_c('ul',[_c('li',[_c('p',[_vm._v(\"Application configuration can be done via command-line options.\")])]),_c('li',[_c('p',[_vm._v(\"The standard package \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"flag\")])]),_vm._v(\" provide methods to add such options.\")])])]),_c('p',[_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"var password stringflag.StringVar(&password,\\\"password\\\", \\\"default\\\",\\\"the db password\\\")// define other flags// parse input flagsflag.Parse()\")])])]),_c('ul',[_c('li',[_c('p',[_vm._v(\"The configuration options are given at program startup via the command line : \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"$ myCompiledGoProgram -password insecuredPass\")])])])]),_c('li',[_c('p',[_vm._v(\"The configuration is generally loaded at application startup (in the main)\")])]),_c('li',[_c('p',[_vm._v(\"Configuration of an application can also be done via environment variables\")])]),_c('li',[_c('p',[_vm._v(\"To retrieve an environment variable, you can use the \"),_c('span',{directives:[{name:\"highlightjs\",rawName:\"v-highlightjs\"}]},[_c('code',{pre:true,attrs:{\"class\":\"go\",\"style\":\"display: inline\"}},[_vm._v(\"os\")])]),_vm._v(\" package\")]),_c('ul',[_c('li',[_c('p',[_vm._v(\"dbHost := os.GetEnv(“DB_HOST”)\")])]),_c('li',[_c('p',[_vm._v(\"dbHost, found := os.LookupEnv(“DB_HOST”)\")])])])]),_c('li',[_c('p',[_vm._v(\"You can also handle configuration via a file (JSON, YAML,.…). The idea is to create a type struct & unmarshal the file contents.\")])]),_c('li',[_c('p',[_vm._v(\"The module github.com/spf13/viper is a popular reference to handle application configuration.\")])]),_c('li',[_c('p',[_vm._v(\"Configuration options should be documented carefully by developers. An up to date documentation is a competitive advantage.\")])]),_c('li',[_c('p',[_vm._v(\"A dedicated secret management solution should handle application secrets.\")])])]),_c('section',{staticClass:\"footnotes\",attrs:{\"role\":\"doc-endnotes\"}},[_c('hr'),_c('ol',[_c('li',{attrs:{\"id\":\"fn1\",\"role\":\"doc-endnote\"}},[_c('p',[_vm._v(\"In Unix systems, environment variables are local to the process on which they are defined\"),_c('a',{staticClass:\"footnote-back\",attrs:{\"href\":\"#fnref1\",\"role\":\"doc-backlink\"}},[_vm._v(\"↩︎\")])])]),_c('li',{attrs:{\"id\":\"fn2\",\"role\":\"doc-endnote\"}},[_c('p',[_vm._v(\"Checked on 02/22/21\"),_c('a',{staticClass:\"footnote-back\",attrs:{\"href\":\"#fnref2\",\"role\":\"doc-backlink\"}},[_vm._v(\"↩︎\")])])]),_c('li',{attrs:{\"id\":\"fn3\",\"role\":\"doc-endnote\"}},[_c('p',[_vm._v(\"Source: https://github.com/search?o=desc&q=secrets+management&s=stars&type=Repositories last checked 02/22/21\"),_c('a',{staticClass:\"footnote-back\",attrs:{\"href\":\"#fnref3\",\"role\":\"doc-backlink\"}},[_vm._v(\"↩︎\")])])])])]),_c('h1',[_vm._v(\"Bibliography\")]),_c('ChapterBibliography',{attrs:{\"chapter-id\":\"Chap33ApplicationConfiguration\"}}),_c('b-row',{staticClass:\"ml-1 mr-1 \"},[_c('b-col',{staticClass:\"text-center border mr-1 p-2\"},[_c('router-link',{attrs:{\"to\":{name:'Chap32Templates'}}},[_c('p',[_c('u',[_c('small',[_vm._v(\"Previous\")])])]),_c('p',[_c('small',[_vm._v(\"Templates\")])])])],1),_c('b-col',{staticClass:\"text-center border p-1 \"},[_c('router-link',{attrs:{\"to\":{name:'Chap34Benchmarks'}}},[_c('p',[_c('u',[_c('small',[_vm._v(\"Next\")])])]),_c('p',[_c('small',[_vm._v(\"Benchmarks\")])])])],1)],1),_c('b-row',{staticClass:\"mt-1 ml-1 mr-1\"},[_c('b-col',{staticClass:\"text-center border p-1 \"},[_c('b-link',{attrs:{\"to\":{name:'Home'}}},[_vm._v(\"Table of contents\")])],1)],1),_c('FeedbackInvite'),_c('NewsletterInput'),_c('Footer')],1),_c('b-col')],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Chap33ApplicationConfiguration.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Chap33ApplicationConfiguration.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Chap33ApplicationConfiguration.vue?vue&type=template&id=38fd834c&scoped=true&\"\nimport script from \"./Chap33ApplicationConfiguration.vue?vue&type=script&lang=js&\"\nexport * from \"./Chap33ApplicationConfiguration.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"38fd834c\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}