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

tarantool / go-tarantool / 10718406582

05 Sep 2024 10:14AM UTC coverage: 73.807% (+0.04%) from 73.765%
10718406582

Pull #406

github

Maksim Konovalov
pool: implemented Role Stringer interface

implemented Role Stringer interface for human-readable printing
Pull Request #406: pool: implemented Role Stringer interface

17 of 29 new or added lines in 2 files covered. (58.62%)

5937 of 8044 relevant lines covered (73.81%)

4961.82 hits per line

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

60.0
/pool/role_string.go
1
// Code generated by "stringer -type=Role -trimprefix=Role"; DO NOT EDIT.
2

3
package pool
4

5
import "strconv"
6

7
func _() {
8
        // An "invalid array index" compiler error signifies that the constant values have changed.
9
        // Re-run the stringer command to generate them again.
10
        var x [1]struct{}
11
        _ = x[RoleUnknown-0]
12
        _ = x[RoleMaster-1]
13
        _ = x[RoleReplica-2]
14
}
15

16
const _Role_name = "UnknownMasterReplica"
17

18
var _Role_index = [...]uint8{0, 7, 13, 20}
19

20
func (i Role) String() string {
3✔
21
        if i >= Role(len(_Role_index)-1) {
3✔
NEW
22
                return "Role(" + strconv.FormatInt(int64(i), 10) + ")"
×
NEW
23
        }
×
24
        return _Role_name[_Role_index[i]:_Role_index[i+1]]
3✔
25
}
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