[46] Results

Golang : How to convert JSON string to map and slice

golang json-to-map json-to-slice array

Couple of simple examples on how to convert JSON string to map and slice(array).

Simple and straightforward way of converting….... read more


Golang : Convert int to byte array([]byte)

golang integer-to-byte-array strconv convert-to-string

Problem :

You need to convert integer variable or constant to byte array ( [] byte ). How to do….... read more


Linux/Unix/MacOSX : Find out which application is listening to port 80 or use which IP version

linux lsof unix macosx port-number

Problem :

You need to find out which Linux/Unix or MacOSX applications are listening to port 80( or any other….... read more


Golang : Random integer with rand.Seed() within a given range

golang random number integer rand-seed

Need to generate a random single integer within a given number range. For example, get one random integer from 1….... read more


Golang : Convert IP version 6 address to integer or decimal number

golang ip-version-6 integer decimal-number

Problem :

You have IP address version 6 in string format and you want to convert it into integer. How….... read more


Golang : Get UDP client IP address and differentiate clients by port number

golang udp udp-client-address port-number

Problem :

Your UDP server program needs to find out the UDP client IP address before writing to client. However,….... read more


Golang : Read from buffered reader until specific number of bytes

golang bytes bufio specific-number read

Problem :

You have a buffered reader streaming in with data. You want to limit each read to a specific….... read more


Golang : What is the default port number for connecting to MySQL/MariaDB database ?

golang database mysql mariadb port-number

Problem :

How to determine which port number when trying to connect to a database with https://github.com/go-sql-driver/mysql and….... read more


Advertisement

Advertisement