File: example_test.go

package info (click to toggle)
golang-github-denisbrodbeck-machineid 1.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 172 kB
  • sloc: makefile: 22
file content (25 lines) | stat: -rw-r--r-- 339 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package machineid_test

import (
	"fmt"
	"log"

	"github.com/denisbrodbeck/machineid"
)

func Example() {
	id, err := machineid.ID()
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(id)
}

func Example_protected() {
	appID := "Corp.SomeApp"
	id, err := machineid.ProtectedID(appID)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(id)
}