goval

package
v0.0.0-...-646a310 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2014 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package goval exposes functions to return strings containing a roundabout type declaration for passed interfaces.

Index

Constants

This section is empty.

Variables

View Source
var MarshalFunc object.MarshalFunc = func(r object.Responder, rq object.Request) (err error) {
	r.ContentType("text/plain;charset=utf8")
	_, err = io.Copy(r, strings.NewReader(Val(r.I)))
	return
}

A text/plain MarshalFunc that encodes the response as a Go type declaration.

Functions

func FormatFuncArguments

func FormatFuncArguments(t reflect.Type) (decl string)

func Val

func Val(i interface{}) (decl string)

func ValType

func ValType(t reflect.Type) (decl string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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