Prechádzať zdrojové kódy

change repo name to go-codec and use import path and go.mod to ensure stable legacy import path.

Ugorji Nwoke 7 rokov pred
rodič
commit
74d13ae498
4 zmenil súbory, kde vykonal 29 pridanie a 4 odobranie
  1. 19 1
      README.md
  2. 7 0
      codec/0_importpath.go
  3. 0 3
      codec/go.mod
  4. 3 0
      go.mod

+ 19 - 1
README.md

@@ -5,7 +5,7 @@
 [![rcard](https://goreportcard.com/badge/github.com/ugorji/go/codec?v=4)](https://goreportcard.com/report/github.com/ugorji/go/codec)
 [![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/ugorji/go/master/LICENSE)
 
-# go/codec
+# go-codec
 
 This repository contains the `go-codec` library,
 a High Performance and Feature-Rich Idiomatic encode/decode and rpc library for
@@ -25,3 +25,21 @@ Install using:
 
     go get github.com/ugorji/go/codec
 
+# Import Path
+
+The name of the github repo is being changed from `go` to `go-codec`.
+This clarifies that this repo is only for the `go-codec`.
+
+However, this package has always had a stable import path of "github.com/ugorji/go/codec".
+We CANNOT change that without negatively affecting all our users.
+
+Consequently, we enforce this import path by specifying it in the following files:
+
+  - `go.mod`
+  - `codec/0_importpath.go`
+
+If you have a fork and want to change the package path, you will need to modify the above files.
+
+
+
+

+ 7 - 0
codec/0_importpath.go

@@ -0,0 +1,7 @@
+// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
+// Use of this source code is governed by a MIT license found in the LICENSE file.
+
+package codec // import "github.com/ugorji/go/codec"
+
+// This establishes that this package must be imported as github.com/ugorji/go/codec.
+// It makes forking easier, and plays well with pre-module releases of go.

+ 0 - 3
codec/go.mod

@@ -1,3 +0,0 @@
-module github.com/ugorji/go/codec
-
-require github.com/ugorji/go v1.1.2

+ 3 - 0
go.mod

@@ -0,0 +1,3 @@
+module github.com/ugorji/go
+
+go 1.13