In aws-sdk-v2 library for Go, we have the following interfaces definitions:
type Retryer interface {
GetInitialToken() (releaseToken func(error) error)
}
type RetryerV2 interface {
Retryer
GetInitialToken() (releaseToken func(error) error)
}
(the code is here: https://github.com/aws/aws-sdk-go-v2/blob/main/aws/retryer.go)
This causes compilation error:
aws/retryer.go:81: GetInitialToken redeclared (compile)
Is this code correct or not? Is it possible to redeclare function in of interfaces? How am I supposed to solve this problem?