example

package
v0.0.0-...-a4427f8 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package example is an example of various documentation abilities and edge cases.

This is paragraph text in the middle of things.

here is some indented stuff

blurp.

Example (Of_stuff)

Example_of_stuff shows an example of various random things.

package main

import (
	"fmt"

	"github.com/AstromechZA/godork/example"
)

func main() {
	fmt.Println(example.T0, example.T1, example.T2)
}
Output:

0 1 2

Index

Examples

Constants

View Source
const (
	T0 int = iota
	T1
	T2
)

Numbered test constants

View Source
const Something = "word"

Something is a test string used in various scenarios.

Variables

View Source
var (
	Hi   = "Hello"
	Byte = "Good bye"
)

Some other variables.

View Source
var DefaultName = "godork"

DefaultName is a mutable variable used to store a string used in various default scenarios when an override is not provided.

Functions

func CheckSync

func CheckSync(s realsync.Locker)

CheckSync locks and unlocks a lock

func GimmeBuffer

func GimmeBuffer() *bytes.Buffer

GimmeBuffer gives you a bufferino

func TopLevelFunk

func TopLevelFunk(derp int, names ...string) string

TopLevelFunk takes the args and does a thing with them!

Example
package main

import (
	"github.com/AstromechZA/godork/example"
)

func main() {
	example.TopLevelFunk(1, "hi")
}
Output:

1 ["hi"]

Types

type SomeType

type SomeType struct {
	// External is the verbleburble
	External int
	// contains filtered or unexported fields
}

SomeType is a struct holding the state of the example struct type. A bunch of content here

indent

stuff.

func (*SomeType) PointerReceiver

func (s *SomeType) PointerReceiver(y int)

PointerReceiver is an example of a method with a pointer rcvr

Example
package main

import (
	"github.com/AstromechZA/godork/example"
)

func main() {
	t := example.SomeType{}
	t.PointerReceiver(1)
}
Output:

1

func (SomeType) ValueReceiver

func (s SomeType) ValueReceiver(x int)

ValueReceiver is an example of a method with a value rcvr

Jump to

Keyboard shortcuts

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