github.com/jfrog/jfrog-cli-core/v2@v2.51.0/artifactory/formats/buildpublishapi.go (about) 1 package formats 2 3 import ( 4 "bytes" 5 "encoding/json" 6 ) 7 8 // Structs in this file should NOT be changed! 9 // The structs are used as an API for the build-publish command, thus changing their structure or the 'json' annotation will break the API. 10 11 type BuildPublishOutput struct { 12 BuildInfoUiUrl string `json:"buildInfoUiUrl,omitempty"` 13 } 14 15 // This function is similar to json.Marshal with EscapeHTML false. 16 func (bpo *BuildPublishOutput) JSON() ([]byte, error) { 17 buffer := &bytes.Buffer{} 18 encoder := json.NewEncoder(buffer) 19 encoder.SetEscapeHTML(false) 20 err := encoder.Encode(bpo) 21 return buffer.Bytes(), err 22 }