瀏覽代碼

codec: update doc to show that Selfer is checked after extensions

Ugorji Nwoke 6 年之前
父節點
當前提交
79f15012c5
共有 2 個文件被更改,包括 2 次插入5 次删除
  1. 1 2
      README.md
  2. 1 3
      codec/doc.go

+ 1 - 2
README.md

@@ -7,7 +7,6 @@
 
 # go-codec
 
-
 This repository contains the `go-codec` library.
 
 To install:
@@ -123,8 +122,8 @@ tag) but letting the encoding mechanism default to the standard way.
 This package maintains symmetry in the encoding and decoding halfs. We
 determine how to encode or decode by walking this decision tree
 
-  - is type a codec.Selfer?
   - is there an extension registered for the type?
+  - is type a codec.Selfer?
   - is format binary, and is type a encoding.BinaryMarshaler and BinaryUnmarshaler?
   - is format specifically json, and is type a encoding/json.Marshaler and Unmarshaler?
   - is format text-based, and type an encoding.TextMarshaler and TextUnmarshaler?

+ 1 - 3
codec/doc.go

@@ -102,8 +102,8 @@ Custom Encoding and Decoding
 This package maintains symmetry in the encoding and decoding halfs.
 We determine how to encode or decode by walking this decision tree
 
-  - is type a codec.Selfer?
   - is there an extension registered for the type?
+  - is type a codec.Selfer?
   - is format binary, and is type a encoding.BinaryMarshaler and BinaryUnmarshaler?
   - is format specifically json, and is type a encoding/json.Marshaler and Unmarshaler?
   - is format text-based, and type an encoding.TextMarshaler and TextUnmarshaler?
@@ -224,5 +224,3 @@ with some caveats. See Encode documentation.
 
 */
 package codec
-
-//