This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ================================================================================================== | |
| # | |
| # NOTICE | |
| # | |
| # This gist is no longer maintained. It was moved to repo: | |
| # | |
| # https://github.com/maratori/golangci-lint-config | |
| # | |
| # Full history and all v2 releases are preserved in the repo. | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM alpine:3.9 | |
| ENV LIBRD_VER=1.3.0 | |
| WORKDIR /tmp | |
| #vishnus-MacBook-Pro:librd vrao$ docker images |grep lib | |
| #lib proper_cleanup 675073279e9c 4 seconds ago 53.3MB | |
| #lib cleanup 7456af7df73b 2 minutes ago 218MB | |
| #lib simple 9724aed9519c 7 minutes ago 342MB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func split(buf []byte, lim int) [][]byte { | |
| var chunk []byte | |
| chunks := make([][]byte, 0, len(buf)/lim+1) | |
| for len(buf) >= lim { | |
| chunk, buf = buf[:lim], buf[lim:] | |
| chunks = append(chunks, chunk) | |
| } | |
| if len(buf) > 0 { | |
| chunks = append(chunks, buf[:len(buf)]) | |
| } |