examples

package module
v0.0.0-...-851253e Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2014 License: MIT Imports: 1 Imported by: 0

README

go-examples

A set of examples for learning more about Go.

  • calc.go: Based on the "Arith" type used in some of go's documentation. Used in the rpc example.
  • rpc
    • jsonrpc
      • jsonrpc_test.go: Examples of using go's jsonrpc package. This one is set up using Go's unit testing package. To run it, execute go test from the directory (or go test -v for more verbose output).
    • rpc.go: A simple example of using go's rpc package. To run it, execute go run rpc-main.go from the directory.

Documentation

Overview

example server from http://golang.org/pkg/net/rpc/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	A, B int
}

type Arith

type Arith int

func (*Arith) Divide

func (t *Arith) Divide(args *Args, quo *Quotient) error

func (*Arith) Multiply

func (t *Arith) Multiply(args *Args, reply *int) error

type Quotient

type Quotient struct {
	Quo, Rem int
}

Directories

Path Synopsis