MCPcopy
hub / github.com/mislav/hub / msgFromFile

Function msgFromFile

commands/utils.go:89–103  ·  view source on GitHub ↗
(filename string)

Source from the content-addressed store, hash-verified

87}
88
89func msgFromFile(filename string) (string, error) {
90 var content []byte
91 var err error
92
93 if filename == "-" {
94 content, err = ioutil.ReadAll(os.Stdin)
95 } else {
96 content, err = ioutil.ReadFile(filename)
97 }
98 if err != nil {
99 return "", err
100 }
101
102 return strings.Replace(string(content), "\r\n", "\n", -1), nil
103}
104
105func printBrowseOrCopy(args *Args, msg string, openBrowser bool, performCopy bool) {
106 if performCopy {

Callers 5

createReleaseFunction · 0.85
editReleaseFunction · 0.85
pullRequestFunction · 0.85
createIssueFunction · 0.85
updateIssueFunction · 0.85

Calls 1

ReplaceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…