or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
初學 Go 專案目錄結構與設計 - 吳柏毅 (appleboy)
歡迎來到 Modern Web 2019 共筆
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →共筆入口:https://hackmd.io/@ModernWeb/2019
手機版請點選上方 按鈕展開議程列表。
Go in Mediatek
Initial Project with Go in 2018/01
Go Project Layout
Repository folder
api/
assets/
(Embed files in Go)cmd/
configs/
docker/
pkg/
/.drone.yml
(deploy config)/.revive.toml
(golint config)/docker-compose.yml
(DB, Redis and UI)/Makefile
/.env.example
前端自己起 Docker 內的 Redis & DB 來測試
Go Module
https://blog.golang.org/using-go-modules
Improve Deployment Using Go Module Proxy
https://github.com/gomods/athens
Save time with proxy: 97s -> 6s
Makefile
不喜歡記一堆 command,記在Makefile中
.env
README.md
Version
-X github.com/go-ggz/ggz/pkg/version.Version=$(VERSION)
Assets
API
/healthz
Command line package
Config Management
https://github.com/spf13/viper
_"https://github.com/joho/godotenv/autoload"
/configs
Integration
https://github.com/testcontainers/testcontainers-go
/pkg
/errors
/fixtures
/helper
/middleware
/model
gorm or xorm/module
mailer, storage../schema
prometheus token
Go Practices
RESTFul api and GraphQL
Model testing
Go testing
go test package_name
Subtest
Skipping Testing
Parallel
tags:
MW19