MCPcopy Create free account
hub / github.com/Moopinger/smugglefuzz / ReadTargetFile

Function ReadTargetFile

lib/target.go:22–32  ·  view source on GitHub ↗
(fileName string)

Source from the content-addressed store, hash-verified

20}
21
22func ReadTargetFile(fileName string) ([]string, error) {
23 content, err := os.ReadFile(fileName)
24 if err != nil {
25 return nil, err
26 }
27
28 unifiedContent := strings.ReplaceAll(string(content), "\r\n", "\n")
29 lines := strings.Split(unifiedContent, "\n")
30
31 return lines, nil
32}
33
34func NewTarget(url string) (*Target, error) {
35

Callers 1

scan.goFile · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected