mirror of
https://gogs.blitter.com/RLabs/goutmp
synced 2024-08-14 19:26:41 +00:00
c3193d4a77
Signed-off-by: Russ Magee <rmagee@gmail.com>
18 lines
276 B
Go
18 lines
276 B
Go
// +build linux
|
|
|
|
package main
|
|
|
|
import (
|
|
"time"
|
|
|
|
"blitter.com/go/goutmp"
|
|
)
|
|
|
|
func main() {
|
|
user := "bin"
|
|
host := "test.example.com"
|
|
utmp := goutmp.Put_utmp(user, host)
|
|
goutmp.Put_lastlog_entry("hkexsh", user, host)
|
|
time.Sleep(10 * time.Second)
|
|
goutmp.Unput_utmp(utmp)
|
|
}
|