| 1 | package machineid_test |
| 2 | |
| 3 | import ( |
| 4 | "fmt" |
| 5 | "log" |
| 6 | |
| 7 | "github.com/denisbrodbeck/machineid" |
| 8 | ) |
| 9 | |
| 10 | func Example() { |
| 11 | id, err := machineid.ID() |
| 12 | if err != nil { |
| 13 | log.Fatal(err) |
| 14 | } |
| 15 | fmt.Println(id) |
| 16 | } |
| 17 | |
| 18 | func Example_protected() { |
| 19 | appID := "Corp.SomeApp" |
| 20 | id, err := machineid.ProtectedID(appID) |
| 21 | if err != nil { |
| 22 | log.Fatal(err) |
| 23 | } |
| 24 | fmt.Println(id) |
| 25 | } |