@@ -253,19 +253,19 @@ func (writer *MermaidWriter) WriteChannels(cfg DeclarativeConfig, out io.Writer)
253
253
return pkgNames [i ] < pkgNames [j ]
254
254
})
255
255
for _ , pkgName := range pkgNames {
256
- _ , _ = out . Write ([] byte ( fmt .Sprintf ( " %%%% package %q\n " , pkgName )) )
257
- _ , _ = out . Write ([] byte ( fmt .Sprintf ( " subgraph %q\n " , pkgName )) )
256
+ _ , _ = fmt .Fprintf ( out , " %%%% package %q\n " , pkgName )
257
+ _ , _ = fmt .Fprintf ( out , " subgraph %q\n " , pkgName )
258
258
_ , _ = out .Write ([]byte (pkgs [pkgName ].String ()))
259
259
_ , _ = out .Write ([]byte (" end\n " ))
260
260
}
261
261
262
262
if deprecatedPackage != "" {
263
- _ , _ = out . Write ([] byte ( fmt .Sprintf ( "style %s fill:#989695\n " , deprecatedPackage )) )
263
+ _ , _ = fmt .Fprintf ( out , "style %s fill:#989695\n " , deprecatedPackage )
264
264
}
265
265
266
266
if len (deprecatedChannelIDs ) > 0 {
267
267
for _ , deprecatedChannel := range deprecatedChannelIDs {
268
- _ , _ = out . Write ([] byte ( fmt .Sprintf ( "style %s fill:#DCD0FF\n " , deprecatedChannel )) )
268
+ _ , _ = fmt .Fprintf ( out , "style %s fill:#DCD0FF\n " , deprecatedChannel )
269
269
}
270
270
}
271
271
@@ -274,12 +274,12 @@ func (writer *MermaidWriter) WriteChannels(cfg DeclarativeConfig, out io.Writer)
274
274
if len (decoratedBundleIDs [key ]) > 0 {
275
275
b := slices .Clone (decoratedBundleIDs [key ])
276
276
slices .Sort (b )
277
- _ , _ = out . Write ([] byte ( fmt .Sprintf ( "class %s %s\n " , strings .Join (b , "," ), key )) )
277
+ _ , _ = fmt .Fprintf ( out , "class %s %s\n " , strings .Join (b , "," ), key )
278
278
}
279
279
}
280
280
281
281
if len (skippedLinkIDs ) > 0 {
282
- _ , _ = out . Write ([] byte ( "linkStyle " + strings .Join (skippedLinkIDs , "," ) + " stroke:#FF0000,stroke-width:3px,stroke-dasharray:5;\n " ) )
282
+ _ , _ = fmt . Fprintf ( out , "linkStyle %s %s \n " , strings .Join (skippedLinkIDs , "," ), " stroke:#FF0000,stroke-width:3px,stroke-dasharray:5;" )
283
283
}
284
284
285
285
return nil
0 commit comments