Skip to content
Multipart in Golang
Go Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
utils
.gitattributes
.gitignore
.travis.yml
CHANGELOG.md
CNAME
LICENSE
README.md
_config.yml
go.mod
go.sum
integration-tests.sh
main.go

README.md

go-multipart

GoDoc Widget Build Status Go Report Card Issues Pull requests Total downloads License Repository Size Contributors Commit activity Last commit Release date Latest Production Release Version Bugs Code Smells Coverage Duplicated Lines (%) Lines of Code Maintainability Rating Quality Gate Status Reliability Rating Security Rating Technical Debt Vulnerabilities CII Best Practices codecov BCH compliance

Usage

If one would like to upload a file, then the '@' character should be used like in curl (see Testing paragraph):

./go-multipart -url \
    http://localhost:9999/service/rest/v1/components?repository=maven-releases \
    -user admin -pass admin123 -F \
    "maven2.asset1=@utils/test-files-multipart/file1.pom,\
    maven2.asset1.extension=pom,\
    maven2.asset2=@utils/test-files-multipart/file1.jar,\
    maven2.asset2.extension=jar,\
    maven2.asset3=@utils/test-files-multipart/file1-sources.jar,\
    maven2.asset3.extension=sources.jar"

Testing

./integration-tests.sh
You can’t perform that action at this time.