Commit 3fb88be4 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent ccbe77fc
...@@ -32,14 +32,15 @@ import ( ...@@ -32,14 +32,15 @@ import (
"lab.nexedi.com/kirr/neo/go/internal/xcontext/task" "lab.nexedi.com/kirr/neo/go/internal/xcontext/task"
) )
// withTask prepends string describing current operational task stack to argv and returns it // withTask prepends string describing current operational task stack to argv and returns it.
//
// handy to use this way: // handy to use this way:
// //
// func info(ctx, argv ...interface{}) { // func info(ctx, argv ...interface{}) {
// glog.Info(withTask(ctx, argv...)...) // glog.Info(withTask(ctx, argv...)...)
// } // }
// //
// see https://golang.org/issues/21388 // see https://golang.org/issues/21388.
func withTask(ctx context.Context, argv ...interface{}) []interface{} { func withTask(ctx context.Context, argv ...interface{}) []interface{} {
task := task.Current(ctx).String() task := task.Current(ctx).String()
if task == "" { if task == "" {
......
...@@ -29,10 +29,10 @@ import ( ...@@ -29,10 +29,10 @@ import (
"crypto/sha512" "crypto/sha512"
"flag" "flag"
"fmt" "fmt"
"io"
"hash" "hash"
"hash/crc32"
"hash/adler32" "hash/adler32"
"hash/crc32"
"io"
"os" "os"
"sync/atomic" "sync/atomic"
"testing" "testing"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment