Go string formatting
The proper way of doing this is to use the tools the language already gave you.

IPv4 usually are stored as big endian numbers, and Go already have an IP type:

func int2ip(num int) net.IP {
    var b [4]byte
    binary.BigEndian.PutUint32(b[:], uint32(num))
    return net.IPv4(b[0], b[1], b[2], b[3])
}

//or if you don't care about returning net.IP
func int2ipstr(num int) string {
    var b [4]byte
    binary.BigEndian.PutUint32(b[:], uint32(num))
    return fmt.Sprintf("%d.%d.%d.%d", b[0], b[1], b[2], b[3])
}


playground

//edit adding more details following @Schism's advice

Using Sprintf is usually fine and they worked on optimizing it fairly well, if you want to squeeze every drop of performance out of it, you could use a more "buffered" alternative like :

func int2ipb(num int) string {
    b, buf := [4]byte{}, make([]byte, 0, 15) //15 = max number of bytes in an ip
    binary.BigEndian.PutUint32(b[:], uint32(num))
    for _, n := range b {
        buf = append(buf, '.')
        buf = append(buf, strconv.Itoa(int(n))[:]...)
    }
    return string(buf[1:])
}