Commit db605641 authored by Stan Hu's avatar Stan Hu

Merge branch 'fix-json-unmarshal' into 'master'

Fix unmarshalling JSON from the command line

See merge request gitlab-org/gitlab-shell!280
parents 379ec7d1 527f8972
......@@ -28,7 +28,7 @@ func main() {
func deserialize(requestJSON string) (*pb.SSHReceivePackRequest, error) {
var request pb.SSHReceivePackRequest
if err := json.Unmarshal([]byte(requestJSON), request); err != nil {
if err := json.Unmarshal([]byte(requestJSON), &request); err != nil {
return nil, err
}
return &request, nil
......
......@@ -28,7 +28,7 @@ func main() {
func deserialize(argumentJSON string) (*pb.SSHUploadArchiveRequest, error) {
var request pb.SSHUploadArchiveRequest
if err := json.Unmarshal([]byte(argumentJSON), request); err != nil {
if err := json.Unmarshal([]byte(argumentJSON), &request); err != nil {
return nil, err
}
return &request, nil
......
......@@ -28,7 +28,7 @@ func main() {
func deserialize(requestJSON string) (*pb.SSHUploadPackRequest, error) {
var request pb.SSHUploadPackRequest
if err := json.Unmarshal([]byte(requestJSON), request); err != nil {
if err := json.Unmarshal([]byte(requestJSON), &request); err != nil {
return nil, err
}
return &request, nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment