Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client: docs improvements #1104

Merged
merged 3 commits into from
Aug 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions client/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
// servers over a Unix socket or HTTPs. You can then interact with those
// remote servers, creating instances, images, moving them around, ...
//
// The following examples make use of serveral imports:
//
// import (
// "github.com/lxc/incus/client"
// "github.com/lxc/incus/shared/api"
// "github.com/lxc/incus/shared/termios"
// )
//
// # Example - instance creation
//
// This creates a container on a local Incus daemon and then starts it.
Expand All @@ -17,11 +25,14 @@
// }
//
// // Instance creation request
// name := "my-container"
// req := api.InstancesPost{
// Name: "my-container",
// Name: name,
// Source: api.InstanceSource{
// Type: "image",
// Alias: "my-image",
// Alias: "my-image", # e.g. alpine/3.20
// Server: "https://images.linuxcontainers.org",
// Protocol: "simplestreams",
// },
// Type: "container"
// }
Expand Down Expand Up @@ -93,7 +104,7 @@
// }
//
// // Get the current state
// op, err := c.ExecInstance("c1", req, &args)
// op, err := c.ExecInstance(name, req, &args)
// if err != nil {
// return err
// }
Expand Down
Loading