anytype

package module
v0.0.0-...-5012a73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2019 License: MIT Imports: 0 Imported by: 0

README

AnyType

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.

Software License Go Report Card Build Status GoDoc

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.

Subjects

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

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. 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 🍻!

Beerpay Beerpay

Documentation

Overview

Package anytype provides templates and it's subdirectories hold refining templates, and resulting go code

Directories

Path Synopsis
Package tube provides base templates for various flavours of tubes
Package tube provides base templates for various flavours of tubes
pile

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL