DORSETRIGS
Home

go (552 post)


posts by category not found!

Unmarshal an ISO-8859-1 XML input in Go

Unmarshalling ISO 8859 1 XML Input in Go When dealing with XML data in Go its common to work with UTF 8 encoding since it is the default character encoding in G

3 min read 08-10-2024 30
Unmarshal an ISO-8859-1 XML input in Go
Unmarshal an ISO-8859-1 XML input in Go

Exec a shell command in Go

Executing Shell Commands in Go A Comprehensive Guide Understanding the Problem When programming in Go you might need to execute shell commands directly from you

2 min read 08-10-2024 23
Exec a shell command in Go
Exec a shell command in Go

What is most idiomatic way to create an iterator in Go?

The Most Idiomatic Way to Create an Iterator in Go When working with collections in Go creating an iterator can significantly enhance the way we traverse throug

3 min read 08-10-2024 33
What is most idiomatic way to create an iterator in Go?
What is most idiomatic way to create an iterator in Go?

How to marshal a byte/uint8 array as json array in Go?

How to Marshal a Byte Uint8 Array as a JSON Array in Go When working with JSON data in Go it s common to encounter situations where you need to convert byte arr

2 min read 08-10-2024 27
How to marshal a byte/uint8 array as json array in Go?
How to marshal a byte/uint8 array as json array in Go?

Multiple goroutines listening on one channel

Understanding Multiple Goroutines Listening on One Channel in Go Go a programming language created by Google is renowned for its simplicity and power in handlin

3 min read 07-10-2024 35
Multiple goroutines listening on one channel
Multiple goroutines listening on one channel

How do I convert a database row into a struct

How to Convert a Database Row into a Struct in Programming Converting a database row into a struct is a common task when working with databases in programming T

3 min read 07-10-2024 28
How do I convert a database row into a struct
How do I convert a database row into a struct

Golang http request results in EOF errors when making multiple requests successively

Understanding EOF Errors in Go HTTP Requests When developing applications in Go you may encounter EOF End of File errors when making multiple HTTP requests in q

3 min read 07-10-2024 20
Golang http request results in EOF errors when making multiple requests successively
Golang http request results in EOF errors when making multiple requests successively

Find out the version of Go a Binary was built with?

Unmasking the Go Compiler How to Find a Binarys Go Version Ever wondered which version of Go compiled that mysterious binary you stumbled upon Maybe you need to

2 min read 07-10-2024 22
Find out the version of Go a Binary was built with?
Find out the version of Go a Binary was built with?

Indentation in Go: tabs or spaces?

Tabs vs Spaces in Go A Guide to Code Formatting Go a popular and efficient programming language emphasizes code readability One crucial aspect of readability is

2 min read 07-10-2024 26
Indentation in Go: tabs or spaces?
Indentation in Go: tabs or spaces?

json: cannot unmarshal object into Go value of type

Decoding JSON in Go Tackling the Cannot Unmarshal Object Error Decoding JSON data in Go is a common task but sometimes you might encounter the dreaded cannot un

2 min read 07-10-2024 24
json: cannot unmarshal object into Go value of type
json: cannot unmarshal object into Go value of type

Peer to Peer Network in Go

Building a Decentralized Network in Go A Guide to Peer to Peer Communication Imagine a world where data is shared directly between users free from the control o

3 min read 07-10-2024 28
Peer to Peer Network in Go
Peer to Peer Network in Go

Unmarshalling JSON to interface variable while matching the underlying type in Go

Unmarshalling JSON to Interface Variables in Go Matching the Underlying Type Working with dynamic data in Go often involves unmarshalling JSON payloads into var

2 min read 07-10-2024 29
Unmarshalling JSON to interface variable while matching the underlying type in Go
Unmarshalling JSON to interface variable while matching the underlying type in Go

golang distinguish IPv4 IPv6

Unmasking the IP Address Distinguishing I Pv4 and I Pv6 in Go In the world of networking IP addresses are the crucial identifiers for devices connected to the i

2 min read 07-10-2024 21
golang distinguish IPv4 IPv6
golang distinguish IPv4 IPv6

Skip some tests with go test

Skip Tests Like a Pro Mastering Go Tests Flexibility When working with Go test its common to encounter scenarios where certain tests should be skipped under spe

3 min read 07-10-2024 31
Skip some tests with go test
Skip some tests with go test

How to pad a number with zeros when printing?

Padding Numbers with Zeros A Guide to Formatting Output When working with numbers in programming its common to need a consistent format for displaying them This

2 min read 07-10-2024 31
How to pad a number with zeros when printing?
How to pad a number with zeros when printing?

What's the proper way to "go get" a private repository?

Unlocking Private Repositories A Guide to go get with Private Code The go get command is a powerful tool for developers using Go allowing them to fetch and inst

2 min read 07-10-2024 23
What's the proper way to "go get" a private repository?
What's the proper way to "go get" a private repository?

Looking for reasonable stack implementation in golang?

Stacking Up Finding the Right Stack Implementation in Go Go with its simplicity and performance is a popular choice for building efficient and scalable applicat

3 min read 07-10-2024 24
Looking for reasonable stack implementation in golang?
Looking for reasonable stack implementation in golang?

How to add new methods to an existing type in Go?

Extending Go Types Adding New Methods the Right Way Gos statically typed nature offers robust type safety but it can sometimes feel limiting when you want to ex

2 min read 07-10-2024 28
How to add new methods to an existing type in Go?
How to add new methods to an existing type in Go?

Remove element by value in Go list

Removing Elements by Value in Go Lists A Comprehensive Guide Gos lists provide a versatile and efficient way to store collections of data But sometimes you need

2 min read 07-10-2024 32
Remove element by value in Go list
Remove element by value in Go list

Multiple receivers on a single channel. Who gets the data?

Sharing the Airwaves How Multiple Devices Access the Same Channel In the world of wireless communication devices constantly battle for attention on limited chan

2 min read 07-10-2024 24
Multiple receivers on a single channel. Who gets the data?
Multiple receivers on a single channel. Who gets the data?

Tour of Go exercise #23: rot13Reader

Cracking the Code A Deep Dive into Gos rot13 Reader Exercise The Tour of Go is a fantastic resource for learning the Go programming language One of its exercise

3 min read 07-10-2024 23
Tour of Go exercise #23: rot13Reader
Tour of Go exercise #23: rot13Reader

How to get all dependency files for a program

Unraveling Dependencies A Guide to Finding All Files Your Program Needs Developing software often involves using external libraries and frameworks creating a ne

2 min read 07-10-2024 26
How to get all dependency files for a program
How to get all dependency files for a program

Cannot assign string with single quote in golang

The Mystery of Single Quotes in Go Why Cant I Assign Strings This Way Ever wondered why Go seems to have a problem with single quotes in string assignment Its a

less than a minute read 07-10-2024 23
Cannot assign string with single quote in golang
Cannot assign string with single quote in golang

Visitor pattern vs channel in Go

Visitor Pattern vs Channels in Go Navigating the Choices The Go language offers a variety of powerful tools for managing program flow and data communication Two

3 min read 07-10-2024 21
Visitor pattern vs channel in Go
Visitor pattern vs channel in Go

How to convert ISO 8601 time in golang?

Time Travelers Guide Converting ISO 8601 to Go Time Have you ever encountered a date and time string like 2023 10 26 T15 30 00 Z This is the ISO 8601 standard a

2 min read 07-10-2024 28
How to convert ISO 8601 time in golang?
How to convert ISO 8601 time in golang?