From 268dd6342395a336709bb7d595c12c40feb11759 Mon Sep 17 00:00:00 2001 From: Carolyn Knight-Serrano Date: Tue, 17 Dec 2019 03:47:15 -0800 Subject: [PATCH] Setup go server --- .formatter.exs | 4 ++++ .gitignore | 50 +++++++++++++++++++++++++++++++++++--------------- Gopkg.lock | 25 +++++++++++++++++++++++++ Gopkg.toml | 34 ++++++++++++++++++++++++++++++++++ README.md | 22 ++++++++++++++++++++-- app/main.go | 25 +++++++++++++++++++++++++ 6 files changed, 143 insertions(+), 17 deletions(-) create mode 100644 .formatter.exs create mode 100644 Gopkg.lock create mode 100644 Gopkg.toml create mode 100644 app/main.go diff --git a/.formatter.exs b/.formatter.exs new file mode 100644 index 0000000..d2cda26 --- /dev/null +++ b/.formatter.exs @@ -0,0 +1,4 @@ +# Used by "mix format" +[ + inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] +] diff --git a/.gitignore b/.gitignore index 3387254..0b75beb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,36 @@ -# ---> Clojure -pom.xml -pom.xml.asc -*.jar -*.class -/lib/ -/classes/ -/target/ -/checkouts/ -.lein-deps-sum -.lein-repl-history -.lein-plugins/ -.lein-failures -.nrepl-port -.cpcache/ +# .gitignore config +# aah application - start +aah.go +aah_*_vfs.go +*.pid +app/generated +build/ +vendor/*/ +main +# aah application - end + +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/Gopkg.lock b/Gopkg.lock new file mode 100644 index 0000000..910a24f --- /dev/null +++ b/Gopkg.lock @@ -0,0 +1,25 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + digest = "1:cca84f57a4b9505914704f7c93937573763bb9a656eb006e144e81615b5f3cb6" + name = "gitea.com/lunny/log" + packages = ["."] + pruneopts = "UT" + revision = "01b5df579c4e3c867d69e733e6e532b2923e711c" + version = "v0.2" + +[[projects]] + digest = "1:7d6017c139cce637f0dbe70361addf48a5a8c132b062bd816b17dfbcba8e5530" + name = "gitea.com/lunny/tango" + packages = ["."] + pruneopts = "UT" + revision = "af459469e09da76b00b310365998396b33ea4aa9" + version = "v0.6.2" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + input-imports = ["gitea.com/lunny/tango"] + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 0000000..b353433 --- /dev/null +++ b/Gopkg.toml @@ -0,0 +1,34 @@ +# Gopkg.toml example +# +# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" +# +# [prune] +# non-go = false +# go-tests = true +# unused-packages = true + + +[prune] + go-tests = true + unused-packages = true + +[[constraint]] + name = "gitea.com/lunny/tango" + version = "0.6.2" diff --git a/README.md b/README.md index 29a3ab9..a1c9da5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,21 @@ -# pinkblackrose +# Pinkblackrose + +**TODO: Add description** + +## Installation + +If [available in Hex](https://hex.pm/docs/publish), the package can be installed +by adding `pinkblackrose` to your list of dependencies in `mix.exs`: + +```elixir +def deps do + [ + {:pinkblackrose, "~> 0.1.0"} + ] +end +``` + +Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc) +and published on [HexDocs](https://hexdocs.pm). Once published, the docs can +be found at [https://hexdocs.pm/pinkblackrose](https://hexdocs.pm/pinkblackrose). -Queer anarchist forum \ No newline at end of file diff --git a/app/main.go b/app/main.go new file mode 100644 index 0000000..d6cef02 --- /dev/null +++ b/app/main.go @@ -0,0 +1,25 @@ +package main + +import ( + "errors" + "gitea.com/lunny/tango" +) + +type Action struct { + tango.JSON +} + +func (Action) Get() interface{} { + if true { + return map[string]string{ + "say": "Hello tango!", + } + } + return errors.New("something error") +} + +func main() { + t := tango.Classic() + t.Get("/", new(Action)) + t.Run() +}