@@ -253,19 +253,19 @@ func (writer *MermaidWriter) WriteChannels(cfg DeclarativeConfig, out io.Writer)
253253 return pkgNames [i ] < pkgNames [j ]
254254 })
255255 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 )
258258 _ , _ = out .Write ([]byte (pkgs [pkgName ].String ()))
259259 _ , _ = out .Write ([]byte (" end\n " ))
260260 }
261261
262262 if deprecatedPackage != "" {
263- _ , _ = out . Write ([] byte ( fmt .Sprintf ( "style %s fill:#989695\n " , deprecatedPackage )) )
263+ _ , _ = fmt .Fprintf ( out , "style %s fill:#989695\n " , deprecatedPackage )
264264 }
265265
266266 if len (deprecatedChannelIDs ) > 0 {
267267 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 )
269269 }
270270 }
271271
@@ -274,12 +274,12 @@ func (writer *MermaidWriter) WriteChannels(cfg DeclarativeConfig, out io.Writer)
274274 if len (decoratedBundleIDs [key ]) > 0 {
275275 b := slices .Clone (decoratedBundleIDs [key ])
276276 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 )
278278 }
279279 }
280280
281281 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;" )
283283 }
284284
285285 return nil
0 commit comments