consolidated go and scala repos into this repo as well
This commit is contained in:
19
go/cmd/cons.go
Normal file
19
go/cmd/cons.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"gitlab.com/fizzizist/go-rosalind/pkg/solutions"
|
||||
)
|
||||
|
||||
var consCmd = &cobra.Command{
|
||||
Use: "cons",
|
||||
Short: "Finds a Motif in input DNA",
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
solutions.Cons(args[0])
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(consCmd)
|
||||
}
|
||||
12
go/cmd/root.go
Normal file
12
go/cmd/root.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package cmd
|
||||
|
||||
import "github.com/spf13/cobra"
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "go-rosalind",
|
||||
Short: "An app for running Rosalind solutions",
|
||||
}
|
||||
|
||||
func Execute() error {
|
||||
return rootCmd.Execute()
|
||||
}
|
||||
19
go/cmd/subs.go
Normal file
19
go/cmd/subs.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"gitlab.com/fizzizist/go-rosalind/pkg/solutions"
|
||||
)
|
||||
|
||||
var dnaMotifsCmd = &cobra.Command{
|
||||
Use: "subs",
|
||||
Short: "Finds a Motif in input DNA",
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
solutions.FindMotifs(args[0])
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(dnaMotifsCmd)
|
||||
}
|
||||
Reference in New Issue
Block a user