// 随机选择一个发送 index := rand.Intn(3) intChannels[index] <- index t.Logf("向channe%d发送", index)
select { case e := <-intChannels[0]: t.Logf("0接收到:%d", e) case e := <-intChannels[1]: t.Logf("1接收到:%d", e) case e := <-intChannels[2]: t.Logf("2接收到:%d", e) default: t.Log("都没选中") } }
由于历史原因,不同的操作系统,在处理换行符时,使用了不同的方案。Windows 操作系统使用了 CRLF,而 Unix 阵营的操作系统则使用了 LF。Mac OS 最起初使用了 CR,后来到了 Mac OS X 后,改成了使用 LF,与 Unix 阵营保持了一致。虽然目前很多代码编辑器都支持自动识别和切换换行符风格,然而,总有那么一些不合群的编辑器,无法达到相应的兼容性。
$ git flow init Initialized empty Git repository in D:/temp/gitflow/.git/ No branches exist yet. Base branches must be created now. Branch name for production releases: [master] Branch name for "next release" development: [develop]
How to name your supporting branch prefixes? Feature branches? [feature/] Bugfix branches? [bugfix/] Release branches? [release/] Hotfix branches? [hotfix/] Support branches? [support/] Version tag prefix? [] Hooks and filters directory? [D:/temp/gitflow/.git/hooks]
git flow的初始化,相比于git init的初始化,会自动创建分支。
gitflow工作流主要使用两个分支。

Summary of actions: - The feature branch 'feature/add-user' was merged into 'develop' - Feature branch 'feature/add-user' has been locally deleted - You are now on branch 'develop'
$ git flow release finish 0.1.0 Switched to branch 'master' Merge made by the 'recursive' strategy. AddUser.java | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 AddUser.java Already on 'master' Switched to branch 'develop' Already up to date! Merge made by the 'recursive' strategy. Deleted branch release/0.1.0 (was 744118e).
Summary of actions: - Release branch 'release/0.1.0' has been merged into 'master' - The release was tagged '0.1.0' - Release tag '0.1.0' has been back-merged into 'develop' - Release branch 'release/0.1.0' has been locally deleted - You are now on branch 'develop'
Summary of actions: - Hotfix branch 'hotfix/userbug-fix' has been merged into 'master' - The hotfix was tagged 'userbug-fix' - Hotfix branch 'hotfix/userbug-fix' has been locally deleted - You are now on branch 'develop'