Skip to content

Commit 5e49586

Browse files
pkg structure
1 parent 83672e4 commit 5e49586

File tree

6 files changed

+942
-9
lines changed

6 files changed

+942
-9
lines changed

go.mod

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module github.com/markhuang1212/code-grader
2+
3+
go 1.16
4+
5+
require (
6+
github.com/containerd/containerd v1.5.2 // indirect
7+
github.com/docker/docker v20.10.7+incompatible // indirect
8+
github.com/docker/go-connections v0.4.0 // indirect
9+
github.com/sirupsen/logrus v1.8.1 // indirect
10+
google.golang.org/grpc v1.38.0 // indirect
11+
)

go.sum

Lines changed: 916 additions & 0 deletions
Large diffs are not rendered by default.

runtime-compile/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

runtime-compile/main.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,27 @@
66
package main
77

88
import (
9+
"encoding/json"
10+
"io"
911
"os"
12+
"os/exec"
13+
"path/filepath"
14+
15+
"github.com/markhuang1212/code-grader/types"
1016
)
1117

1218
var testCaseDir string
1319

1420
func main() {
1521
testCaseDir = os.Getenv("TEST_CASE_DIR")
1622

23+
testCaseJson, err := os.ReadFile(filepath.Join(testCaseDir, "testcase.json"))
24+
if err != nil {
25+
panic(err)
26+
}
27+
var testCaseOptions types.TestCaseOptions
28+
json.Unmarshal(testCaseJson, &testCaseOptions)
29+
30+
// compileCmd := exec.Command("g++", testCaseOptions.CompilerOptions.Flags...)
31+
1732
}

runtime-exec/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

types/go.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)