1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

16 commits

Author SHA1 Message Date
Stephen J Day
66cfe61f71
pkg: remove random package
The unnecessary `random` package has been removed in favor of using the
`math/rand` package directly. Seeding of the random value from crypto
has been added to the `stringid` package to account for the change.

May need to add an equivalent seed to `namesgenerator`, but this is
often used with `stringid` and has collision protection.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-05-08 17:02:02 -07:00
allencloud
7c3657065c change minor mistake of spelling
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-20 21:05:19 +08:00
Sebastiaan van Stijn
51dc35cf23
Implement stringutils.Ellipsis()
This patch implements an Ellipsis utility to
append an ellipsis (...)  when truncating
strings in output.

It also fixes the existing Truncate() utility
to be compatible with unicode/multibyte characters.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-08-11 14:14:06 +02:00
allencloud
aef02273d9 fix typos in pkg
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-04-09 21:18:15 +08:00
David Calavera
f9b857a200 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
Justas Brazauskas
927b334ebf Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
2015-12-13 18:04:12 +02:00
Antonio Murdaca
cac8f4f0d0 pkg: stringutils: Add more tests to strslice
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-09-01 20:27:45 +02:00
Shijiang Wei
ea4a06740b abstract the string slice struct to stringutils package
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-08-29 01:08:40 +08:00
Alexander Morozov
51cdcf3c9d Use global random *rand.Rand instance in pkg
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-29 09:30:48 -07:00
Vincent Demeester
18c7c67308 Lint on pkg/* packages
- pkg/useragent
- pkg/units
- pkg/ulimit
- pkg/truncindex
- pkg/timeoutconn
- pkg/term
- pkg/tarsum
- pkg/tailfile
- pkg/systemd
- pkg/stringutils
- pkg/stringid
- pkg/streamformatter
- pkg/sockets
- pkg/signal
- pkg/proxy
- pkg/progressreader
- pkg/pools
- pkg/plugins
- pkg/pidfile
- pkg/parsers
- pkg/parsers/filters
- pkg/parsers/kernel
- pkg/parsers/operatingsystem

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-07-27 21:26:21 +02:00
Vincent Demeester
6c36572e8b Add test coverage for pkg/stringutils
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-05-29 15:49:29 +02:00
Alexander Morozov
d8661250e7 Use goroutine-safe version of rand.Source
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-05-19 12:32:40 -07:00
Antonio Murdaca
c30a55f14d Refactor utils/utils, fixes #11923
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-14 01:37:36 +02:00
Peter Esbensen
6896016b7c Fixes #11721 removed GenerateRandomString
Signed-off-by: Peter Esbensen <pkesbensen@gmail.com>

gofmt

Signed-off-by: Peter Esbensen <pkesbensen@gmail.com>
2015-04-02 08:07:52 -07:00
Peter Esbensen
11287f7714 Added unit tests for stringutils GenerateRandomAlphaOnlyString and GenerateRandomAsciiString
Signed-off-by: Peter Esbensen <pkesbensen@gmail.com>
2015-04-02 07:12:47 -07:00
Antonio Murdaca
b80fae7356 Refactor pkg/common, Fixes #11599
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-24 18:19:59 +01:00