Sabid Ansari has Published 150 Articles
Sabid Ansari
7K+ Views
In Golang, a slice is a dynamically-sized array that can store a collection of elements of the same type. Sometimes, you may need to remove duplicate values from a slice to ensure that each element in the slice is unique. In this article, we'll discuss how to remove duplicate values ... Read More
Sabid Ansari
2K+ Views
Go is a programming language that is well-suited for building high-performance, concurrent applications. One of the essential features of any application is the ability to work with date and time. In this article, we will explore how to print specific date-time in Go using the time package. Using the Time ... Read More
Sabid Ansari
404 Views
Go and Java are two popular programming languages used for developing different types of applications. While both languages have their unique features and advantages, there are some key differences between them that developers should consider when deciding which language to use for their projects. In this article, we'll explore the ... Read More
Sabid Ansari
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 ... Read More
Sabid Ansari
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, ... Read More
Sabid Ansari
535 Views
In Golang, it is often required to split a slice of bytes after a specific separator. This can be done using the built-in function bytes.SplitAfter(). This function splits a slice of bytes into sub-slices after each occurrence of a specified separator. In this article, we will discuss how to split ... Read More
Sabid Ansari
281 Views
Slices are an essential feature of Go programming language that allows you to store and manipulate an ordered collection of elements. Slices are similar to arrays, but unlike arrays, they are dynamic and can be resized. In Go, you can perform a search operation on a slice to find an ... Read More
Sabid Ansari
6K+ Views
In Golang, you can replace all the string occurrences that match a regular expression with the help of the regexp package. The regexp package in Golang provides a ReplaceAllString() function that replaces all occurrences of the matched string with a new string. Example Here's an example of how to replace ... Read More
Sabid Ansari
3K+ Views
Polymorphism is a powerful concept in object-oriented programming that allows you to write flexible and reusable code. In Go, you can achieve polymorphism using interfaces. An interface is a collection of method signatures that any type can implement. This means that you can write code that can work with any ... Read More
Sabid Ansari
1K+ Views
Golang offers many built-in functions and packages to perform string operations. One common operation is finding the index of a particular rune in the string. In this article, we will explore how to find the index of a rune in a string in Golang. Rune in Golang is an alias ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP