The cog package provides functionality to develop reusable components (cogs) for Isomorphic Go web applications.

cog.go 546B

12345678910111213141516171819202122232425262728
  1. // The UXToolkit Project
  2. // Copyright (c) Wirecog, LLC. All rights reserved.
  3. // Use of this source code is governed by a BSD-style
  4. // license, which can be found in the LICENSE file.
  5. package cog
  6. import (
  7. "os"
  8. )
  9. var DefaultTemplatesDirectoryName string
  10. var DefaultGoSourcePath string
  11. var TemplateFileExtension = ".tmpl"
  12. var ReactivityEnabled = true
  13. var VDOMEnabled = true
  14. type Cog interface {
  15. Render() error
  16. Start() error
  17. }
  18. func init() {
  19. DefaultTemplatesDirectoryName = "templates"
  20. DefaultGoSourcePath = os.Getenv("GOPATH") + "/src"
  21. }