Skip to content

Commit

Permalink
change repo name to go-codec and use import path and go.mod to ensure…
Browse files Browse the repository at this point in the history
… stable legacy import path.
  • Loading branch information
ugorji committed Apr 8, 2019
1 parent d2dc9cd commit 74d13ae
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 changes: 7 additions & 0 deletions codec/0_importpath.go
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 0 additions & 3 deletions codec/go.mod

This file was deleted.

3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/ugorji/go

go 1.13

0 comments on commit 74d13ae

Please sign in to comment.