Added godocs

This commit is contained in:
Russ Magee 2018-06-27 15:18:28 -07:00
parent 487fffbaa5
commit e5fe0ea0b3
1 changed files with 4 additions and 0 deletions

View File

@ -84,10 +84,12 @@ import (
"time"
)
// UtmpEntry wraps the C struct utmpx
type UtmpEntry struct {
entry C.struct_utmpx
}
// Put a username and the originating host/IP to utmp
func Put_utmp(user string, host string) (UtmpEntry) {
var entry UtmpEntry
@ -95,10 +97,12 @@ func Put_utmp(user string, host string) (UtmpEntry) {
return entry
}
// Remove a username/host entry from utmp
func Unput_utmp(entry UtmpEntry) {
C.unpututmp(&entry.entry)
}
// Put the login app, username and originating host/IP to lastlog
func Put_lastlog_entry(app string, usr string, host string) {
u, e := user.Lookup(usr)
if e != nil {