{"id":38,"date":"2025-03-24T03:55:06","date_gmt":"2025-03-24T03:55:06","guid":{"rendered":"https:\/\/techkubo.com\/go\/?p=38"},"modified":"2025-05-26T17:40:46","modified_gmt":"2025-05-26T17:40:46","slug":"go-formatting-verbs","status":"publish","type":"post","link":"https:\/\/techkubo.com\/go\/go-formatting-verbs\/","title":{"rendered":"Go Formatting Verbs"},"content":{"rendered":"\n<p>When working with the <code>Printf()<\/code> function in Go, you&#8217;ll have access to a variety of formatting verbs that allow you to control how data is presented. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">General Formatting Verbs<\/h2>\n\n\n\n<p>The following are formatting verbs applicable to all kinds of data types:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Verb<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>%v<\/code><\/td><td>Displays the value in the default format.<\/td><\/tr><tr><td><code>%#v<\/code><\/td><td>Outputs the value in Go-syntax format (ideal for debugging).<\/td><\/tr><tr><td><code>%T<\/code><\/td><td>Presents the type of the value.<\/td><\/tr><tr><td><code>%%<\/code><\/td><td>Prints out a percent sign.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Example Code:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;go&quot;,&quot;mime&quot;:&quot;text\/x-go&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;Go&quot;,&quot;language&quot;:&quot;Go&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;go&quot;}\">package main\n\nimport (&quot;fmt&quot;)\n\nfunc main() {\n    var speed = 120.75\n    var brand = &quot;Ducati&quot;\n\n    fmt.Printf(&quot;%v\\n&quot;, speed)\n    fmt.Printf(&quot;%#v\\n&quot;, speed)\n    fmt.Printf(&quot;%v%%\\n&quot;, speed)\n    fmt.Printf(&quot;%T\\n&quot;, speed)\n\n    fmt.Printf(&quot;%v\\n&quot;, brand)\n    fmt.Printf(&quot;%#v\\n&quot;, brand)\n    fmt.Printf(&quot;%T\\n&quot;, brand)\n}\n<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;go&quot;,&quot;mime&quot;:&quot;text\/x-go&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;Go&quot;,&quot;language&quot;:&quot;Go&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;go&quot;}\">120.75  \n120.75  \n120.75%  \nfloat64  \nDucati  \n&quot;Ducati&quot;  \nstring  \n<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Integer Formatting Verbs<\/h2>\n\n\n\n<p>These formatting verbs work exclusively with integers:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Verb<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>%b<\/code><\/td><td>Displays the binary representation (base 2).<\/td><\/tr><tr><td><code>%d<\/code><\/td><td>Shows the decimal representation (base 10).<\/td><\/tr><tr><td><code>%+d<\/code><\/td><td>Shows the decimal representation including the sign.<\/td><\/tr><tr><td><code>%o<\/code><\/td><td>Displays the value in octal format (base 8).<\/td><\/tr><tr><td><code>%O<\/code><\/td><td>Octal format with a leading <code>0o<\/code>.<\/td><\/tr><tr><td><code>%x<\/code><\/td><td>Outputs the hexadecimal value (lowercase).<\/td><\/tr><tr><td><code>%X<\/code><\/td><td>Outputs the hexadecimal value (uppercase).<\/td><\/tr><tr><td><code>%#x<\/code><\/td><td>Hexadecimal format with a leading <code>0x<\/code>.<\/td><\/tr><tr><td><code>%4d<\/code><\/td><td>Pads spaces to make it width 4, right-aligned.<\/td><\/tr><tr><td><code>%-4d<\/code><\/td><td>Pads spaces to make it width 4, left-aligned.<\/td><\/tr><tr><td><code>%04d<\/code><\/td><td>Pads zeroes to make it width 4.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Example Code:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;go&quot;,&quot;mime&quot;:&quot;text\/x-go&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;Go&quot;,&quot;language&quot;:&quot;Go&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;go&quot;}\">package main\n\nimport (&quot;fmt&quot;)\n\nfunc main() {\n    var maxSpeed = 150\n\n    fmt.Printf(&quot;%b\\n&quot;, maxSpeed)\n    fmt.Printf(&quot;%d\\n&quot;, maxSpeed)\n    fmt.Printf(&quot;%+d\\n&quot;, maxSpeed)\n    fmt.Printf(&quot;%o\\n&quot;, maxSpeed)\n    fmt.Printf(&quot;%O\\n&quot;, maxSpeed)\n    fmt.Printf(&quot;%x\\n&quot;, maxSpeed)\n    fmt.Printf(&quot;%X\\n&quot;, maxSpeed)\n    fmt.Printf(&quot;%#x\\n&quot;, maxSpeed)\n    fmt.Printf(&quot;%4d\\n&quot;, maxSpeed)\n    fmt.Printf(&quot;%-4d\\n&quot;, maxSpeed)\n    fmt.Printf(&quot;%04d\\n&quot;, maxSpeed)\n}\n<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;go&quot;,&quot;mime&quot;:&quot;text\/x-go&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;Go&quot;,&quot;language&quot;:&quot;Go&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;go&quot;}\">10010110  \n150  \n+150  \n226  \n0o226  \n96  \n96  \n0x96  \n 150  \n150   \n0150  \n<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">String Formatting Verbs<\/h2>\n\n\n\n<p>For string data types, here are the options:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Verb<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>%s<\/code><\/td><td>Displays the string as it is.<\/td><\/tr><tr><td><code>%q<\/code><\/td><td>Wraps the string in double quotes.<\/td><\/tr><tr><td><code>%8s<\/code><\/td><td>Adjusts the width to 8, right-aligned.<\/td><\/tr><tr><td><code>%-8s<\/code><\/td><td>Adjusts the width to 8, left-aligned.<\/td><\/tr><tr><td><code>%x<\/code><\/td><td>Converts the string into hexadecimal format.<\/td><\/tr><tr><td><code>% x<\/code><\/td><td>Converts the string into hexadecimal format with spaces included.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Example Code:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;go&quot;,&quot;mime&quot;:&quot;text\/x-go&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;Go&quot;,&quot;language&quot;:&quot;Go&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;go&quot;}\">package main\n\nimport (&quot;fmt&quot;)\n\nfunc main() {\n    var motorcycleBrand = &quot;Harley&quot;\n\n    fmt.Printf(&quot;%s\\n&quot;, motorcycleBrand)\n    fmt.Printf(&quot;%q\\n&quot;, motorcycleBrand)\n    fmt.Printf(&quot;%8s\\n&quot;, motorcycleBrand)\n    fmt.Printf(&quot;%-8s\\n&quot;, motorcycleBrand)\n    fmt.Printf(&quot;%x\\n&quot;, motorcycleBrand)\n    fmt.Printf(&quot;% x\\n&quot;, motorcycleBrand)\n}\n<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;go&quot;,&quot;mime&quot;:&quot;text\/x-go&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;Go&quot;,&quot;language&quot;:&quot;Go&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;go&quot;}\">Harley  \n&quot;Harley&quot;  \n   Harley  \nHarley   \n4861726c6579  \n48 61 72 6c 65 79  \n<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Boolean Formatting Verbs<\/h2>\n\n\n\n<p>Boolean values have a straightforward formatting option:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Verb<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>%t<\/code><\/td><td>Displays the value as <code>true<\/code> or <code>false<\/code>.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Example Code:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;go&quot;,&quot;mime&quot;:&quot;text\/x-go&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;Go&quot;,&quot;language&quot;:&quot;Go&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;go&quot;}\">package main\n\nimport (&quot;fmt&quot;)\n\nfunc main() {\n    var hasFuel = true\n    var needsService = false\n\n    fmt.Printf(&quot;%t\\n&quot;, hasFuel)\n    fmt.Printf(&quot;%t\\n&quot;, needsService)\n}\n<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;go&quot;,&quot;mime&quot;:&quot;text\/x-go&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;Go&quot;,&quot;language&quot;:&quot;Go&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;go&quot;}\">true  \nfalse  \n<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Float Formatting Verbs<\/strong><\/h2>\n\n\n\n<p>Here are formatting verbs that deal with floating-point numbers:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Verb<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>%e<\/code><\/td><td>Shows the number in scientific notation with &#8216;e&#8217;.<\/td><\/tr><tr><td><code>%f<\/code><\/td><td>Displays the number with a decimal point but without an exponent.<\/td><\/tr><tr><td><code>%.2f<\/code><\/td><td>Limits the precision to 2 decimal points.<\/td><\/tr><tr><td><code>%6.2f<\/code><\/td><td>Adjusts the width to 6 and precision to 2.<\/td><\/tr><tr><td><code>%g<\/code><\/td><td>Uses the exponent only if necessary.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Example Code:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;go&quot;,&quot;mime&quot;:&quot;text\/x-go&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;Go&quot;,&quot;language&quot;:&quot;Go&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;go&quot;}\">package main\n\nimport (&quot;fmt&quot;)\n\nfunc main() {\n    var mileage = 25.768\n\n    fmt.Printf(&quot;%e\\n&quot;, mileage)\n    fmt.Printf(&quot;%f\\n&quot;, mileage)\n    fmt.Printf(&quot;%.2f\\n&quot;, mileage)\n    fmt.Printf(&quot;%6.2f\\n&quot;, mileage)\n    fmt.Printf(&quot;%g\\n&quot;, mileage)\n}\n<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;go&quot;,&quot;mime&quot;:&quot;text\/x-go&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;Go&quot;,&quot;language&quot;:&quot;Go&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;go&quot;}\">2.576800e+01  \n25.768000  \n25.77  \n  25.77  \n25.768  \n<\/pre><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When working with the Printf() function in Go, you&#8217;ll have access to a variety of formatting verbs that allow you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-38","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Go Formatting Verbs - Go Tutorial<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techkubo.com\/go\/go-formatting-verbs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Go Formatting Verbs - Go Tutorial\" \/>\n<meta property=\"og:description\" content=\"When working with the Printf() function in Go, you&#8217;ll have access to a variety of formatting verbs that allow you [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techkubo.com\/go\/go-formatting-verbs\/\" \/>\n<meta property=\"og:site_name\" content=\"Go Tutorial\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-24T03:55:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-26T17:40:46+00:00\" \/>\n<meta name=\"author\" content=\"Manong\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Manong\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/techkubo.com\/go\/go-formatting-verbs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/techkubo.com\/go\/go-formatting-verbs\/\"},\"author\":{\"name\":\"Manong\",\"@id\":\"https:\/\/techkubo.com\/go\/#\/schema\/person\/b4fa2f01fa4ff2a4e98276ce47115965\"},\"headline\":\"Go Formatting Verbs\",\"datePublished\":\"2025-03-24T03:55:06+00:00\",\"dateModified\":\"2025-05-26T17:40:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/techkubo.com\/go\/go-formatting-verbs\/\"},\"wordCount\":283,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/techkubo.com\/go\/#organization\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/techkubo.com\/go\/go-formatting-verbs\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/techkubo.com\/go\/go-formatting-verbs\/\",\"url\":\"https:\/\/techkubo.com\/go\/go-formatting-verbs\/\",\"name\":\"Go Formatting Verbs - Go Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/techkubo.com\/go\/#website\"},\"datePublished\":\"2025-03-24T03:55:06+00:00\",\"dateModified\":\"2025-05-26T17:40:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/techkubo.com\/go\/go-formatting-verbs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/techkubo.com\/go\/go-formatting-verbs\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/techkubo.com\/go\/go-formatting-verbs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/techkubo.com\/go\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Go Formatting Verbs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/techkubo.com\/go\/#website\",\"url\":\"https:\/\/techkubo.com\/go\/\",\"name\":\"Go Tutorial\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/techkubo.com\/go\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/techkubo.com\/go\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/techkubo.com\/go\/#organization\",\"name\":\"Go Tutorial\",\"url\":\"https:\/\/techkubo.com\/go\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/techkubo.com\/go\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/techkubo.com\/go\/wp-content\/uploads\/sites\/13\/2025\/04\/cropped-cropped-Techkubo-logo-1-300x220-1.png\",\"contentUrl\":\"https:\/\/techkubo.com\/go\/wp-content\/uploads\/sites\/13\/2025\/04\/cropped-cropped-Techkubo-logo-1-300x220-1.png\",\"width\":300,\"height\":220,\"caption\":\"Go Tutorial\"},\"image\":{\"@id\":\"https:\/\/techkubo.com\/go\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/techkubo.com\/go\/#\/schema\/person\/b4fa2f01fa4ff2a4e98276ce47115965\",\"name\":\"Manong\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/techkubo.com\/go\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/21a7455736c21887b8fefe0935012d65?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/21a7455736c21887b8fefe0935012d65?s=96&d=mm&r=g\",\"caption\":\"Manong\"},\"sameAs\":[\"https:\/\/techkubo.com\"],\"url\":\"https:\/\/techkubo.com\/go\/author\/manong\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Go Formatting Verbs - Go Tutorial","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techkubo.com\/go\/go-formatting-verbs\/","og_locale":"en_US","og_type":"article","og_title":"Go Formatting Verbs - Go Tutorial","og_description":"When working with the Printf() function in Go, you&#8217;ll have access to a variety of formatting verbs that allow you [&hellip;]","og_url":"https:\/\/techkubo.com\/go\/go-formatting-verbs\/","og_site_name":"Go Tutorial","article_published_time":"2025-03-24T03:55:06+00:00","article_modified_time":"2025-05-26T17:40:46+00:00","author":"Manong","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Manong","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techkubo.com\/go\/go-formatting-verbs\/#article","isPartOf":{"@id":"https:\/\/techkubo.com\/go\/go-formatting-verbs\/"},"author":{"name":"Manong","@id":"https:\/\/techkubo.com\/go\/#\/schema\/person\/b4fa2f01fa4ff2a4e98276ce47115965"},"headline":"Go Formatting Verbs","datePublished":"2025-03-24T03:55:06+00:00","dateModified":"2025-05-26T17:40:46+00:00","mainEntityOfPage":{"@id":"https:\/\/techkubo.com\/go\/go-formatting-verbs\/"},"wordCount":283,"commentCount":0,"publisher":{"@id":"https:\/\/techkubo.com\/go\/#organization"},"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techkubo.com\/go\/go-formatting-verbs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techkubo.com\/go\/go-formatting-verbs\/","url":"https:\/\/techkubo.com\/go\/go-formatting-verbs\/","name":"Go Formatting Verbs - Go Tutorial","isPartOf":{"@id":"https:\/\/techkubo.com\/go\/#website"},"datePublished":"2025-03-24T03:55:06+00:00","dateModified":"2025-05-26T17:40:46+00:00","breadcrumb":{"@id":"https:\/\/techkubo.com\/go\/go-formatting-verbs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techkubo.com\/go\/go-formatting-verbs\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/techkubo.com\/go\/go-formatting-verbs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techkubo.com\/go\/"},{"@type":"ListItem","position":2,"name":"Go Formatting Verbs"}]},{"@type":"WebSite","@id":"https:\/\/techkubo.com\/go\/#website","url":"https:\/\/techkubo.com\/go\/","name":"Go Tutorial","description":"","publisher":{"@id":"https:\/\/techkubo.com\/go\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techkubo.com\/go\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techkubo.com\/go\/#organization","name":"Go Tutorial","url":"https:\/\/techkubo.com\/go\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techkubo.com\/go\/#\/schema\/logo\/image\/","url":"https:\/\/techkubo.com\/go\/wp-content\/uploads\/sites\/13\/2025\/04\/cropped-cropped-Techkubo-logo-1-300x220-1.png","contentUrl":"https:\/\/techkubo.com\/go\/wp-content\/uploads\/sites\/13\/2025\/04\/cropped-cropped-Techkubo-logo-1-300x220-1.png","width":300,"height":220,"caption":"Go Tutorial"},"image":{"@id":"https:\/\/techkubo.com\/go\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/techkubo.com\/go\/#\/schema\/person\/b4fa2f01fa4ff2a4e98276ce47115965","name":"Manong","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techkubo.com\/go\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/21a7455736c21887b8fefe0935012d65?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/21a7455736c21887b8fefe0935012d65?s=96&d=mm&r=g","caption":"Manong"},"sameAs":["https:\/\/techkubo.com"],"url":"https:\/\/techkubo.com\/go\/author\/manong\/"}]}},"_links":{"self":[{"href":"https:\/\/techkubo.com\/go\/wp-json\/wp\/v2\/posts\/38"}],"collection":[{"href":"https:\/\/techkubo.com\/go\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techkubo.com\/go\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techkubo.com\/go\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techkubo.com\/go\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":2,"href":"https:\/\/techkubo.com\/go\/wp-json\/wp\/v2\/posts\/38\/revisions"}],"predecessor-version":[{"id":174,"href":"https:\/\/techkubo.com\/go\/wp-json\/wp\/v2\/posts\/38\/revisions\/174"}],"wp:attachment":[{"href":"https:\/\/techkubo.com\/go\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techkubo.com\/go\/wp-json\/wp\/v2\/categories?post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techkubo.com\/go\/wp-json\/wp\/v2\/tags?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}