// Copyright 2016 The Gogs Authors. All rights reserved.// Use of this source code is governed by a MIT-style// license that can be found in the LICENSE file.packagegogsimport("bytes""encoding/json""fmt")typeAddOrgMembershipOptionstruct{Rolestring`json:"role" binding:"Required"`}func(c*Client)AddOrgMembership(org,userstring,optAddOrgMembershipOption)error{body,err:=json.Marshal(&opt)iferr!=nil{returnerr}_,err=c.getResponse("PUT",fmt.Sprintf("/orgs/%s/membership/%s",org,user),jsonHeader,bytes.NewReader(body))returnerr}