在golang里,如何规范context类型key的使用
Q1: "should not use built-in type string as key for value; define your own type to avoid collisions"
A!: 现代软件都是团队开发的,多人协作的成果。
一个ctx对象在整个生命周期中,可能经过多个模块使用,每一个模块都可能使用 ctx 来存储相应信息。
from starlette.applications import Starlette | |
from starlette.routing import Route | |
from starlette.responses import PlainTextResponse | |
import httpx | |
import aiohttp | |
HOST, PORT = "localhost", 8000 | |
URL = f"http://{HOST}:{PORT}/" |
To remove a submodule you need to:
How To Install git on Mac?
How To Install Homebrew on Mac in China mainland?
How To Config Vim?
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
alias gpl="git pull origin" | |
alias gps="git push origin" | |
alias gst="git status" | |
alias gd="git diff" | |
alias gsm="git commit -m" | |
alias grs="git reset --soft" | |
alias grh="git reset --hard" | |
alias gdca='git diff --cached' | |
alias del_pyc="find . -type f -name '*.pyc' -delete" | |
alias py_info="python --version" |