gen

package
v0.0.0-...-67ced0a Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gen

func Gen(exercise string, tests map[string]interface{}, t *template.Template) error

Gen generates the exercise cases_test.go file from the relevant canonical-data.json

Types

type Commit

type Commit struct {
	Sha     string
	Details struct {
		Message string
	} `json:"commit"`
}

func (Commit) Summary

func (c Commit) Summary() string
type Header struct {
	Commit string
	Origin string
}

Header tells how the test data was generated, for display in the header of cases_test.go

func (Header) String

func (h Header) String() string

String generates the header for cases_test.go file.

Jump to

Keyboard shortcuts

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