Welcome To Golang By Example

Menu
  • Home
  • Blog
  • Contact Us
  • Support this website
Menu

Tag: go

Multiple constant declarations in Go (Golang)

Posted on September 30, 2020September 30, 2020 by admin

Overview Below are some of the ways of declaring multiple constant together Declaring multiple const together with different value and type The declaration can be typed or untyped. Refer to this article…

Constant array or slice in Go (Golang)

Posted on September 30, 2020September 30, 2020 by admin

Overview Go only supports four types of constant Numeric ( int, int64, float, float64, complex128 etc) String Character or rune Boolean Go doesn’t support const array or slice. It is because in…

String constant in Go (Golang)

Posted on September 30, 2020September 30, 2020 by admin

Overview In go string constant is represented in two ways Any value that is enclosed between double quotes Any value enclosed between back quotes To better understand string constant in golang it…

Declaring a constant in Go (Golang)

Posted on September 30, 2020September 30, 2020 by admin

A constant is anything that doesn’t change its value. In Go const can be either of type string, numeric, boolean, and characters. A constant can be declared using the const keyword. An…

Typed and Untyped constant in Go (Golang)

Posted on September 30, 2020September 30, 2020 by admin

Typed and Untyped Constants In go constant are treated in a different way than any other language. GO has a very strong type system that doesn’t allow implicit conversion between any of…

Global and Local Constant in Go (Golang)

Posted on September 27, 2020September 27, 2020 by admin

Overview Like any other variable, a constant will be global within a package if it is declared at the top of a file outside the scope of any function. For example, in…

Constant in inner/outer scope in Go (Golang)

Posted on September 27, 2020September 27, 2020 by admin

Overview A constant declared within an inner scope having a same name as constant declared in the outer scope will shadow the constant in outer scope. Example Output The above program prints…

Can constant be reassigned after its declaration in Go (Golang)

Posted on September 26, 2020September 26, 2020 by admin

Overview Constant Variable cannot be reassigned after its declaration as it is constant and its value cannot change. If you try to reassign to a constant variable then it will raise a…

Constant in Go (Golang)

Posted on September 25, 2020November 25, 2020 by admin

This is the  chapter 9 of the golang comprehensive tutorial series. Refer to this link for other chapters of the series – Golang Comprehensive Tutorial Series Next Tutorial – For LoopPrevious Tutorial –Functions Now let’s check…

Create panic by calling panic function in Go (Golang)

Posted on September 23, 2020September 23, 2020 by admin

Overview Go provides a special function to create a panic. Below is the syntax of the function This function can be called explicitly by the programmer to create a panic. It takes…

Posts pagination

Previous 1 … 24 25 26 … 44 Next
Follow @golangbyexample

Popular Articles

Golang Comprehensive Tutorial Series

All Design Patterns in Go (Golang)

Slice in golang

Variables in Go (Golang) – Complete Guide

OOP: Inheritance in GOLANG complete guide

Using Context Package in GO (Golang) – Complete Guide

All data types in Golang with examples

Understanding time and date in Go (Golang) – Complete Guide

©2025 Welcome To Golang By Example | Design: Newspaperly WordPress Theme