gingopherjs

package module
v0.0.0-...-530dea3 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2016 License: MIT Imports: 8 Imported by: 0

README

gingopherjs

A gin-gonic route for developing client side javascript with gopherjs.

Can be used like this:

import (
	"github.com/gin-gonic/gin"
	"github.com/abrander/gingopherjs"
)

func main() {
	router := gin.Default()
	g, _ := gingopherjs.New("github.com/me/myrepo")
	router.GET("/client.js", g.Handler)
	router.Run(":8080")
}

Please note that this will compile your Javascript at every request. It's only useful for development and should never be exposed on a public webserver.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GinGopher

type GinGopher struct {
	// contains filtered or unexported fields
}

func New

func New(pkg string) (*GinGopher, error)

func (*GinGopher) Handler

func (g *GinGopher) Handler(c *gin.Context)

Jump to

Keyboard shortcuts

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