package server import ( "io" "os/exec" ) //Handler is handler type Handler struct { ServerJar string JavaPath string minRAM string maxRAM string args string stdout io.ReadCloser stdin io.WriteCloser cmd *exec.Cmd isRunning bool log []Log } //NewHandler means everythign starts here :) func NewHandler(JavaPath string, ServerJar string, minRAM string, maxRAM string, args string) *Handler { NewlyCreatedHandler := Handler{ ServerJar: ServerJar, JavaPath: JavaPath, minRAM: minRAM, maxRAM: maxRAM, args: args, isRunning: false, log: []Log{}, } return &NewlyCreatedHandler }