Przeglądaj źródła

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

Ugorji Nwoke 6 lat temu
rodzic
commit
79f15012c5
2 zmienionych plików z 2 dodań i 5 usunięć
  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
-
-//