summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-13 12:57:33 -0600
committerJeff Carr <[email protected]>2024-12-13 12:57:33 -0600
commite1d7a5c2cc4dd03ffef0c592ca239defc9a479e5 (patch)
treeee808876a6602057f1d7ba6c658916fdfccf0770
parent9b12c5049e7900b28041415e87700498137219e4 (diff)
deprecate use of spew so package is a go primitivev0.22.9
-rw-r--r--Makefile9
-rw-r--r--spew.go45
2 files changed, 6 insertions, 48 deletions
diff --git a/Makefile b/Makefile
index d562c95..97d7a42 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,11 @@
# git remote add github [email protected]:wit-go/log.git
-all:
- #@GO111MODULE=off go vet -x
- GO111MODULE=off go vet
+all: vet
+ @#GO111MODULE=off go vet -x
+ @echo this go library builds ok
+
+vet:
+ @GO111MODULE=off go vet
redomod:
rm -f go.*
diff --git a/spew.go b/spew.go
deleted file mode 100644
index f088cb7..0000000
--- a/spew.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2024 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package log
-
-import (
- "go.wit.com/dev/davecgh/spew"
-)
-
-func Spew(b any, a ...any) {
- if !SPEW.Ok() {
- return
- }
- if !SPEW.b {
- return
- }
-
- switch b.(type) {
- case bool:
- if !b.(bool) {
- return
- }
- realPrintln("SPEW:", spew.Sdump(a...))
- case LogFlag:
- var f LogFlag
- f = b.(LogFlag)
- if !f.b {
- return
- }
- realPrintln("SPEW:", spew.Sdump(a...))
- default:
- realPrintln("SPEW b:", spew.Sdump(b))
- realPrintln("SPEW a:", spew.Sdump(a...))
- }
- // realPrintln("SPEW:", spew.Sdump(a...))
- /*
- scs := spew.ConfigState{Indent: "\t", MaxDepth: 1}
- // Output using the ConfigState instance.
- v := map[string]int{"one": 1}
- scs.Printf("v: %v\n", v)
- scs.Dump(v)
- scs.Dump(a)
- */
-}