From 4389caddcbeb3df8d184ee8dbf78af38d032aa00 Mon Sep 17 00:00:00 2001 From: Evan Reichard Date: Sat, 2 Jan 2021 22:21:11 -0500 Subject: [PATCH] Initial Commit --- README.md | 2 ++ cmd/cmd.go | 17 +++++++++++++++++ go.mod | 5 +++++ go.sum | 12 ++++++++++++ main.go | 22 ++++++++++++++++++++++ notes | 10 ++++++++++ 6 files changed, 68 insertions(+) create mode 100644 README.md create mode 100644 cmd/cmd.go create mode 100644 go.mod create mode 100644 go.sum create mode 100644 main.go create mode 100644 notes diff --git a/README.md b/README.md new file mode 100644 index 0000000..3b1e054 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Imagini + diff --git a/cmd/cmd.go b/cmd/cmd.go new file mode 100644 index 0000000..66a2c37 --- /dev/null +++ b/cmd/cmd.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "fmt" + "github.com/urfave/cli" +) + +var CmdServe = cli.Command{ + Name: "serve", + Usage: "Start Imagini web server.", + Action: serveWeb, +} + +func serveWeb(ctx *cli.Context) error { + fmt.Println("hello world") + return nil +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..6cb842a --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module reichard.io/imagini + +go 1.15 + +require github.com/urfave/cli v1.22.5 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..a621ebb --- /dev/null +++ b/go.sum @@ -0,0 +1,12 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/urfave/cli v1.22.5 h1:lNq9sAHXK2qfdI8W+GRItjCEkI+2oR4d+MEHy1CKXoU= +github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/main.go b/main.go new file mode 100644 index 0000000..4afa5a4 --- /dev/null +++ b/main.go @@ -0,0 +1,22 @@ +package main + +import ( + "os" + "log" + "reichard.io/imagini/cmd" + "github.com/urfave/cli" +) + +func main() { + app := cli.NewApp() + app.Name = "Imagini" + app.Usage = "A self hosted photo library." + + app.Commands = []cli.Command{ + cmd.CmdServe, + } + err := app.Run(os.Args) + if err != nil { + log.Fatal(err) + } +} diff --git a/notes b/notes new file mode 100644 index 0000000..02daa4a --- /dev/null +++ b/notes @@ -0,0 +1,10 @@ +Misc: + - Macaron + https://go-macaron.com/ + - CLI + https://github.com/urfave/cli + +API: + - tag search + - :wq +