internal

package
v0.0.0-...-7fd6470 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFileTemplate = `credentials:
  user_name: ""
  password: ""
languages:
  py: "python3"`

Variables

View Source
var ConfigPath = "~/.atc.yml"

Functions

func ExistConfig

func ExistConfig() bool

func GenerateConfig

func GenerateConfig() error

Types

type Config

type Config struct {
	CredentialsConfig `yaml:"credentials"`
	LanguagesConfig   `yaml:"languages"`
}

func NewConfig

func NewConfig() (*Config, error)

type CredentialsConfig

type CredentialsConfig struct {
	UserName string `yaml:"user_name"`
	Password string `yaml:"password"`
}

type Example

type Example struct {
	Input  string
	Output string
}

Example has exmaples's io string

func (*Example) Run

func (e *Example) Run(command, fileName string) (string, error)

Run return command result

type Examples

type Examples []*Example

Examples is multiple Example

func GetExamples

func GetExamples(fileName string) (Examples, error)

GetExamples return Examples TODO 41 以下のコンテストでもできるようにする TODO URLとコンテスト番号がマッチしていないものにも対応したい なぜ goquery はpre#pre-pre-sample0 を探せないのか

type LanguagesConfig

type LanguagesConfig map[string]string

func (LanguagesConfig) GetLanguagePath

func (lc LanguagesConfig) GetLanguagePath(fileName string) string

GetLanguagePath return local laguange path TODO 実行にコンパイルの必要な言語にも対応する

Jump to

Keyboard shortcuts

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