Skip to content

Commit

Permalink
Add community/mfridman-go-json v1.2.0 (#1029)
Browse files Browse the repository at this point in the history
This PR adds a new community plugin which supersedes the existing one
mitchellh/protoc-gen-go-json. I've disabled further updates of that
plugin, and will mark it deprecated shortly.

This should also resolve the upstream issue folks have been asking
about. mitchellh/protoc-gen-go-json#17
  • Loading branch information
mfridman committed Jan 29, 2024
1 parent 37652d2 commit 4618348
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/community/mfridman-go-json/source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source:
github:
owner: mfridman
repository: protoc-gen-go-json
2 changes: 2 additions & 0 deletions plugins/community/mfridman-go-json/v1.2.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
11 changes: 11 additions & 0 deletions plugins/community/mfridman-go-json/v1.2.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# syntax=docker/dockerfile:1.6
FROM golang:1.21.6-bookworm AS build
RUN --mount=type=cache,target=/go/pkg/mod \
CGO_ENABLED=0 \
go install -ldflags="-s -w" -trimpath github.com/mfridman/protoc-gen-go-json@v1.2.0

FROM scratch
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-go-json .
USER nobody
ENTRYPOINT [ "/protoc-gen-go-json" ]
10 changes: 10 additions & 0 deletions plugins/community/mfridman-go-json/v1.2.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1
name: buf.build/community/mfridman-go-json
plugin_version: v1.2.0
source_url: https://github.com/mfridman/protoc-gen-go-json
integration_guide_url: https://github.com/mfridman/protoc-gen-go-json#usage
description: Generate marshalling & unmarshalling code using protojson.
output_languages:
- go
spdx_license_id: MIT
license_url: https://github.com/mfridman/protoc-gen-go-json/blob/v1.2.0/LICENSE.md
3 changes: 3 additions & 0 deletions plugins/community/mitchellh-go-json/source.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
source:
# Use mfridman/protoc-gen-go-json instead
# For more info, see https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc
disabled: true
github:
owner: mitchellh
repository: protoc-gen-go-json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:JbopqKq2spPZ3zIQYc293w7pmDtYyjyQo38WP+zvzb4=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:Qi5ZKfam4ZBXkerC7L9HmKmypXYgdzj2FRQU0Zkg/Pk=

0 comments on commit 4618348

Please sign in to comment.