- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 1082 Articles for Go Programming
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
151 Views
In this tutorial, we will learn how to print the mirror lower star triangle pattern using G programming language. Syntax for initialization; condition; update { statement(s) } In the code, we use the for loop to repeat a block of code until the specified condition is met. Example: Golang Program to Print Mirror Lower Star Triangle pattern using One Single Function Algorithm Step 1 − Import the package fmt. Step 2 − Start the function main (). Step 3 − Declare and initialize the variables. Step 4 − Use of for loop with condition and ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
181 Views
In this tutorial, we will learn how to print downward triangle pattern using Go programming language. Syntax for initialization; condition; update { statement(s) } In the code, we use the for loop to repeat a block of code until the specified condition is met. Example: Golang Program To Print Download Triangle Star Pattern Using One Single Function Algorithm Step 1 − Import the package fmt. Step 2 − Start the function main (). Step 3 − Declare and initialize the variables. Step 4 − Use of for loop with condition and incrementor. Step 5 − ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
397 Views
In this tutorial, we will learn how to print diamond star pattern using Go programming language. Syntax for initialization; condition; update { statement(s) } Example: Golang Program Code To Print Diamond Star Pattern Using A Single Function Algorithm Step 1 − Import the package fmt. Step 2 − Start the function main (). Step 3 − Declare and initialize the variables. Step 4 − Use of for loop with condition and incrementor. Step 5 − Print the result using fmt.Println (). Example // GOLANG PROGRAM TO PRINT DIAMOND STAR PATTERN package main // ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
233 Views
In this tutorial, we will learn how to print 8−star pattern using Go programming language. Syntax for initialization; condition; update { statement(s) } Example: Golang Program Code To Print 8 Star Pattern Using A Single Function Algorithm Step 1 − Import the package fmt. Step 2 − Start the function main (). Step 3 − Declare and initialize the variable. Step 4 − Use of for loop with condition and incrementor. Step 5 − Print the result using fmt.Printf (). Example // GOLANG PROGRAM TO PRINT 8 STAR PATTERN package main // fmt ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
163 Views
In this article we will discuss about how to get the successor of an integer number using library function in Go language. The successor of an integer number is defined as the number that comes after it. For example the successor of 2 is 2 + 1 = 3. Similarly, successor of −50 is −49 and so on. Syntax Syntax for Println() = fmt.Println(...interface{}) Example 1: We Will Get The Successor Of The Integer Number Using Library Function In A Single Function Algorithm Step 1 − Import the package fmt. Step 2 − Start the function main (). Step 3 ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
147 Views
In this article we will discuss about how to get the predecessor of an integer number using library function in Go language. The predecessor of an integer number is defined as the number that comes before it. For example the predecessor of 2 is 2 – 1 = 1. Similarly, predecessor of -50 is -51 and so on. Syntax Syntax for Println() = fmt.Println(...interface{}) Example 1: We Will Get The Predecessor of the integer number using Library Function Algorithm Step 1 − Import the package fmt. Step 2 − Start function main function(). Step 3 − Initialize a ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
1K+ Views
In this tutorial, we will learn how to create pyramids with different patterns in Go programming languageSyntax NESTED FOR LOOP for [condition | ( init; condition; increment ) | Range] { for [condition | ( init; condition; increment ) | Range] { statement(s); } statement(s); } Example 1: Golang code to Create Pyramid And Pattern Using $ Algorithm Step 1 − Import the package fmt. Step 2 − Start function main (). Step 3 − Declare and initialize the variables. Step 4 − ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
2K+ Views
In the tutorial, we learn how to convert numeric data to hexadecimal number using Go programming language. The hexadecimal number system is described as a 16-digit number representation of numbers from 0 - 9 and digits from A - F. In other words, the first 9 numbers or digits are represented as numbers while the next 6 digits are represented as symbols from A - F. Example 1: Golang Program Code to Convert Data to Hexadecimal Number Using fmt.Sprintf() Function Syntax func Sprintf(format string, a ...interface{}) string The fmt.Sprintf() function in Go language formats according to a format specifier ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
3K+ Views
In this tutorial, we will learn how to check for palindrome in Go programming language. We will check for palindrome for both numbers and strings in separate examples. A palindrome is a word, number, phrase, or other sequence of symbols that reads the same backwards as forwards, such as the words civic or radar or numbers such as 22\2\22 or sentence such as “Mr. Owl ate my metal worm”. Example 1: Golang Program code to Show if a Number is palindrome using a Single Function Syntax Syntax of For loop Initialize for condition { } incrementor The initialization statement ... Read More
![Akhil Sharma](https://www.tutorialspoint.com/assets/profiles/525598/profile/60_3453735-1664185297.jpg)
1K+ Views
In this tutorial, we will learn how to check if given two strings are anagrams of each other or not using Go programming language. A word or phrase formed by rearranging the letters of a different word or phrase by using all the letters exactly once is known as an anagram. Example − Roles anagram word is loser Binary anagram word is brainy The below example shows how to create an empty map using the built-in make () function. The make function allocates and initializes a hash map data structure and returns a map value that points to it. The specifics ... Read More