• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yitsushi / macpot / 4284291729

pending completion
4284291729

Pull #10

github

GitHub
Merge 8169ebedc into be03cc87c
Pull Request #10: Bump github.com/stretchr/testify from 1.8.1 to 1.8.2

180 of 192 relevant lines covered (93.75%)

10.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/options.go
1
package macpot
2

3
// Option that can change the behaviour of the New() function.
4
type Option func(*MAC) error
5

6
// AsLocal is an Option for New() that sets the generated MAC address to be a
7
// Locally Administered address.
8
func AsLocal() Option {
1✔
9
        return func(mac *MAC) error {
2✔
10
                mac.SetLocal()
1✔
11

1✔
12
                return nil
1✔
13
        }
1✔
14
}
15

16
// AsGlobal is an Option for New() that sets the generated MAC address to be a
17
// Globally Unique address.
18
func AsGlobal() Option {
1✔
19
        return func(mac *MAC) error {
2✔
20
                mac.SetGlobal()
1✔
21

1✔
22
                return nil
1✔
23
        }
1✔
24
}
25

26
// AsUnicast is an Option for New() that sets the generated MAC address to be a
27
// Unicast address.
28
func AsUnicast() Option {
1✔
29
        return func(mac *MAC) error {
2✔
30
                mac.SetUnicast()
1✔
31

1✔
32
                return nil
1✔
33
        }
1✔
34
}
35

36
// AsMulticast is an Option for New() that sets the generated MAC address to be a
37
// Multicast address.
38
func AsMulticast() Option {
1✔
39
        return func(mac *MAC) error {
2✔
40
                mac.SetMulticast()
1✔
41

1✔
42
                return nil
1✔
43
        }
1✔
44
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc