Move utils and test config to separate packages #58

This commit is contained in:
Michael Mayer
2018-11-17 06:21:39 +01:00
parent f3129097cf
commit fb91ce9a06
47 changed files with 1220 additions and 749 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"log"
"github.com/photoprism/photoprism/internal/context"
"github.com/photoprism/photoprism/internal/photoprism"
"github.com/urfave/cli"
)
@@ -15,8 +16,8 @@ var IndexCommand = cli.Command{
}
// Indexes original photos; called by IndexCommand
func indexAction(context *cli.Context) error {
conf := photoprism.NewConfig(context)
func indexAction(ctx *cli.Context) error {
conf := context.NewConfig(ctx)
if err := conf.CreateDirectories(); err != nil {
log.Fatal(err)