func init() { // Register eventlogging API if it is available. available, _ := sys.IsAvailable() if available { Register(winEventLogAPIName, 0, newWinEventLog, sys.Channels) } }
func init() { // Register wineventlog API if it is available. available, _ := win.IsAvailable() if available { Register(winEventLogAPIName, 0, newWinEventLog, win.Channels) } }
// IsAvailable returns true if the Windows Event Log API is available on this // system. func IsAvailable() (bool, error) { avail, err := sys.IsAvailable() return avail, err }