From 3a66391e30ee9f34fe4726afe0b8525799e3b534 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Mon, 14 Dec 2020 15:19:33 -0800 Subject: [PATCH] more package docs --- packer-plugin-sdk/multistep/commonsteps/doc.go | 1 - packer-plugin-sdk/multistep/doc.go | 1 - packer-plugin-sdk/net/configure_port.go | 2 ++ packer-plugin-sdk/packerbuilderdata/generated_data.go | 4 ++++ packer-plugin-sdk/pathing/config_file.go | 2 ++ packer-plugin-sdk/random/string.go | 1 + packer-plugin-sdk/retry/retry.go | 2 ++ packer-plugin-sdk/rpc/init.go | 6 ++++++ 8 files changed, 17 insertions(+), 2 deletions(-) diff --git a/packer-plugin-sdk/multistep/commonsteps/doc.go b/packer-plugin-sdk/multistep/commonsteps/doc.go index b5b7e90af..d3f2717fe 100644 --- a/packer-plugin-sdk/multistep/commonsteps/doc.go +++ b/packer-plugin-sdk/multistep/commonsteps/doc.go @@ -12,5 +12,4 @@ provisioners to run inside your builder. While it is possible to create a simple builder without using the multistep runner or step_provision, your builder will lack core Packer functionality. */ - package commonsteps diff --git a/packer-plugin-sdk/multistep/doc.go b/packer-plugin-sdk/multistep/doc.go index 17570cda9..002069fc9 100644 --- a/packer-plugin-sdk/multistep/doc.go +++ b/packer-plugin-sdk/multistep/doc.go @@ -57,5 +57,4 @@ Value is 1 Value is 2 ``` */ - package multistep diff --git a/packer-plugin-sdk/net/configure_port.go b/packer-plugin-sdk/net/configure_port.go index 042dc13c2..ef8697a9a 100644 --- a/packer-plugin-sdk/net/configure_port.go +++ b/packer-plugin-sdk/net/configure_port.go @@ -1,3 +1,5 @@ +// package net contains some helper wrapping functions for the http and net +// golang libraries that meet Packer-specific needs. package net import ( diff --git a/packer-plugin-sdk/packerbuilderdata/generated_data.go b/packer-plugin-sdk/packerbuilderdata/generated_data.go index c8b986081..8361f69a0 100644 --- a/packer-plugin-sdk/packerbuilderdata/generated_data.go +++ b/packer-plugin-sdk/packerbuilderdata/generated_data.go @@ -1,3 +1,7 @@ +// Package packerbuilderdata provides tooling for setting and getting special +// builder-generated data that will be passed to the provisioners. This data +// should be limited to runtime data like instance id, ip address, and other +// relevant details that provisioning scripts may need access to. package packerbuilderdata import "github.com/hashicorp/packer/packer-plugin-sdk/multistep" diff --git a/packer-plugin-sdk/pathing/config_file.go b/packer-plugin-sdk/pathing/config_file.go index 98a320f2f..ee2ef52b7 100644 --- a/packer-plugin-sdk/pathing/config_file.go +++ b/packer-plugin-sdk/pathing/config_file.go @@ -1,3 +1,5 @@ +// Package pathing determines where to put the Packer config directory based on +// host OS architecture and user environment variables. package pathing import ( diff --git a/packer-plugin-sdk/random/string.go b/packer-plugin-sdk/random/string.go index bac4a355b..21c286532 100644 --- a/packer-plugin-sdk/random/string.go +++ b/packer-plugin-sdk/random/string.go @@ -1,3 +1,4 @@ +// Package random is a helper for generating random alphanumeric strings. package random import ( diff --git a/packer-plugin-sdk/retry/retry.go b/packer-plugin-sdk/retry/retry.go index 61e47050e..7b36f3c61 100644 --- a/packer-plugin-sdk/retry/retry.go +++ b/packer-plugin-sdk/retry/retry.go @@ -1,3 +1,5 @@ +// Package retry provides tooling to retry API calls which are known to be +// vulnerable to throttling or flakiness due to eventual consistency. package retry import ( diff --git a/packer-plugin-sdk/rpc/init.go b/packer-plugin-sdk/rpc/init.go index f08e76494..54ff2aca7 100644 --- a/packer-plugin-sdk/rpc/init.go +++ b/packer-plugin-sdk/rpc/init.go @@ -1,3 +1,9 @@ +/* +Package rpc contains the implementation of the remote procedure call code that +the Packer core uses to communicate with packer plugins. As a plugin maintainer, +You are unlikely to need to directly import or use this package, but it +underpins the packer server that all plugins must implement. +*/ package rpc import "encoding/gob"