]> xenbits.xensource.com Git - libvirt.git/commit
docs: add pages to support Go module package resolution
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 16 Dec 2019 10:06:50 +0000 (10:06 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 27 Jan 2020 11:51:46 +0000 (11:51 +0000)
commit201156ec6e65e08cdb04d6fdefe013652fb7fa87
tree2ca0b23df5bf1ff53abf99dd075445652e3df996
parentd6006672788ec0f0290d35c76ceb9672476d1ea8
docs: add pages to support Go module package resolution

Currently the libvirt Go modules are accessed by applications using
their github repository URLs. This is undesirable as we don't want
applications to have a direct dependancy on a specific source repo
location. We want to enable applications to use the Go packages via
the libvirt.org namespace.

When you do "go get libvirt.org/libvirt-go", the Go client will do an
HTTPS request to that URL, and parse the HTML content to look for a
<meta> tag which tells it where to the find the GIT repository.

   https://golang.org/cmd/go/#hdr-Remote_import_paths

This adds two pages to support this Go module resolution. They are
not linked from anywhere as we don't expect users to actually look
at them. If someone does happen upon them, there's some boilerplate
text to send them off to godoc.org for API documentation.

Since the pages we're adding have a .html extension, we will also
use a small apache config tweak on the server

    RewriteEngine on
    RewriteRule ^/libvirt-go$ /libvirt-go.html [L]
    RewriteRule ^/libvirt-go-xml$ /libvirt-go-xml.html [L]

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
docs/libvirt-go-xml.rst [new file with mode: 0644]
docs/libvirt-go.rst [new file with mode: 0644]
docs/page.xsl