()
| 64 | } |
| 65 | |
| 66 | func (c SpreadCli) globalProject() (*project.Project, error) { |
| 67 | proj, err := project.Global() |
| 68 | if err != nil { |
| 69 | if strings.HasSuffix(err.Error(), "no such file or directory") { |
| 70 | return project.InitGlobal() |
| 71 | } |
| 72 | return nil, err |
| 73 | } |
| 74 | return proj, nil |
| 75 | } |
| 76 | |
| 77 | func (c SpreadCli) printf(message string, data ...interface{}) { |
| 78 | // add newline if doesn't have one |