Commit 1f67fdd1 authored by Jonathan DeMasi's avatar Jonathan DeMasi

init

parents
package main
import (
"fmt"
"os"
"bufio"
)
type Step struct {
name string
cores int
mem string
partition string
walltime string
mail bool
command string
}
type Pipeline struct {
name string
steps []Step
eofiles string
modules []string
}
func NextStep() *Step {
step := new(Step)
fmt.Print("Enter a name for this step: ")
reader := bufio.NewReader(os.Stdin)
step.name, _ = reader.ReadString('\n')
return(step)
}
func main() {
// Intro text
fmt.Println("Welcome to JonJon's Pipeline Builder!")
fmt.Println("All spaces will be replaced with _ in names.")
fmt.Println("Spaces in paths need to be escaped with '\\'")
// Initialize a new pipeline
pipeline := new(Pipeline)
fmt.Print("Enter a name for this pipeline: ")
reader := bufio.NewReader(os.Stdin)
pipeline.name, _ = reader.ReadString('\n')
fmt.Println("Where would you like to put the error and output files for this pipeline? The directory must already exist.")
reader = bufio.NewReader(os.Stdin)
pipeline.eofiles, _ = reader.ReadString('\n')
// We need AT LEAST one step
stepper := NextStep()
pipeline.steps = append(pipeline.steps, *stepper)
fmt.Println(pipeline)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment