Browse Source

clean up docs

I don't know if it's as meaningful to have verbose docs where when you
can just run the server and see the docs on the front page.

Change-Id: I9245044a95b5c0e100e14c718cdc99f560dfa3a5
Stephen McQuay 3 years ago
parent
commit
1a056c1aff
No known key found for this signature in database
3 changed files with 20 additions and 43 deletions
  1. 0
    40
      cmd/vaind/main.go
  2. 20
    0
      doc.go
  3. 0
    3
      vain.go

+ 0
- 40
cmd/vaind/main.go View File

@@ -1,43 +1,3 @@
1
-/*
2
-vaind, a webserver for hosting go get vanity urls.
3
-
4
-The go get command searches for the following header when searching for
5
-packages:
6
-
7
-	<meta name="go-import" content="import-prefix vcs repo-root">
8
-
9
-this is simply a service for aggregating a collection of prefix, vcs, and
10
-repo-root tuples, and serving the appropriate header over http. For more
11
-information please refer to the documentation for the go tool found at
12
-https://golang.org/cmd/go/#hdr-Remote_import_paths
13
-
14
-API
15
-
16
-Assume an instance of vaind at example.org. In order to add a package
17
-example.org/foo that points at bitbucket.org/example/foo (a mercurial
18
-repository) POST the following json object:
19
-
20
-	{
21
-		"vcs": "mercurial",
22
-		"repo": "https://bitbucket.org/example/foo"
23
-	}
24
-
25
-to https://example.org/foo.
26
-
27
-Doing so, then visiting https://example.org/foo?go-get=1 will yield a header
28
-that looks like:
29
-
30
-
31
-	<meta name="go-import" content="example.org/foo hg https://bitbucket.org/foo">
32
-
33
-
34
-The json object sent to server can have two fields: "repo" and "vcs". "repo" is
35
-required; leaving off the "vcs" member defaults to "git".
36
-
37
-In order to delete a package:
38
-
39
-	DELETE /<package name>
40
-*/
41 1
 package main
42 2
 
43 3
 import (

+ 20
- 0
doc.go View File

@@ -1 +1,21 @@
1
+/*
2
+Package vain implements a vanity service for use by the the go tool.
3
+
4
+
5
+The executable, cmd/vaind, is located in the respective subdirectory. vaind,
6
+a webserver for hosting go get vanity urls.
7
+
8
+The go get command searches for the following header when searching for
9
+packages:
10
+
11
+	<meta name="go-import" content="import-prefix vcs repo-root">
12
+
13
+this is simply a service for aggregating a collection of prefix, vcs, and
14
+repo-root tuples, and serving the appropriate header over http. For more
15
+information please refer to the documentation for the go tool found at
16
+https://golang.org/cmd/go/#hdr-Remote_import_paths
17
+
18
+For instructions on how to use this service, build the daemon, run it, and
19
+visit the root url.
20
+*/
1 21
 package vain

+ 0
- 3
vain.go View File

@@ -1,6 +1,3 @@
1
-// Package vain implements a vanity service for use by the the go tool.
2
-//
3
-// The executable, cmd/vaind, is located in the respective subdirectory.
4 1
 package vain
5 2
 
6 3
 import (

Loading…
Cancel
Save