golang

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestCodeAplusb = `package main
import (
	"fmt"
)
func main() {
	a,b := 0,0
	fmt.Scanf("%d %d", &a, &b)
	fmt.Println(a+b)
}`
	TestCodeCompilationError = `pkgace main
import (
	"fmt"
)
func main() {
	fmt.Println("lol")
}
`
	TestCodeHelloWorld = `package main
import (
	"fmt"
)
func main() {
	fmt.Println("Hello world")
}`
	TestCodeTimeLimit = `package main
func main() {
	a := 0
	for 1==1 {
		a++
	}
}`
	TestCodeRuntimeError = `package main
func dfs(x int) {
	dfs(x+1)
	if x==1000000000 {
		return 
	}
}
func main() {
	dfs(-1000)
}`
	TestCodeRuntimeErrorDiv0 = `package main
import (
	"fmt"
)
func main() {
	a := 1
	b := 0
	fmt.Println(a/b)
}`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Golang

type Golang struct{}

func (Golang) Compile

func (Golang) Compile(ctx context.Context, s sandbox.Sandbox, f sandbox.File, stderr io.Writer, extras []sandbox.File) (*sandbox.File, error)

func (Golang) DefaultFilename

func (Golang) DefaultFilename() string

func (Golang) DisplayName

func (Golang) DisplayName() string

func (Golang) ID

func (Golang) ID() string

func (Golang) Run

func (Golang) Run(ctx context.Context, s sandbox.Sandbox, binary sandbox.File, stdin io.Reader, stdout io.Writer, tl time.Duration, ml memory.Amount) (*sandbox.Status, error)

func (Golang) Test

func (g Golang) Test(t *testing.T, s sandbox.Sandbox) error

Jump to

Keyboard shortcuts

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