exercism

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2013 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const FILENAME = ".exercism.go"
View Source
const VERSION = "1.0.1"

Variables

View Source
var FetchEndpoints = map[string]string{
	"current": "/api/v1/user/assignments/current",
	"next":    "/api/v1/user/assignments/next",
	"demo":    "/api/v1/assignments/demo",
}

Functions

func ConfigToFile

func ConfigToFile(dir string, c Config) (err error)

func DemoDirectory

func DemoDirectory() (dir string, err error)

func HomeDir

func HomeDir() string

See: http://stackoverflow.com/questions/7922270/obtain-users-home-directory we can't cross compile using cgo and use user.Current()

func IsTest

func IsTest(filename string) bool

func Logout

func Logout(dir string)

func ReplaceTilde

func ReplaceTilde(oldPath string) string

func SaveAssignment

func SaveAssignment(dir string, a Assignment) (err error)

func SubmitAssignment

func SubmitAssignment(host, apiKey, filePath string, code []byte) (r *submitResponse, err error)

Types

type Assignment

type Assignment struct {
	Track    string
	Slug     string
	Readme   string
	TestFile string `json:"test_file"`
	Tests    string
}

func FetchAssignments

func FetchAssignments(host string, path string, apiKey string) (as []Assignment, err error)

type Config

type Config struct {
	GithubUsername    string `json:"githubUsername"`
	ApiKey            string `json:"apiKey"`
	ExercismDirectory string `json:"exercismDirectory"`
	Hostname          string `json:"hostname"`
}

func ConfigFromFile

func ConfigFromFile(dir string) (c Config, err error)

Jump to

Keyboard shortcuts

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