func (client *FactorioClient) EntityGet(unitNumber UnitNumber) (*Entity, error) {
	var entity Entity
	pEntity := &entity
	return pEntity, client.Read(
		"entity",
		map[string]interface{}{"unit_number": unitNumber},
		&pEntity)
}
Looks up an entity by its unit_number
package client
import "strconv"
type Position struct {
	X float32 `json:"x"`
	Y float32 `json:"y"`
}
type UnitNumber uint32
func (u UnitNumber) String() string {
	return strconv.FormatUint(uint64(u), 10)
}
func ParseUnitNumber(unitNumberStr string) (UnitNumber, error) {
	unitNumber, err := strconv.ParseUint(unitNumberStr, 10, 32)
	if err != nil {
		return 0, err
	}
	return UnitNumber(unitNumber), nil
}
type Entity struct {
	UnitNumber UnitNumber `json:"unit_number"`
	Surface    string     `json:"surface"`
	Name       string     `json:"name"`
	Position   Position   `json:"position"`
	Direction  Direction  `json:"direction"`
	Force      string     `json:"force"`
}