@@ -113,7 +113,7 @@ func (p *PDU) Run(ctx context.Context, s module.Session, args ...string) error {
113113 }
114114
115115 if len (args ) == 0 {
116- s .Print ("No command specified. Call 'help' for usage." )
116+ s .Println ("No command specified. Call 'help' for usage." )
117117
118118 return nil
119119 }
@@ -126,8 +126,8 @@ func (p *PDU) Run(ctx context.Context, s module.Session, args ...string) error {
126126 case status :
127127 return p .status (ctx , s )
128128 default :
129- s .Print ("Unknown command: " + cmd )
130- s .Print ("Available commands: on, off, toggle, status" )
129+ s .Println ("Unknown command: " + cmd )
130+ s .Println ("Available commands: on, off, toggle, status" )
131131
132132 return nil
133133 }
@@ -176,7 +176,7 @@ func (p *PDU) setPower(ctx context.Context, s module.Session, state string) erro
176176 }
177177 defer resp .Body .Close ()
178178
179- s .Print ( fmt . Sprintf ( "PDU outlet%d power set to '%s' successfully" , p .Outlet , state ) )
179+ s .Printf ( "PDU outlet%d power set to '%s' successfully\n " , p .Outlet , state )
180180
181181 return nil
182182}
@@ -198,7 +198,7 @@ func (p *PDU) status(ctx context.Context, s module.Session) error {
198198 return err
199199 }
200200
201- s .Print ( fmt . Sprintf ( "PDU outlet%d state: %s" , p .Outlet , outletValue ) )
201+ s .Printf ( "PDU outlet%d state: %s\n " , p .Outlet , outletValue )
202202
203203 return nil
204204}
0 commit comments