Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -143,7 +143,7 @@ func (l *tarexporter) Load(ctx context.Context, inTar io.ReadCloser, outStream i |
| 143 | 143 |
if err != nil {
|
| 144 | 144 |
return err |
| 145 | 145 |
} |
| 146 |
- imageIDsStr.WriteString(fmt.Sprintf("Loaded image ID: %s\n", imgID))
|
|
| 146 |
+ fmt.Fprintf(&imageIDsStr, "Loaded image ID: %s\n", imgID) |
|
| 147 | 147 |
|
| 148 | 148 |
imageRefCount = 0 |
| 149 | 149 |
for _, repoTag := range m.RepoTags {
|
| ... | ... |
@@ -158,7 +158,7 @@ func (s *Server) help(w http.ResponseWriter, r *http.Request) {
|
| 158 | 158 |
var result strings.Builder |
| 159 | 159 |
s.mu.Lock() |
| 160 | 160 |
for path := range s.handlers {
|
| 161 |
- result.WriteString(fmt.Sprintf("%s\n", path))
|
|
| 161 |
+ fmt.Fprintf(&result, "%s\n", path) |
|
| 162 | 162 |
} |
| 163 | 163 |
s.mu.Unlock() |
| 164 | 164 |
_, _ = HTTPReply(w, CommandSucceed(&StringCmd{Info: result.String()}), jsonOutput)
|
| ... | ... |
@@ -84,7 +84,7 @@ type TableObj struct {
|
| 84 | 84 |
|
| 85 | 85 |
func (t *TableObj) String() string {
|
| 86 | 86 |
var output strings.Builder |
| 87 |
- output.WriteString(fmt.Sprintf("total entries: %d\n", t.Length))
|
|
| 87 |
+ fmt.Fprintf(&output, "total entries: %d\n", t.Length) |
|
| 88 | 88 |
for _, e := range t.Elements {
|
| 89 | 89 |
output.WriteString(e.String()) |
| 90 | 90 |
} |