github.com/echohead/hub@v2.2.1+incompatible/github/util.go (about) 1 package github 2 3 import ( 4 "github.com/github/hub/git" 5 "github.com/github/hub/Godeps/_workspace/src/github.com/mattn/go-isatty" 6 ) 7 8 func IsHttpsProtocol() bool { 9 httpProcotol, _ := git.Config("hub.protocol") 10 if httpProcotol == "https" { 11 return true 12 } 13 14 httpClone, _ := git.Config("--bool hub.http-clone") 15 if httpClone == "true" { 16 return true 17 } 18 19 return false 20 } 21 22 func isTerminal(fd uintptr) bool { 23 return isatty.IsTerminal(fd) 24 }