MCPcopy
hub / github.com/apache/devlake / IsWSL

Function IsWSL

backend/test/helper/utils.go:33–51  ·  view source on GitHub ↗

IsWSL FIXME

()

Source from the content-addressed store, hash-verified

31
32// IsWSL FIXME
33func IsWSL() bool {
34 file, err := os.Open("/proc/version")
35 if err != nil {
36 return false
37 }
38 defer file.Close()
39 var lines []string
40 scanner := bufio.NewScanner(file)
41 for scanner.Scan() {
42 lines = append(lines, scanner.Text())
43 }
44 for _, line := range lines {
45 l := strings.ToLower(line)
46 if strings.Contains(l, "microsoft") {
47 return true
48 }
49 }
50 return false
51}
52
53// GetSubtaskNames FIXME
54func GetSubtaskNames(metas ...plugin.SubTaskMeta) []string {

Callers

nothing calls this directly

Calls 2

CloseMethod · 0.65
ScanMethod · 0.65

Tested by

no test coverage detected