Setup go server
This commit is contained in:
parent
1383549e4b
commit
268dd63423
6 changed files with 143 additions and 17 deletions
4
.formatter.exs
Normal file
4
.formatter.exs
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Used by "mix format"
|
||||||
|
[
|
||||||
|
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
|
||||||
|
]
|
50
.gitignore
vendored
50
.gitignore
vendored
|
@ -1,16 +1,36 @@
|
||||||
# ---> Clojure
|
# .gitignore config
|
||||||
pom.xml
|
|
||||||
pom.xml.asc
|
|
||||||
*.jar
|
|
||||||
*.class
|
|
||||||
/lib/
|
|
||||||
/classes/
|
|
||||||
/target/
|
|
||||||
/checkouts/
|
|
||||||
.lein-deps-sum
|
|
||||||
.lein-repl-history
|
|
||||||
.lein-plugins/
|
|
||||||
.lein-failures
|
|
||||||
.nrepl-port
|
|
||||||
.cpcache/
|
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
25
Gopkg.lock
generated
Normal file
25
Gopkg.lock
generated
Normal file
|
@ -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
|
34
Gopkg.toml
Normal file
34
Gopkg.toml
Normal file
|
@ -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"
|
22
README.md
22
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
|
|
25
app/main.go
Normal file
25
app/main.go
Normal file
|
@ -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()
|
||||||
|
}
|
Loading…
Reference in a new issue