Important: This repo is retired! The new repo github.com/GoLangsam/pile
provides better and more functionality.
go get -u github.com/GoLangsam/pipe
Note: This repo will be removed one day. For now it remains as a test case for the agnostic generator.
Templates, and ready-to-use go lang source files - generated with dotgo.
Important: This repo is not intended to be cloned (or go get
) - it will just clobber Your disk.
Just focus on what's useful to You - and better: learn how to generate :-)
Hint: Before You shame or blame me for something: I might do so myself already! So, peek here before You waste Your precious time & energy.
This repo provides it's subjects (projects) in it's immediate subdirectories:
- chan - Gain concurrency - use go-channels for piping (and more)
- pile - A concurrency-safe growing-only first-in-first-out (FIFO) cached collection of things - with a simple (single-thread) iterator
- ... more to come soon
Each directory has many subdirectories.
Most contain 'target directories' for the generation and thus become ready-to-use go packages, accessed e.g. via
go get github.com/GoLangsam/AnyType/chan/sss/test
or
go get github.com/GoLangsam/AnyType/chan/sss/standard/io
You'll find many *.md
files - such as this one.
They may help to understand how these simple, selfcontained and ready-to-use go packages came into existence.
Hint: The sources in the packages are documented - You may use go doc
.
The *.md
documenation is mostly meta and may give better background for underlying desing principles and concepts.
Happy reading :-)
Mind You: Simplicity is complicated :-)
You'll find templates such as
dot.go.tmpl
- in target directories*.dot.go.tmpl
- in subject directories- other
*.tmpl
- all the way down into sub-subject directories
- Required to exist in any target directory (otherwise, dotgo would not write output; a security measure)
- Defines context for a target directory - we keep data close to results.
- Defines files (and their basename) to be generated into some target directory.
- Define further portions / subtemplates.
Hint: Especially *{{.}}*.tmpl
are usually just simple go code sniplets.
They are the meat here, where the architecture are the bones.
Well, it's about go. So we have
It started as a proof-of-concept, and grows into a ready-to-use collection which directly extends the standard package, and even beyond.
Results generated from the templates - still ugly, before the pass thru gofmt
.
You may ignore them, or diff
them agains their *.go
twin in order to see the templates and sniplets to be well formated.
Hint:
- If You like it: smile.
- If You don't: smile anyway - You'll be (a little more) happy - may be.
Mind You: the work done here is for You!.
For You - to be a Happy Gopher!
So: be a Happy Gopher!
Your suggestions, remarks, questions and/or contributions are welcome ;-)
Hey dude! Help me out for a couple of 🍻!