MCPcopy Create free account
hub / github.com/ethstorage/es-node / writeHtmlFile

Function writeHtmlFile

cmd/alert/main.go:104–115  ·  view source on GitHub ↗
(content string, lg log.Logger)

Source from the content-addressed store, hash-verified

102}
103
104func writeHtmlFile(content string, lg log.Logger) {
105 file, err := os.Create(*bodyFileFlag)
106 if err != nil {
107 lg.Crit("Create html file fail", "error", err.Error())
108 }
109 defer file.Close()
110
111 _, err = file.WriteString(content)
112 if err != nil {
113 lg.Crit("Write html file fail", "error", err.Error())
114 }
115}
116
117func addToEmailList(emailList map[string]struct{}, emailToString string) {
118 emails := strings.SplitSeq(emailToString, ",")

Callers 1

mainFunction · 0.85

Calls 2

CloseMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected