GXML

About

Gopher Sauce markup language, a.k.a GXML, is a derivative of XML. It is a hybrid configuration and programming markup language. Reading this document requires some knowledge of XML (or HTML) to use abstractions.

Templating engine

gos uses Go package html/template to render your templates. Read more about the package here.


Definitions of terms used in this section :


One per directory

Keep one gxml file per directory.

Root tags

The section covers GXML tags located at the root of tag <gos />

<deploy/>
<port/>
<package/>
<not_found/>
<error/>
<output/>
<domain/>
<key/>
<methods/>
<templates/>
<endpoints/>

Sample GXML file

Here is a sample GXML file :

<?xml version="1.0" encoding="UTF-8"?>
<gos>
	<!-- xml docs : http://golangserver.com/docs/gxml-abstractions -->
	<deploy>webapp</deploy>
	<port>8080</port>
	<package>if-package-is-library</package>
	<not_found>/your-404-page</not_found>
	<error>/your-500-page</error>

	<output>application.go</output>
	<domain></domain><!-- Cookie domain -->
	<main>	
	//psss go code here : func main()
	</main>
	<key>a very very very very secret key</key>
	
	<header> 
	</header>
	<methods>
	</methods>

	<templates>
	</templates>
	<endpoints>
	</endpoints>
</gos>