Git Product home page Git Product logo

dotgo's Introduction

dotgo

An agnostic tool to create *.go sources (and other text) given some template(s) - generic types made easy.

Software License Go Report Card Build Status GoDoc

Simplicity ain't easy

Many weeks were spent in order to come up with a tool named dotgo which is easy to use.

And: dotgo offers a simple yet powerful way to generate go sources in particular (and other kinds of texts in general).

2017-07-12

Today github invites us to Join GitHub in support of the open internet, again.

This is important to us, as is Open Software.

As are Freedom and Transparency. And we love to contribute, and to share. Thus:

Today dotgo goes public here - in the hope it shall become useful to the community.

Please be patient

As of this writing - some refactoring is still under way in order to achive this, and in order to improve explanations and examples.

( Note: a couple of days ago, an example of what can be achieved was already published here )

More will follow soon - Thank You for Your patience!

Basic Usage

Imagine, You have Your templates and definitions in place. (We'll show You later, how to achieve this with ease.),

dotgo just needs to know:

  • the template(s) to be used
  • the location for resulting output file(s).

Thus, a simple

dotgo templates-dir target-dir

will do. Or - if these are same, and You already went there, use

dotgo .

and the magic shall happen.

Hint: It's use is intentionally kept so super-simple in order to allow ease of use, e.g. in Your source files, with the generate tool and it's workflow.

Remarks

dotgo uses text/template

dotgo builds heavily on the text/template package from the standard library. For reasons to be shared later elswhere.

dottxt - currently: No Need

And, as it's 'go awarness' can be switched off, there is currently no need for a twin such as dottxt. (This may change, if we feel need to add awarness for go specific stuff such as packages or vendoring. If so, there shall be a plain vanilla dottxt - also useful e.g. for *.md)

dothtml - coming soon

Now -as You might now- the standard library provides a second template package: html/template. Even so being isomorphic, it has other benefits when applied to xml/html. Thus, soon after having dotgo public and stable, there shall be it's companion dothtml - just using the other package.

same name - different meanings

When I chose the name dotgo I was not aware of the website dotgo.eu and it's related events. Please accepty my apologies if this creates any kind of confusion in Your mind. And Yes - I may deserve blames and flames not having taken time to research the name beforehand ...


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

dotgo's People

Contributors

golangsam avatar

Stargazers

 avatar abdul dakkak avatar

Watchers

James Cloos avatar

Forkers

fossabot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.