Welcome To Golang By Example

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

Tag: go

Validate the presence of the field in a struct in Go (Golang)

Posted on February 27, 2021February 27, 2021 by admin

Overview In this tutorial, we will explore two libraries that can be used to validate the field of a struct in Golang. The two libraries are gopkg.in/go-playground/validator.v9 – https://pkg.go.dev/github.com/go-playground/validator github.com/asaskevich/govalidator – https://github.com/asaskevich/govalidator…

Set a timeout while making an HTTP request in Go (Golang)

Posted on February 20, 2021February 20, 2021 by admin

Overview client struct of HTTP package can be used to specify the timeout. While creating the HTTP client we can specify the value of the Timeout. An important thing to note about…

ASCII digit to the character in Go (Golang)

Posted on February 20, 2021February 20, 2021 by admin

Overview Below is the simple program to convert an ASCII digit to its corresponding character in go. We can simply typecast the number to the string. That will convert it into its…

Convert a JSON to map in Go (Golang)

Posted on January 18, 2021January 18, 2021 by admin

Overview encoding/json package provides utilities that can be used to convert to and from JSON. The same utility can be used to convert a golang map to JSON string and vice versa….

Convert a map to JSON in Go (Golang)

Posted on January 17, 2021January 17, 2021 by admin

Overview encoding/json package provides utilities that can be used to convert to and from JSON. The same utility can be used to convert a golang map to JSON string and vice versa….

Conversion between map and JSON in Go (Golang)

Posted on January 17, 2021January 17, 2021 by admin

Overview encoding/json package provides utilities that can be used to convert to and from JSON. The same utility can be used to convert a golang map to JSON string and vice versa….

Why response body is closed in golang

Posted on January 17, 2021January 17, 2021 by admin

The response body should be closed after the response is fully read. This is done to prevent resource leak of connections. If the response body is not closed then the connection will…

HTTP send/receive application octet-stream request body in Go (Golang)

Posted on January 10, 2021January 10, 2021 by admin

Overview application/octet-stream content-type is used to transfer binary data in the HTTP request body. So application/octet-stream is used for sending files over HTTP request. Let’s see an example of both HTTP client and server…

HTTP client/server multipart form-data request body example in Go (Golang)

Posted on January 8, 2021March 17, 2021 by admin

Overview In HTTP context, the multipart/form-data content-type is used for submitting HTML form. In the case of multipart/form-data, as the name suggests, the body consists of different parts separated by a delimiter…

HTTP send/receive png file in request body example in Go (Golang)

Posted on January 8, 2021January 8, 2021 by admin

Overview multipart/form-data content-type can be used to send the png files in an HTTP POST call. The form-data will contain png filename- test.png in the example that we will see in this…

Posts pagination

Previous 1 … 18 19 20 … 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