https://github.com/golangsam/anytype
Templates, and ready-to-use go lang source files - generated with dotgo
https://github.com/golangsam/anytype
Last synced: 5 months ago
JSON representation
Templates, and ready-to-use go lang source files - generated with dotgo
- Host: GitHub
- URL: https://github.com/golangsam/anytype
- Owner: GoLangsam
- License: mit
- Created: 2017-07-12T05:11:52.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-06-20T11:14:10.000Z (almost 7 years ago)
- Last Synced: 2026-01-13T18:38:33.360Z (5 months ago)
- Language: Go
- Size: 2.25 MB
- Stars: 8
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AnyType
**Important:** This repo is retired! The new repo [`github.com/GoLangsam/pile`](https://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.
[](LICENSE.md)
[](https://goreportcard.com/report/github.com/GoLangsam/AnyType)
[](https://travis-ci.org/GoLangsam/AnyType)
[](https://godoc.org/github.com/GoLangsam/AnyType)
**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](ShameOnMe.md) before You waste Your precious time & energy.
## Subjects
This repo provides it's subjects (projects) in it's immediate subdirectories:
- [chan](chan/ReadMe.md) - Gain concurrency - use go-channels for piping (and more)
- [pile](pile/ReadMe.md) - A concurrency-safe growing-only first-in-first-out (FIFO) cached collection of things - with a simple (single-thread) iterator
- ... more to come soon
## Directories
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
## Documentation
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* :-)
## Templates
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
##### `dot.go.tmpl` - in target 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.
##### `*.dot.go.tmpl` - in subject directories
- Defines files (and their basename) to be generated into some target directory.
##### other `*.tmpl - all the way down into sub-subject directories
- 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.
## Source files
Well, it's about [go](http://golang.org). So we have
### `*.go` - ready-to-use compilable packages
It started as a proof-of-concept, and grows into a ready-to-use collection which directly extends the standard package, and even beyond.
### `*.ugo` - **ugly** go souces
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 ;-)
---
## Think deep - code happy - be simple - see clear :-)
---
## Support on Beerpay
Hey dude! Help me out for a couple of :beers:!
[](https://beerpay.io/GoLangsam/AnyType) [](https://beerpay.io/GoLangsam/AnyType?focus=wish)