-
-
Notifications
You must be signed in to change notification settings - Fork 52
Migration to v48
The whole repository architecture has been rewritten, but the transition should be fairly smooth.
Convert all imports
// Old:
"github.com/alaingilbert/ogame"
// New:
"github.com/alaingilbert/ogame/pkg/ogame"
If you were using ogame.New
ogame.NewWithParams
ogame.NewNoLogin
ogame.Celestial
ogame.Planet
ogame.Moon
ogame.Wrapper
there types are now in the wrapper
package, so you need to import:
"github.com/alaingilbert/ogame/pkg/wrapper"
and use them as wrapper.New
wrapper.NewWithParams
wrapper.NewNoLogin
wrapper.Celestial
wrapper.Planet
wrapper.Moon
wrapper.Wrapper
That's mostly it. Everything should work as it was before after these changes.
Both ogame
and wrapper
packages have Celestial
interface and Planet
/Moon
type.
The difference is that the ogame.Planet
/ogame.Moon
/ogame.Celestial
only contains "data" information,
while the wrapper.Planet
/wrapper.Moon
/wrapper.Celestial
are able to call methods on them such as myPlanet.BuildBuilding(ogame.MetalMineID)