()
| 45 | } |
| 46 | |
| 47 | func build() error { |
| 48 | log.Println("Building Application") |
| 49 | cwd, err := os.Getwd() |
| 50 | if err != nil { |
| 51 | return err |
| 52 | } |
| 53 | |
| 54 | dir := filepath.Join(cwd, "components") |
| 55 | // err = component.ProcessAll(dir, "components") |
| 56 | err = component.ProcessAll(dir) |
| 57 | if err != nil { |
| 58 | return err |
| 59 | } |
| 60 | |
| 61 | dir = filepath.Join(cwd, "routes") |
| 62 | // err = component.ProcessAll(dir, "routes") |
| 63 | err = route.ProcessAll(dir) |
| 64 | if err != nil { |
| 65 | return err |
| 66 | } |
| 67 | |
| 68 | dir = filepath.Join(cwd, "models") |
| 69 | err = model.ProcessAll(dir) |
| 70 | if err != nil { |
| 71 | return err |
| 72 | } |
| 73 | return nil |
| 74 | } |
| 75 | func init() { |
| 76 | rootCmd.AddCommand(buildCmd) |
| 77 |
no test coverage detected