Skip to content

Commit

Permalink
Merge pull request #2105 from mheon/jsoniter
Browse files Browse the repository at this point in the history
Use jsoniter instead of easyjson
  • Loading branch information
openshift-merge-robot authored Jan 11, 2019
2 parents 36d96c1 + 3966d3b commit 26f2b7d
Show file tree
Hide file tree
Showing 113 changed files with 5,900 additions and 14,650 deletions.
19 changes: 2 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ run-perftest: perftest
vagrant-check:
BOX=$(BOX) sh ./vagrant.sh

binaries: varlink_generate easyjson_generate podman
binaries: varlink_generate podman

install.catatonit:
./hack/install_catatonit.sh
Expand Down Expand Up @@ -265,7 +265,7 @@ uninstall:

.PHONY: install.tools

install.tools: .install.gitvalidation .install.gometalinter .install.md2man .install.easyjson .install.ginkgo .install.gomega
install.tools: .install.gitvalidation .install.gometalinter .install.md2man .install.ginkgo .install.gomega

.install.gomega: .gopathok
$(GO) get github.com/onsi/gomega/...
Expand Down Expand Up @@ -294,11 +294,6 @@ install.tools: .install.gitvalidation .install.gometalinter .install.md2man .ins
$(GO) get -u github.com/cpuguy83/go-md2man; \
fi

.install.easyjson: .gopathok
if [ ! -x "$(GOBIN)/easyffjson" ]; then \
$(GO) get -u github.com/mailru/easyjson/...; \
fi

.install.ostree: .gopathok
if ! pkg-config ostree-1 2> /dev/null ; then \
git clone https://github.com/ostreedev/ostree $(FIRST_GOPATH)/src/github.com/ostreedev/ostree ; \
Expand All @@ -310,16 +305,6 @@ install.tools: .install.gitvalidation .install.gometalinter .install.md2man .ins
varlink_generate: .gopathok cmd/podman/varlink/iopodman.go
varlink_api_generate: .gopathok API.md

easyjson_generate: .gopathok libpod/container_easyjson.go libpod/pod_easyjson.go

libpod/container_easyjson.go: libpod/container.go
rm -f libpod/container_easyjson.go
cd "$(GOPKGDIR)" && easyjson -build_tags "$(BUILDTAGS)" ./libpod/container.go

libpod/pod_easyjson.go: libpod/pod.go
rm -f libpod/pod_easyjson.go
cd "$(GOPKGDIR)" && easyjson -build_tags "$(BUILDTAGS)" ./libpod/pod.go

.PHONY: install.libseccomp.sudo
install.libseccomp.sudo:
rm -rf ../../seccomp/libseccomp
Expand Down
4 changes: 3 additions & 1 deletion libpod/boltdb_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ package libpod

import (
"bytes"
"encoding/json"
"strings"
"sync"

"github.com/boltdb/bolt"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)

var json = jsoniter.ConfigCompatibleWithStandardLibrary

// BoltState is a state implementation backed by a Bolt DB
type BoltState struct {
valid bool
Expand Down
1 change: 0 additions & 1 deletion libpod/boltdb_state_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package libpod

import (
"bytes"
"encoding/json"
"runtime"
"strings"

Expand Down
1 change: 0 additions & 1 deletion libpod/common_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package libpod

import (
"encoding/json"
"net"
"reflect"
"strings"
Expand Down
1 change: 0 additions & 1 deletion libpod/container.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package libpod

import (
"encoding/json"
"fmt"
"io/ioutil"
"net"
Expand Down
Loading

0 comments on commit 26f2b7d

Please sign in to comment.