feat: move language storage to array from postgres

This commit is contained in:
dragonmuffin 2024-08-25 17:15:41 +05:00
parent a8ba5677d3
commit 02a7a49ac3
4 changed files with 23 additions and 93 deletions

View file

@ -1,12 +1,13 @@
package models
import "time"
type Language struct {
Id *int32 `db:"id"`
Name *string `db:"name"`
BuildFileHash *string `db:"build_file_hash"`
ExecuteFileHash *string `db:"execute_file_hash"`
CreatedAt *time.Time `db:"created_at"`
UpdatedAt *time.Time `db:"updated_at"`
Name string
CompileCmd []string //source: src;result:executable
RunCmd []string //source: executable
}
var languages = [...]Language {
{Name : "gcc std=c90",
CompileCmd : []string{"gcc", "src","-std=c90","-o","executable"},
RunCmd : []string{"executable"}},
}