Apisix-dashboard: [style] adjust directory structure of api to golang standard style

Created on 9 Nov 2020  ยท  6Comments  ยท  Source: apache/apisix-dashboard

ref to #715

backend

Most helpful comment

Also, we can obey the uber-go style guide.

All 6 comments

@gxthrj please set right lable

please check the other issues you have created: label and milestone

2.1 is ok for me, but not sure if it's a big project to reactor api's directory at that time ๐Ÿค”

A popular go project layout is like:

.
โ”œโ”€โ”€ build-tools
โ”œโ”€โ”€ cmd
โ”‚ย ย  โ””โ”€โ”€ manager-api
โ”œโ”€โ”€ conf # default config path
โ”œโ”€โ”€ logs
โ”œโ”€โ”€ output
โ”‚ย ย  โ”œโ”€โ”€ conf
โ”‚ย ย  โ””โ”€โ”€ dag-to-lua
โ”œโ”€โ”€ pkg
โ”‚ย ย  โ”œโ”€โ”€ config
โ”‚ย ย  โ”œโ”€โ”€ entity
โ”‚ย ย  โ”œโ”€โ”€ filter
โ”‚ย ย  โ”œโ”€โ”€ handler
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ authentication
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ consumer
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ healthz
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ plugin
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ route
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ service
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ ssl
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ upstream
โ”‚ย ย  โ”œโ”€โ”€ log
โ”‚ย ย  โ”œโ”€โ”€ storage
โ”‚ย ย  โ”œโ”€โ”€ store
โ”‚ย ย  โ””โ”€โ”€ utils
โ”‚ย ย      โ””โ”€โ”€ consts
โ””โ”€โ”€ test
    โ”œโ”€โ”€ docker
    โ”œโ”€โ”€ e2e
    โ””โ”€โ”€ shell

Note this is only a demonstration not the ultimate one.

Also, we can obey the uber-go style guide.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nic-chen picture nic-chen  ยท  6Comments

stu01509 picture stu01509  ยท  3Comments

gxthrj picture gxthrj  ยท  5Comments

juzhiyuan picture juzhiyuan  ยท  3Comments

moonming picture moonming  ยท  6Comments