go-cleanarchitecture

一个演示清晰架构的 Go 应用程序示例。(An example Go application demonstrating The Clean Architecture.)

  • 所有者: manuelkiessling/go-cleanarchitecture
  • 平台: Linux, Mac, Windows
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

go-cleanarchitecture

An example Go application demonstrating The Clean Architecture.

http://manuel.kiessling.net/2012/09/28/applying-the-clean-architecture-to-go-applications/

Install

Create a new directory, where to host this project

mkdir -p $GOPATH:src/github.com/manuelkiessling/

Check out the source

cd $GOPATH:src/github.com/manuelkiessling/
git clone https://github.com/manuelkiessling/go-cleanarchitecture

Setup the GOPATH to include this path

cd go-cleanarchitecture
export GOPATH=$GOPATH:`pwd`

Then build the project

go get
go build

Create the SQLite structure

sqlite3 /var/tmp/production.sqlite < setup.sql

Run the server

go-cleanarchitecture

Access the web endpoint at http://localhost:8080/orders?userId=40&orderId=60

To run the tests, for each module, run

cd src/infrastructure && go test
cd src/interfaces && go test

Enjoy.

License

The MIT License (MIT)

Copyright (c) 2012 Manuel Kiessling

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

主要指標

概覽
名稱與所有者manuelkiessling/go-cleanarchitecture
主編程語言Go
編程語言Shell (語言數: 2)
平台Linux, Mac, Windows
許可證
所有者活动
創建於2012-09-27 18:59:33
推送於2021-07-16 06:54:44
最后一次提交2018-07-06 13:31:01
發布數0
用户参与
星數613
關注者數20
派生數104
提交數20
已啟用問題?
問題數4
打開的問題數4
拉請求數3
打開的拉請求數1
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?