tarantool/go-tarantool

Implement Stringer interface for pool.Role

Closed this issue · 1 comments

The problem is that now when logging via %v the role status is displayed as a number
sucessfully connected to pool; map[mydb1:{true 1} mydb2:{true 2}]

For backward compatibility, I suggest making a String() method with selection by switch case

type Role uint32

or should I just use type string instead of uint? This information is mainly used for logs, so including the format in json will then work more informatively