mirror of
https://gogs.blitter.com/RLabs/goutmp
synced 2024-08-14 19:26:41 +00:00
Added godocs
This commit is contained in:
parent
487fffbaa5
commit
e5fe0ea0b3
1 changed files with 4 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue