File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1009,12 +1009,12 @@ func (c *common) log(s string) {
1009
1009
if l := len (s ); l > 0 && (string (s [l - 1 ]) != "\n " ) {
1010
1010
s += "\n "
1011
1011
}
1012
- cs := c .getCallSite (3 ) // getCallSite + log + public function
1012
+ cs := c .callSite (3 ) // callSite + log + public function
1013
1013
c .newOutputWriter (cs ).Write ([]byte (s ))
1014
1014
}
1015
1015
1016
- // getCallSite retrieves and formats the file and line of the call site.
1017
- func (c * common ) getCallSite (skip int ) string {
1016
+ // callSite retrieves and formats the file and line of the call site.
1017
+ func (c * common ) callSite (skip int ) string {
1018
1018
c .mu .Lock ()
1019
1019
defer c .mu .Unlock ()
1020
1020
@@ -1039,8 +1039,7 @@ func (c *common) getCallSite(skip int) string {
1039
1039
1040
1040
// newOutputWriter initialises a new outputWriter with the provided call site.
1041
1041
func (c * common ) newOutputWriter (cs string ) io.Writer {
1042
- b := make ([]byte , 0 )
1043
- return & outputWriter {c , b , cs }
1042
+ return & outputWriter {c , nil , cs }
1044
1043
}
1045
1044
1046
1045
// outputWriter buffers, formats and writes input.
You can’t perform that action at this time.
0 commit comments