Purpose of Variables in Terraform Variables prevent repetitive hardcoding of values in Terraform configuration files. They reduce errors due to inconsistent value entries across multiple resources. Simplify updating environment-specific configurations (e.g., changing from dev to stage). Types of Variables Based on Purpose Input Variables: Accept values from users or other sources. Output Variables
My Hugo blog was downloading 3.6 MB of JavaScript and 40 KB of external CSS on every page load. For a static blog with mostly text and a few diagrams, that was absurd. Here is how I fixed it. HTML: 86 KB JavaScript: 3.6 MB (Mermaid + KaTeX) CSS: 40 KB (KaTeX stylesheets) Problem: render-blocking scripts loaded on every page for math and diagrams Adding minifyOutput = true to hugo.toml shrunk HTML
Go tem duas formas de declarar variáveis: var e :=. Elas existem por motivos diferentes e têm regras diferentes. Saber quando cada uma se aplica evitamos erros bobos e código que não compila. var (forma longa) var x int // tipo explícito, recebe o zero value var x int = 5 // tipo e valor var x = 5 // valor com tipo inferido var x, y = 1, 2 // múltiplas variáveis