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

cog.go 531B

123456789101112131415161718192021222324252627
  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. }
  17. func init() {
  18. DefaultTemplatesDirectoryName = "templates"
  19. DefaultGoSourcePath = os.Getenv("GOPATH") + "/src"
  20. }