#gobin - A minimalistic paste bin written in go

15 messages · Page 1 of 1 (latest)

golden thorn
#

(my first project in go, so any feedback would be awesome)

rustic storm
#

oh the gif in the readme slaps

warm ospreyBOT
#

Types: 1
Functions: 0

Package embed provides access to files embedded in the running Go program.

Go source files that import "embed" can use the //go:embed directive to initialize a variable of type string, []byte, or FS with the contents of files read from the package directory or subdirectories at compile time.

For example, here are three ways to embed a file named hello.txt and then print its contents at run time.

Embedding one file into a string:

More documentation omitted...

upbeat shard
#

Acknowledgements
all the horrible paste bins out there
🤣 nice

#

Nicely done btw

mint valley
#

holding a lock while writing the file would be bad too, nanos isn’t a uuid, using a sequence number would be better

#

your expiration is indeed “sorta”

golden thorn
#

Don't really know that much rn

mint valley
#

no problem, doing is a good way to learn

#

using the hash of the content as the key would work best I guess

#

some of your files aren’t formatted. use an IDE with auto fmt