+
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion example/newrepo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ var (
name = flag.String("name", "", "Name of repo to create in authenticated user's GitHub account.")
description = flag.String("description", "", "Description of created repo.")
private = flag.Bool("private", false, "Will created repo be private.")
autoInit = flag.Bool("auto-init", false, "Pass true to create an initial commit with empty README.")
)

func main() {
Expand All @@ -40,7 +41,7 @@ func main() {
tc := oauth2.NewClient(ctx, ts)
client := github.NewClient(tc)

r := &github.Repository{Name: name, Private: private, Description: description}
r := &github.Repository{Name: name, Private: private, Description: description, AutoInit: autoInit}
repo, _, err := client.Repositories.Create(ctx, "", r)
if err != nil {
log.Fatal(err)
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载