Trying to compile:

time = time.Now() ruTime.Time = russiantime.Time ruTime.FormatRU("%YYYY %YYY %YY %Y,") 

but the error in the package itself:

ParseFloat redeclared during import "strconv" at line 5 col 1 previous declaration during import "math / big" (build)

Has anyone come across this and how to solve it?

  • With this, you probably want the author of the package. - D-side

1 answer 1

If we are russiantime about the same thing , then the problem is that the import in the russiantime package russiantime organized with placing the exported identifiers of third-party packages into the file block, while the two packages have the same identifiers (apparently, this was not the case once). If it is simpler, the points are to blame for everything:

 import ( . "math/big" . "strconv" "strings" "time" ) 

It is not repaired in the most pleasant way, but, due to the scanty volume of the module, it is not so bad, the points are removed, the use of identifiers is cleared with packet prefixes, a simple patch is obtained.


The patch was accepted by the author , so the current version will work by itself.