diff options
| author | tjpcc <tjp@ctrl-c.club> | 2023-10-18 17:50:55 -0600 |
|---|---|---|
| committer | tjpcc <tjp@ctrl-c.club> | 2023-10-18 17:52:08 -0600 |
| commit | deb9bd75511c790d151449b020093f54515bb19f (patch) | |
| tree | b49c5d9412d047083c21eaf951c4efe92dbb3e49 /README.gmi | |
| parent | c614473af6b51fa87d9114a1fa791b7952764d80 (diff) | |
README cleanupv1.2.0
Diffstat (limited to 'README.gmi')
| -rw-r--r-- | README.gmi | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -340,7 +340,7 @@ The Repository object at ".Repo" has methods: * .Blob(ctx, ref, path) reads the file at <path> from commit <ref> and returns its contents. * .Tree(ctx, ref, path) retrieves the directory contents at <path> from commit <ref> and returns a list of ObjectDescriptions. -Ref objects: +### Ref objects * .Repo a pointer back to the Repository. * .Name is the full ref name, starting with "refs/heads/" or "refs/tags/". * .Hash is the commit hash the ref points to. @@ -348,7 +348,7 @@ Ref objects: * .IsTag() returns whether the ref is a tag. * .ShortName() returns just the branch or tag name, with "/refs/heads/" or "refs/tags/" stripped off. -Commit objects: +### Commit objects * .Repo is a pointer back to the Repository. * .Hash is the full commit hash. * .Parents is a list of strings, of the parent commit hashes. @@ -363,13 +363,16 @@ Commit objects: * .ShortMessage() returns just the first line of the commit message. * .RestOfMessage() returns all but the first line of the commit message after trimming off an empty line at the start. -Readme objects: +### Readme objects * .Filename is the filename at which the README was found. * .RawContents is a string of the file contents. -* .GeminiEscapedContents() produces the file contents but with any ```-leading lines prefixed with a space. +* .GeminiEscapedContents() produces the file contents but with any triple-backtick-leading lines prefixed with a space. * .GopherEscapedContents(selector, host, port) produces the file contents formatted as gopher menu with each line an info-message line. +### ObjectDescription objects + ObjectDescription is a representation of a blob or tree: + * .Mode is an integer of the file permission bits. * .Type is a string of the object type ("blob", "tree", etc). * .Hash is the string git hash object object. |
