分两种情况:
- 代码仓库管理者给你添加该仓库的写入权限,这样的话可以直接push
- 如果不能直接push(大多数情况),采用经典的fork & pull request来提交代码,下面讲述这种情况
例如有个仓库https://github.com/ecomfe/esui.git
,其采用了经典的分支开发模型,稳定后的代码提交到master分支,其余特性则在dev分支上进行开发,待成熟后合并回master分支。
import { serve } from "https://deno.land/std/http/mod.ts"; | |
import { lookup } from "https://deno.land/x/media_types/mod.ts"; | |
const BASE_PATH = ""; | |
const reqHandler = async (req: Request) => { | |
const filePath = BASE_PATH + new URL(req.url).pathname; | |
let fileSize; | |
try { | |
fileSize = (await Deno.stat(filePath)).size; |
package sign | |
import ( | |
"reflect" | |
"sort" | |
"strconv" | |
"strings" | |
) | |
// GeneratePreSign from objects generates a pre-signed message |
# vscode 打开当前目录 | |
alias vsc='code "$PWD"' | |
# goland 打开当前目录 | |
alias god='goland "$PWD"' | |
# 打开 git repo | |
alias gop="git open" | |
# 格式化Go项目代码 |
var domNode = { | |
tagName: "ul", | |
props: { class: "list" }, | |
children: [{ | |
tagName: "li", | |
children: ["1"], | |
}, { | |
tagName: "li", | |
children: ["2"], | |
}, { |
{ | |
"read": "2018-10-19T09:54:05.6070482Z", | |
"preread": "2018-10-19T09:54:04.6044412Z", | |
"pids_stats": { | |
"current": 1 | |
}, | |
"blkio_stats": { | |
"io_service_bytes_recursive": [ | |
{ | |
"major": 8, |
goimports -w -l $(find . -type f -name '*.go' -not -path "./vendor/*") |
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
type My struct { | |
Name string | |
Id int |