moby/libnetwork/ipam
Sebastiaan van Stijn df03357d19
libnetwork/ipam: move PoolID.FromString() to a PoolIDFromString() func
This makes it easier to consume, without first having to create an empty
PoolID.

Performance is the same:

    BenchmarkPoolIDFromString-10   6100345   196.5 ns/op  112 B/op   3 allocs/op
    BenchmarkPoolIDFromString-10   6252750   192.0 ns/op  112 B/op   3 allocs/op

Note that I opted not to change the return-type to a pointer, as that seems
to perform less;

    BenchmarkPoolIDFromString-10   6252750   192.0 ns/op  112 B/op   3 allocs/op
    BenchmarkPoolIDFromString-10   5288682   226.6 ns/op  192 B/op   4 allocs/op

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-08 15:57:24 +02:00
..
allocator.go libnetwork/ipam: move PoolID.FromString() to a PoolIDFromString() func 2023-08-08 15:57:24 +02:00
allocator_test.go libnetwork/ipam: move PoolID.FromString() to a PoolIDFromString() func 2023-08-08 15:57:24 +02:00
parallel_test.go libnet/ipam: drop vestiges of custom addrSpaces 2023-02-23 18:09:22 -05:00
structures.go libnetwork/ipam: move PoolID.FromString() to a PoolIDFromString() func 2023-08-08 15:57:24 +02:00
utils.go libnet/ipam: use netip types internally 2023-02-23 18:10:01 -05:00