Overview We can use the faith package to achieve the same https://github.com/fatih/color Program Output Note: Check out our Golang Advanced Tutorial. The tutorials in this series are elaborative and we have tried…
Author: admin
Print/Output crossed-out text in Go (Golang)
Overview We can use the faith package to achieve the same https://github.com/fatih/color Program Output Note: Check out our Golang Advanced Tutorial. The tutorials in this series are elaborative and we have tried…
Print/Output text with a background in Go (Golang)
Overview We can use the faith package to achieve the same https://github.com/fatih/color Program In the below program we are printing a text in white with red background Output Other background color options…
Print/Output text in italic in Go (Golang)
Overview We can use the faith package to achieve the same https://github.com/fatih/color Program Output
Load a .env or environment file in Go (Golang)
Overview gotenv package in golang can be used to load .env or environment file in golanghttps://github.com/joho/godotenv Below is the signature of the function It takes a variable number of arguments where each…
Print/Output text in bold in Go (Golang)
Overview We can use the faith package to achieve the same https://github.com/fatih/color Program Output
Golang Regex: Use a variable inside a Regular Expression
Overview The regexp.MustCompile function is used to compile the given regex string. So the input to the MustCompile function is a string only. And since it is a string we can concatenate any…
Golang regex match any character
Overview Dot ‘.’ character is one of the most commonly used metacharacters in the regular expression. It is used to match any character. By default, it doesn’t match a new line. Program…
Golang Regex: Understanding Curly Braces in Regular Expressions
Overview Curly braces act as a repetition quantifier in regex. They specify the number of times a character before preceding it can appear in the input string or text. They can also be…
JSON parse a file in Go (Golang)
Overview encoding/json package provides an Unmarshal method that can be used to convert the file bytes into struct or map in golang. json.Unmarshal function can be used to convert from JSON to a struct…