gistlib
other go categories
go code snippets in go
3d cube in ascii in go
a route that starts a docker container when it's called in go
add a key-value pair to a map in go
add a node to the beginning of a linked list in go
add a node to the end of a linked list in go
add an element to the beginning of an array in go
add an element to the end of an array in go
add an item to a slice in go
add an item to a slice of type int in go
add an item to an array in go
add cors headers to a http server in go
add cors headers to a http server with a specific origin in go
add cors headers to a http server with a specific origin and methods in go
add reactjs to a template in go
add two numbers in go
amqp broker in go
append a string to the end of another string in go
append to a csv file in go
append to a file in go
append to a json file in go
assign a value to a pointer to an int in go
authentication system for a web app in go
bitwise and in go
build a bookmarking extension in go
build a chrome extension in go in go
build an extension in go
cache http requests on file system in go
cache http responses on file system in go
card game in go
check if a channel is closed in go
check if a channel is empty in go
check if a channel is not buffered in go
check if a channel is not empty in go
check if a channel is not full in go
check if a channel is open in go
check if a key does not exist in a map in go
check if a key exists in a map in go
check if a key exists in a map with a key of type int in go
check if an active directory group exists in go
check if environment variable is set in go
clean architecture in go
close a channel in go
combine two maps in go
compress data using win32 api in go
convert a number from base 10 to base 16 in go
convert a number from base 10 to base 8 in go
convert a number from base 2 to base 10 in go
convert a number from base 2 to base 16 in go
convert a number from base 2 to base 8 in go
copy a csv file in go
copy a json file in go
create a blake2b hash from a string in go
create a blake2s hash from a string in go
create a buffered string channel in go
create a byte channel in go
create a calculator in go
create a complex channel in go
create a csv file in go
create a directory in go
create a distributed key-value data structure in go
create a distributed key-value storage in go
create a distributed register in go
create a fiber website in go that prints the date in go
create a file in go
create a function in go
create a function that accepts a pointer in go
create a function that returns a pointer to an int in go
create a function that returns a value in go
create a function that returns an error in go
create a function that returns multiple values in go
create a function with a parameter in go
create a function with multiple parameters in go
create a google cloud run service in go in go
create a goroutine in go
create a goroutine with a function in go
create a goroutine with a function that returns a value in go
create a http server in go
create a http server and add a custom header to the response in go
create a http server and parse authorization headers in go
create a http server and parse cookies in go
create a http server and parse cookies and return a json response in go
create a http server and read the request body in go
create a http server and read the request body as binary in go
create a http server and read the request body as binary and return a binary response in go
create a http server and read the request body as form data in go
create a http server and read the request body as form url encoded in go
create a http server and read the request body as html in go
create a http server and read the request body as json in go
create a http server and read the request body as json and return a json response in go
create a http server and read the request body as multipart form data in go
create a http server and read the request body as text in go
create a http server and upload a file in go
create a http server and upload a file and return a binary response in go
create a http server and upload a file and return a json response in go
create a http server on a specific port in go
create a http server on a specific port and host in go
create a http server with a connect route in go
create a http server with a custom route in go
create a http server with a delete route in go
create a http server with a get route in go
create a http server with a head route in go
create a http server with a options route in go
create a http server with a patch route in go
create a http server with a post route in go
create a http server with a put route in go
create a http server with a specific route in go
create a http server with a specific route and a specific status code in go
create a http server with a trace route in go
create a json file in go
create a linked list in go
create a map in go
create a map with a key and value of type float in go
create a map with a key and value of type int in go
create a map with a key of type array in go
create a map with a key of type complex in go
create a map with a key of type int in go
create a map with a key of type pointer in go
create a map with a key of type rune in go
create a map with a key of type slice in go
create a map with a key of type string in go
create a map with a key of type struct in go
create a map with a value of type array in go
create a map with a value of type bool in go
create a map with a value of type byte in go
create a map with a value of type complex in go
create a map with a value of type pointer in go
create a map with a value of type rune in go
create a map with a value of type slice in go
create a map with a value of type struct in go
create a md5 hash from a string in go
create a mutable variable of type int in go
create a mutable variable of type string in go
create a os in go
create a password in go
create a password with a custom length in go
create a password with a custom length and lowercase letters in go
create a password with a custom length and numbers in go
create a password with a custom length and symbols in go
create a password with a custom length and uppercase letters in go
create a password with a custom length, uppercase letters and lowercase letters in go
create a password with at least one lowercase letter in go
create a password with at least one number in go
create a password with at least one symbol in go
create a password with at least one uppercase letter in go
create a password with numbers in go
create a password with symbols in go
create a password with uppercase letters and lowercase letters in go
create a password with uppercase, lowercase letters and numbers in go
create a password with uppercase, lowercase letters, numbers and symbols in go
create a pointer in go
create a pointer to a bool in go
create a pointer to a byte in go
create a pointer to a complex in go
create a pointer to a function in go
create a pointer to a pointer in go
create a pointer to a rune in go
create a pointer to a slice in go
create a pointer to a struct in go
create a pointer to an array in go
create a pointer to an int in go
create a pointer variable of the 'string' type, then assign "my string" to the variable at the address held by the pointer, finally, print the variable referenced by your pointer variable here! in go
create a range in go
create a rest endpoint using mux in go
create a ring buffer api in go
create a rune channel in go
create a server in go
create a sha1 hash from a string in go
create a sha256 hash from a string in go
create a sha3_256 hash from a string in go
create a sha3_512 hash from a string in go
create a sha512 hash from a string in go
create a slice channel in go
create a slice with a length in go
create a slice with a length and capacity in go
create a slice with a length and capacity of type string in go
create a string channel in go
create a struct in go
create a struct channel in go
create a struct with a field in go
create a struct with a field of type array in go
create a struct with a field of type bool in go
create a struct with a field of type complex in go
create a struct with a field of type float in go
create a struct with a field of type int in go
create a struct with a field of type map in go
create a struct with a field of type pointer in go
create a struct with a field of type rune in go
create a struct with a field of type slice in go
create a struct with a field of type string in go
create a struct with multiple fields in go
create a tcp client in go
create a tcp client on a specific port in go
create a tcp server in go
create a tcp server on a specific port in go
create a template string in go
create a udp client in go
create a udp client on a specific port in go
create a udp proxy that injects the proxy protocol from haproxy in go
create a udp server in go
create a udp server on a specific port in go
create a variable in go
create a variable of type float in go
create a variable of type int in go
create a web crawler in go
create a webserver and deploy to cloud run in go
create an event in logsnag in go
create an http post request sending multipart form data in go
create an if statement in go
create an if statement with an else in go
create an if statement with an else if in go
create an if statement with an else if and else in go
create an if statement with an else if and else with a condition in go
create an if statement with an else if and else with a condition of type int in go
create an if statement with an else if and else with a condition of type string in go
create an immutable variable in go
create an immutable variable of type int in go
create an int channel in go
create instances of a struct with a field in go
create instances of a struct with multiple fields in go
create multiple goroutines in go
define a struct in go
define an api to expose ptp pmc calls in go
delete a csv file in go
delete a directory in go
delete a file in go
delete a json file in go
encode object to json in go
execute on package install in go
extend a struct in go
extend a struct with a field in go
extend a struct with multiple fields in go
fibonacci sequence in go
filter two lambda arrays in go
find the area of a circle in go
find the area of a parallelogram in go
find the area of a rectangle in go
find the area of a regular polygon in go
find the area of a regular polygon circumscribed around a circle in go
find the area of a regular polygon inscribed in a circle in go
find the area of a rhombus in go
find the area of a sector of a circle in go
find the area of a square in go
find the area of a trapezoid in go
find the area of a triangle in go
find the average of a list of numbers in go
find the average of all elements in an array in go
find the average of all nodes in a linked list in go
find the average of all values in a map in go
find the base 10 logarithm of a number in go
find the base 2 logarithm of a number in go
find the base e logarithm of a number in go
find the contents of a directory in go
find the creation date of a csv file in go
find the creation date of a directory in go
find the creation date of a json file in go
find the cube root of a number in go
find the current date in go
find the current date and time in go
find the current month in go
find the current time in go
find the current year in go
find the difference of two maps in go
find the extension of a csv file in go
find the extension of a file in go
find the first character in a string in go
find the first node in a linked list in go
find the greatest common divisor of a list of numbers in go
find the greatest common divisor of two numbers in go
find the index of an element in an array in go
find the intersection of two maps in go
find the key associated with a value in a map in go
find the kth character in a string in go
find the kth index of a character in a string in go
find the kth index of a substring in a string in go
find the kth largest element in an array in go
find the kth largest key in a map in go
find the kth largest node in a linked list in go
find the kth largest number in a list in go
find the kth least common element in an array in go
find the kth least frequent element in an array in go
find the kth longest word in a string in go
find the kth most common element in an array in go
find the kth most frequent element in an array in go
find the kth smallest element in an array in go
find the kth smallest key in a map in go
find the kth smallest number in a list in go
find the largest element in an array in go
find the largest node in a linked list in go
find the largest value in a map in go
find the last accessed date of a csv file in go
find the last accessed date of a directory in go
find the last accessed date of a json file in go
find the last character in a string in go
find the last element in an array in go
find the last index of a substring in a string in go
find the last modified date of a csv file in go
find the last modified date of a directory in go
find the last modified date of a file in go
find the last modified date of a json file in go
find the last node in a linked list in go
find the least common multiple of a list of numbers in go
find the least common multiple of two numbers in go
find the length of a linked list in go
find the length of a string in go
find the length of an array in go
find the logarithm of a number in go
find the longest word in a string in go
find the median of a list of numbers in go
find the median of all elements in an array in go
find the median of all keys in a map in go
find the median of all nodes in a linked list in go
find the median of all values in a map in go
find the mode of a list of numbers in go
find the mode of all elements in an array in go
find the mode of all keys in a map in go
find the mode of all nodes in a linked list in go
find the mode of all values in a map in go
find the name of a directory in go
find the name of a file in go
find the name of a json file in go
find the natural logarithm of a number in go
find the nth catalan number in go
find the nth decagonal number in go
find the nth lucas number in go
find the nth nonagonal number in go
find the nth prime number in go
find the nth root of a number in go
find the nth square number in go
find the nth triangular number in go
find the parent directory of a directory in go
find the parent directory of a file in go
find the path of a csv file in go
find the path of a directory in go
find the path of a file in go
find the path of a json file in go
find the range of a list of numbers in go
find the range of all elements in an array in go
find the range of all keys in a map in go
find the range of all nodes in a linked list in go
find the range of all values in a map in go
find the remainder of two numbers in go
find the root directory of a directory in go
find the root directory of a file in go
find the shortest word in a string in go
find the size of a csv file in go
find the size of a directory in go
find the size of a file in go
find the size of a json file in go
find the slope between two points in go
find the smallest element in an array in go
find the smallest key in a map in go
find the smallest node in a linked list in go
find the smallest value in a map in go
find the square root of a number in go
find the standard deviation of a list of numbers in go
find the standard deviation of all elements in an array in go
find the standard deviation of all keys in a map in go
find the standard deviation of all nodes in a linked list in go
find the standard deviation of all values in a map in go
find the sum of a list of numbers in go
find the sum of all keys in a map in go
find the sum of all nodes in a linked list in go
find the sum of all values in a map in go
find the surface area of a cone in go
find the surface area of a cube in go
find the surface area of a cylinder in go
find the surface area of a pyramid in go
find the surface area of a rectangular prism in go
find the surface area of a regular polygon circumscribed around a cone in go
find the surface area of a regular polygon circumscribed around a cylinder in go
find the surface area of a regular polygon circumscribed around a pyramid in go
find the surface area of a regular polygon circumscribed around a sphere in go
find the surface area of a regular polygon circumscribed around a triangular prism in go
find the surface area of a regular polygon inscribed in a cone in go
find the surface area of a regular polygon inscribed in a cylinder in go
find the surface area of a regular polygon inscribed in a pyramid in go
find the surface area of a regular polygon inscribed in a sphere in go
find the surface area of a regular polygon inscribed in a triangular prism in go
find the surface area of a sphere in go
find the surface area of a triangular prism in go
find the symmetric difference of two maps in go
find the union of two maps in go
find the value associated with a key in a map in go
find the variance of a list of numbers in go
find the variance of all elements in an array in go
find the variance of all keys in a map in go
find the variance of all nodes in a linked list in go
find the variance of all values in a map in go
find the volume of a cone in go
find the volume of a cube in go
find the volume of a cylinder in go
find the volume of a pyramid in go
find the volume of a rectangular prism in go
find the volume of a regular polygon circumscribed around a cone in go
find the volume of a regular polygon circumscribed around a cylinder in go
find the volume of a regular polygon circumscribed around a pyramid in go
find the volume of a regular polygon circumscribed around a triangular prism in go
find the volume of a regular polygon inscribed in a cone in go
find the volume of a regular polygon inscribed in a cylinder in go
find the volume of a regular polygon inscribed in a pyramid in go
find the volume of a regular polygon inscribed in a triangular prism in go
find the volume of a sphere in go
find the volume of a triangular prism in go
fix: `func main() { var year int fmt.scanln(&year) if year%400 == 0 && year%100 != 0 || year%4 == 0 { fmt.println("leap year") } else { fmt.println("regular year") } }` in go
flatten array after removing `nil` if any; if array is all nil, return empty array. in go
format a date in to the format 'yyyy-mm-dd hh:mm:ss' in go
format a date in to the format 'yyyy-mm-dd hh:mm:ss.fff zzz' in go
format a date in to the format 'yyyy-mm-dd hh:mm:ss.fff' in go
format a date in to the format 'yyyy-mm-dd' in go
format a date in to the format month day, year in go
format a date in to the format month day, year hour:minute am/pm in go
format a date in to the format month day, year hour:minute:second am/pm in go
format a date in to the format month day, year hour:minute:second.fff am/pm in go
format a date in to the format month day, year hour:minute:second.fff am/pm zzz in go
format a date in to the format october 13, 2014 in go
format a date in to the format october 13, 2014 11:13 am in go
format a date in to the format october 13, 2014 11:13:00 am in go
format a date in to the format october 13, 2014 11:13:00.000 am in go
format a date in to the format october 13, 2014 11:13:00.000 am gmt-07:00 in go
french translator in go
function with thread web server to print the date in go
generate a password of 8 characters that contains at least one uppercase letter, one lowercase letter, and one number in go
generate a random array in go
generate a random boolean in go
generate a random number in go
generate a random number between 1 and 10 in go
generate a random number between 1 and 100 in go
generate a random string in go
get a normally distributed random number in go
get a random element from an array in go
get a random number from a normal distribution with a mean of 0 and a standard deviation of 1 in go
get a sample of 5 elements from an array in go
get a uniformly distributed random number in go
get system boot time in go
get system boot time in milliseconds in go
get system boot time in minutes in go
get system boot time in seconds in go
get system cpu frequency in go
get system cpu temperature in go
get system cpu temperature in fahrenheit in go
get system cpu usage in go
get system free disk space in go
get system platform in go
get system release in go
get system total disk space in go
get system total memory in go
get system uptime in go
get the length of a map with a key of type int in go
get the parent directory name in go
give a function to flatten an array; if it has nils, remove the nils before flattening. if it is all nils, return empty array. in go
give thisw ruby program in golang: `class flattenarray; def self.flatten(ar); [] if ar.nil?; ar.flatten.compact; end; end` in go
go response status code in go
hack a website in go
hash a password in go
hello world in go
how to do distributed processing in go
how to get cpu temp in go
http fiber ger in go
if the student has scored 71 points or more, the program should print "passed!" and if the student has scored less than 71 points, it should print "failed!" in go
implement raft consensus in go
import a package with a blank identifier in go
import a package with a blank identifier and an alias in go
import the fmt package in go
import the fmt package with an alias in go
insert a string into another string at a specific index in go
insert an element into an array at a specific index in go
iterate over map values and change them in go
join an array of characters into a string in go
join an array of substrings into a string in go
join two strings in go
keccak257 hash in go
make a http connect request in go
make a http delete request in go
make a http get request in go
make a http head request in go
make a http patch request in go
make a http post request in go
make a http request with a custom body in go
make a http request with a custom body as binary in go
make a http request with a custom body as binary and return a binary response in go
make a http request with a custom body as form data in go
make a http request with a custom body as form url encoded in go
make a http request with a custom body as html in go
make a http request with a custom body as json in go
make a http request with a custom body as json and return a json response in go
make a http request with a custom body as multipart form data in go
make a http request with a custom body as text in go
make a http request with a custom header in go
make a http request with a custom method in go
make a http request with url parameters in go
make a http trace request in go
map an array in go
max sequence sum in go
move a csv file in go
move a directory in go
move a file in go
move a json file in go
multiply two numbers in go
multiply two numbers by only using the subtract method in go
parse a csv file in go
parse an array of strings in go
parse authorization headers in go
parse json without knowing the structure in go
pass a pointer to a function with a parameter of type int in go
perform multiplication using only subtraction in go
prepend a string to the beginning of another string in go
purge cloudflare cache in go
read a csv file in go
read a file in go
read a json file into struct in go
read input argument in go
read input argument numbers and print the sum in go
read network logs in go
receive a binary json message from a channel in go
receive a binary message from a channel with a timeout in go
receive a json message from a channel in go
receive a json message from a channel with a timeout in go
receive a message from a channel in go
receive a message from a channel with a timeout in go
remove a character from a string in go
remove a character from a string at a specific index in go
remove a key and value from a map in go
remove a key and value from a map with a key of type int in go
remove a node from the beginning of a linked list in go
remove a node from the end of a linked list in go
remove a node from the middle of a linked list in go
remove a substring from a string in go
remove a substring from a string at a specific index in go
remove an element from an array at a specific index in go
remove an element from the beginning of an array in go
remove an element from the end of an array in go
remove an element from the middle of an array in go
remove an item from a slice in go
remove an item from a slice of type int in go
remove an item from an array in go
remove an item from an array of type int in go
rename a csv file in go
rename a directory in go
rename a file in go
rename a json file in go
replace a substring in a string in go
rest api in go
retrieve a value from a pointer in go
retrieve a value from a pointer to an int in go
return a binary response from a http server in go
return a html response from a http server in go
return a json response from a http server in go
return a json response from a http server with a specific status code in go
return a text response from a http server in go
reverse an array in go
reverse array in go
round a float in go
round a number to the nearest hundredth in go
round a number to the nearest integer in go
round a number to the nearest ten thousandth in go
round a number to the nearest tenth in go
send 10000 request to a website in 1 sec in go
send a binary json message to a channel in go
send a binary json message to a tcp server in go
send a binary json message to a udp server in go
send a binary message to a tcp server in go
send a binary message to a udp server in go
send a json message to a channel in go
send a json message to a tcp server in go
send a json message to a udp server in go
send a message to a channel in go
send a message to a tcp server in go
send a message to a udp server in go
send mail in go
shuffle an array in go
sort a list in go in go
sort an string array by content length in go
split a string into an array of characters in go
split a string into an array of substrings in go
split a string into an array of words in go
statement in go
stream audio from windows using win32 api in go
subtract two numbers in go
take over the world in go
take the absolute value of a number in go
take the arccosine of a number in go
take the arcsine of a number in go
take the arctangent of a number in go
take the ceiling of a number in go
take the cosecant of a number in go
take the cosine of a number in go
take the cotangent of a number in go
take the derivative of a function in go
take the floor of a number in go
take the integral of a function in go
take the secant of a number in go
take the sine of a number in go
take the tangent of a number in go
test a http server in go
turn int a terse one-liner: `package leap func isleapyear(year int) bool { return year%4 == 0 && (year%100 != 0 || year%400 == 0) }` in go
use the fmt package to print a value of type byte in go
use the fmt package to print a value of type int in go
use the os package to get the current working directory in go
use the os package to get the current working directory and print it in go
use the os package to get the current working directory and print it with the fmt package in go
using the fmt.scan function, read a value from the stdin into the v variable, and finally output its value. in go
validate a url in go
validate an email in go
what is `"%#v"` in go
what's the issue? ` number := 0 add10(number) fmt.println(number) // logs 0 } func add10(number int) { number = number + 10 }` in go
what's wrong? 1fmt.println("the matrix") case age > 19 && age <= 25: ` in go
write a simple shell language in go
write to a csv file in go
write to a file in go
write to a json file in go
gistlib
by LogSnag