Граф коммитов

4 Коммитов

Автор SHA1 Сообщение Дата
Derek McGowan 9667838a0a Remove unnecessary strslice functions
strslice is intended to behave like a string slice with the additional property that when unmarshalled it can handle a string or array.
All over functions are unneeded and allow for misuse of the type.
Currently when output a strslice `fmt.Print` ends up getting used calling the `String()` method which has output which differs from the expected slice output.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-02-24 16:11:03 -08:00
Stephen J Day 75c6e8ad19 strslice: remove StrSlice.UnmarshalJSON
After getting the full test suite to run, it was found that the default
slice behavior matched what was expected in the API. Turns out, we can
remove even more code!

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-02-18 16:16:15 -08:00
Stephen J Day 1f417aeb1b strslice: refactor StrSlice to avoid unnecessary pointer traversal
By removing the struct wrapper around StrSlice, we maintain the slice
properties of the type (len, cap, make, etc.) while overriding the
serialization. We get a simpler type with less pointer traversal.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-02-18 14:56:28 -08:00
David Calavera 86a6492aab Move StrSlice to types.
This is a very docker concept that nobody elses need.
We only maintain it to keep the API backwards compatible.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 13:31:43 -05:00