* IDState cleaned up. Should work on all *NIXes now. * Can now get IDState of arbitrary PID. * Shuffled some env stuff around.
19 lines
394 B
Go
19 lines
394 B
Go
package internal
|
|
|
|
import (
|
|
`regexp`
|
|
)
|
|
|
|
// OS-specific path environment variable name. The default is "PATH".
|
|
var (
|
|
pathEnvVarName map[string]string = map[string]string{
|
|
"windows": "Path",
|
|
}
|
|
)
|
|
|
|
// Compiled regex patterns.
|
|
var (
|
|
reMaybeInt *regexp.Regexp = regexp.MustCompile(`^(?P<sign>\+|-)[0-9]+$`)
|
|
reMaybeFloat *regexp.Regexp = regexp.MustCompile(`(?P<sign>\+|-)?[0-9]+\.[0-9]+$`)
|
|
)
|