mirror of
https://github.com/digarok/Appy.git
synced 2024-06-14 12:29:35 +00:00
25 lines
496 B
Go
25 lines
496 B
Go
package core
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/digarok/appy/core/project"
|
|
"github.com/digarok/merlingo"
|
|
)
|
|
|
|
func Format(args []string) {
|
|
if len(args) == 0 {
|
|
// format all assembly files in appy.yaml
|
|
for _, filename := range project.AppyProj.Assemble {
|
|
fmt.Printf("Formatting %v\n", filename)
|
|
merlingo.FmtFile(filename)
|
|
}
|
|
} else {
|
|
// format all assembly files in args
|
|
for _, filename := range args {
|
|
fmt.Printf("Formatting %v\n", filename)
|
|
merlingo.FmtFile(filename)
|
|
}
|
|
}
|
|
}
|