
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
Found 33676 Articles for Programming

959 Views
Calculating the total number of hours, days, minutes, and seconds between two dates is achievable in Golang. In this article, we'll go through how to accomplish this in Golang, along with the necessary libraries and sample code. Calculating the Total Number of Hours, Days, Minutes, and Seconds In Golang, we may utilise the time package to determine how many hours, days, minutes, and seconds are there between two dates. To modify dates and times, the time package offers a number of functions. The total number of hours, days, minutes, and seconds between two dates can be calculated in Go ... Read More

647 Views
A buffered channel in Golang is a particular kind of channel that enables several values to be transmitted and received without blocking. In this post, we'll talk about buffered channels in Golang, their syntax, and some real-world uses. What is a Buffered Channel? In Golang, a channel type that can keep a predetermined number of values before blocking is known as a buffered channel. As long as there is space in the buffer, this permits sending and receiving numerous values without blocking. Any additional attempts to send data will be blocked after the buffer is filled until more room is ... Read More

2K+ Views
The caret (^) character in Golang stands in for the bitwise NOT operator. By flipping 0s and 1s into 1s and 0s into 0s, this operator inverts the bits of an integer value. We'll talk about Golang's bitwise NOT operator and some real-world uses for it in this article. What is the Bitwise NOT Operator? The complement operator, also referred to as the bitwise NOT operator, is a unary operator that performs bit inversion on a single operand. For processing binary data in computer programmes, use this operator. The bitwise NOT operator flips all of the bits in an integer ... Read More

616 Views
Bits package in Golang has functions for changing a binary number's individual bits. This package is very helpful in low-level applications like networking, cryptography, and bitwise operations. This post will go through the Golang bits package and show you how to utilise it in a real-world application. Introduction to the Bits Package The bits package offers tools for working with a binary number's constituent bits. The "BitArray" type, which represents a series of bits, is the main type in the bits package. An implementation of the "BitArray" type is a slice of "uint64" values, where each "uint64" value has ... Read More

510 Views
JSON has grown in popularity as a data format for transferring data across apps in recent years. JSON (JavaScript Object Notation) is a compact and simple-to-understand standard for exchanging data. It is widely used in server-to-server communication, mobile applications, and web applications. Its simplicity, concurrency, and scalability make GoLang a powerful programming language. The fundamentals of JSON with GoLang will be covered in this post. What is JSON? JSON is a simple, lightweight data exchange format that is simple for both people and robots to comprehend and generate. It is a completely language-independent text format that adheres to principles that ... Read More

2K+ Views
The base64 package in Golang provides several functions for encoding and decoding binary data in base64 format. DecodeString(), one of the most often used functions, decodes a base64-encoded string and returns the original binary data. We will thoroughly examine the DecodeString() method and discover how to decode base64-encoded data in Golang. We'll start by talking about the function's fundamental syntax and parameters before looking at some real-world applications. You ought to be able to utilise the DecodeString() function in your own Golang projects after reading this article. Basic Syntax of base64.DecodeString() The basic syntax of the DecodeString() function is as ... Read More

290 Views
Base64 package in Golang is a standard library package that offers capabilities for base64-encoding and -decoding binary data. Base64 is a popular method of encoding that enables binary data to be represented using just sharable ASCII letters, making it perfect for transmission over text-based protocols like HTTP and SMTP. We'll look into the Golang base64 package and discover how to encrypt and decrypt data in base64 format using the package's functions. We'll also talk about the best ways to interact with binary data in Golang and examine some typical use cases for base64 encoding and decoding. You ought to be ... Read More

511 Views
Let's look at how ‘gofmt’ can automatically style your Go source code in a consistent manner so that it is easier to understand and manage. In order to write readable, maintainable code, it must be formatted correctly. Go source code can be formatted using the 'gofmt' command-line tool. Using a set of rules and conventions, this programme automatically reformats your Go code to make it simpler to read and comprehend. What is Gofmt? A command-line tool called Gofmt is used to format Go source code consistently. Your code's space, indentation, and line breaks are automatically adjusted to make it easier ... Read More

2K+ Views
Atomic Variable in Golang offer an alternative to use locks or other synchronisation primitives to execute atomic operations on shared variables. When programming concurrently, synchronisation and mutual exclusion are essential to ensuring that threads or processes can access shared resources without interfering with one another. The fast and scalable synchronisation and coordination of concurrent access to shared variables is made possible by the use of atomic variables. What is an Atomic Variable? An atomic variable is a shared variable that may be read from and written to simultaneously by several goroutines while still ensuring that all actions are atomic. The ... Read More

2K+ Views
Anonymous structures and fields in Golang are a powerful feature that can be used to simplify and improve the readability of your code. These constructs allow you to define new data types on the fly without having to create a new named struct. Let's examine anonymous fields and structures in Go in more detail. What is an Anonymous Structure? In Go, a structure is a collection of fields that can be used to define a new data type. Normally, you would define a named structure like this − type Person struct { Name string ... Read More