Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Server Side Programming Articles - Page 290 of 2650
710 Views
Go, also known as Golang, is a programming language created by Google in 2009. Go is an open-source, statically-typed, compiled language that is designed to be simple, efficient, and reliable. It was created to address some of the issues that exist in other programming languages and to provide a better alternative for building modern, large-scale applications. In this article, we'll introduce Go, its features, and its benefits, and explain why it's a popular choice for modern software development. Features of Go Simplicity − Go is designed to be a simple language with a small number of keywords and syntax ... Read More
741 Views
Pointers are a powerful feature in Go that allow you to manipulate and manage memory more efficiently. In Go, a pointer is a variable that stores the memory address of another variable. Pointers are used to pass values by reference and to allocate and deallocate memory dynamically. Go also supports a pointer to a pointer, which is also known as a double pointer. In this article, we'll explore what a double pointer is, how it works, and how to use it in Go. What is a Double Pointer? A double pointer, or a pointer to a pointer, is a pointer ... Read More
1K+ Views
Go is a popular programming language that has gained significant popularity in recent years. One of the reasons for its popularity is the simplicity and readability of its syntax, which is aided by the use of keywords. Keywords in Go are reserved words that have specific meanings and cannot be used for any other purpose. In this article, we'll explore some of the most important keywords in Go and what they are used for. Keywords in Go Go has a total of 25 keywords, each with its own unique purpose. Here are some of the most commonly used keywords in ... Read More
408 Views
Decision making is an important aspect of programming, and Go provides a variety of constructs for making decisions in your code. In this article, we'll explore the different types of decision making constructs in Go, including the if, if-else, nested-if, and if-else-if constructs. if statement The if statement in Go is used to execute a block of code only if a certain condition is true. Here's an example − Example package main import "fmt" func main() { x := 10 if x > 5 { ... Read More
2K+ Views
In Go, it's easy to work with dates and times using the time package. This package provides a set of functions and types for working with dates and times, including the ability to get the current date and time with a timestamp in local and other timezones. In this article, we'll explore how to get the current date and time with a timestamp in local and other timezones using Go. Getting the current date and time with timestamp in local timezone To get the current date and time with a timestamp in the local timezone, we can use the time.Now() ... Read More
293 Views
Golang, also known as Go, is a popular open-source programming language known for its simplicity and concurrency. However, it lacked one important feature that other modern programming languages have, which is generics. Generics allow a programmer to write flexible, reusable code that works with different types without sacrificing type safety. In this article, we'll explore the introduction, syntax, and examples of generics in Golang. Introduction to Generics in Golang Generics are a way to write code that can work with any type, rather than being restricted to a specific type. In other words, generics allow you to write a function ... Read More
2K+ Views
Random numbers play an important role in many applications, from computer games to cryptography. Go has a built-in package called "math/rand" that provides a suite of functions to generate random numbers. In this article, we will explore how to use the "math/rand" package to generate random numbers in Go. Generating a Random Integer To generate a random integer, we can use the "Intn()" function from the "math/rand" package. The "Intn()" function takes an integer n as its argument and returns a random integer between 0 and n-1. Example package main import ( "fmt" ... Read More
3K+ Views
Universally Unique Identifier (UUID) is a 128-bit value that is used to uniquely identify objects or entities. UUID is widely used in computer systems for generating unique IDs for objects, documents, and data records. In Golang, we can generate UUID using the "github.com/google/uuid" package. Installing the "github.com/google/uuid" Package Before we can generate UUID in Golang, we need to install the "github.com/google/uuid" package. To install this package, run the following command in the terminal − go get github.com/google/uuid Generating UUID in Golang Once we have installed the "github.com/google/uuid" package, we can use the "uuid" package to generate UUIDs. Here's an ... Read More
1K+ Views
In Go, it is common to write functions that take interfaces as arguments or pointers to interfaces. This can be useful when you want to write generic code that works with any type that satisfies a particular interface. Functions That Take an Interface Type as Value In Go, interfaces are defined as a set of methods. If a type implements all the methods of an interface, then it is said to satisfy the interface. This means that the type can be used wherever the interface is expected. Here is an example of a function that takes an interface type as ... Read More
329 Views
Go is a modern programming language that offers a wide range of features for developing efficient and reliable software. One such feature is the ability to return multiple values from a function. In this article, we will explore how to use functions that return multiple values in Go. Introduction to Multiple Value Returns In Go, a function can return multiple values of different types. This feature is useful when you want to return more than one value from a function, such as returning both the result of a computation and an error value that indicates whether the computation was successful. ... Read More