Browse Source

documentation and README updates and some code reorganization

Ugorji Nwoke 6 years ago
parent
commit
1d7ab5c50b
6 changed files with 8 additions and 5 deletions
  1. 1 1
      codec/binc.go
  2. 1 1
      codec/codec_test.go
  3. 1 1
      codec/decode.go
  4. 0 0
      codec/doc.go
  5. 2 2
      codec/helper.go
  6. 3 0
      go.mod

+ 1 - 1
codec/binc.go

@@ -1173,7 +1173,7 @@ func bincDecodeTime(bs []byte) (tt time.Time, err error) {
 		return
 		return
 	}
 	}
 	// In stdlib time.Parse, when a date is parsed without a zone name, it uses "" as zone name.
 	// In stdlib time.Parse, when a date is parsed without a zone name, it uses "" as zone name.
-	// However, we need name here, so it can be shown when time is printed.
+	// However, we need name here, so it can be shown when time is printf.d.
 	// Zone name is in form: UTC-08:00.
 	// Zone name is in form: UTC-08:00.
 	// Note that Go Libs do not give access to dst flag, so we ignore dst bits
 	// Note that Go Libs do not give access to dst flag, so we ignore dst bits
 
 

+ 1 - 1
codec/codec_test.go

@@ -1012,7 +1012,7 @@ func testCodecEmbeddedPointer(t *testing.T, h Handle) {
 func testCodecUnderlyingType(t *testing.T, h Handle) {
 func testCodecUnderlyingType(t *testing.T, h Handle) {
 	testOnce.Do(testInitAll)
 	testOnce.Do(testInitAll)
 	// Manual Test.
 	// Manual Test.
-	// Run by hand, with accompanying print statements in fast-path.go
+	// Run by hand, with accompanying printf.statements in fast-path.go
 	// to ensure that the fast functions are called.
 	// to ensure that the fast functions are called.
 	type T1 map[string]string
 	type T1 map[string]string
 	v := T1{"1": "1s", "2": "2s"}
 	v := T1{"1": "1s", "2": "2s"}

+ 1 - 1
codec/decode.go

@@ -2544,7 +2544,7 @@ func (d *Decoder) mustDecode(v interface{}) {
 
 
 	d.bi.calls++
 	d.bi.calls++
 	d.decode(v)
 	d.decode(v)
-	// xprintf(">>>>>>>> >>>>>>>> num decFns: %v\n", d.cf.sn)
+	// xprintf.(">>>>>>>> >>>>>>>> num decFns: %v\n", d.cf.sn)
 	d.bi.calls--
 	d.bi.calls--
 	if !d.h.ExplicitRelease && d.bi.calls == 0 {
 	if !d.h.ExplicitRelease && d.bi.calls == 0 {
 		d.bi.release()
 		d.bi.release()

+ 0 - 0
codec/0_doc.go → codec/doc.go


+ 2 - 2
codec/helper.go

@@ -2667,7 +2667,7 @@ func (z *sfiRvPooler) get(newlen int) (fkvs []sfiRv) {
 	return
 	return
 }
 }
 
 
-// xdebugf prints the message in red on the terminal.
+// xdebugf printf. the message in red on the terminal.
 // Use it in place of fmt.Printf (which it calls internally)
 // Use it in place of fmt.Printf (which it calls internally)
 func xdebugf(pattern string, args ...interface{}) {
 func xdebugf(pattern string, args ...interface{}) {
 	var delim string
 	var delim string
@@ -2701,7 +2701,7 @@ func xdebugf(pattern string, args ...interface{}) {
 // 		return "UTC"
 // 		return "UTC"
 // 	}
 // 	}
 // 	var tzname = []byte("UTC+00:00")
 // 	var tzname = []byte("UTC+00:00")
-// 	//tzname := fmt.Sprintf("UTC%s%02d:%02d", tzsign, tz/60, tz%60) //perf issue using Sprintf. inline below.
+// 	//tzname := fmt.Sprintf("UTC%s%02d:%02d", tzsign, tz/60, tz%60) //perf issue using Sprintf.. inline below.
 // 	//tzhr, tzmin := tz/60, tz%60 //faster if u convert to int first
 // 	//tzhr, tzmin := tz/60, tz%60 //faster if u convert to int first
 // 	var tzhr, tzmin int16
 // 	var tzhr, tzmin int16
 // 	if tzint < 0 {
 // 	if tzint < 0 {

+ 3 - 0
go.mod

@@ -1,2 +1,5 @@
 module github.com/ugorji/go
 module github.com/ugorji/go
 
 
+go 1.13
+
+require golang.org/x/tools v0.0.0-20190424220101-1e8e1cfdf96b