add extra line before package declaration so this line does not become the synopsis of a package for godoc

This commit is contained in:
Megan Marsh 2020-12-11 16:04:43 -08:00
parent 166a3663c3
commit 5f34bbd56e
131 changed files with 161 additions and 28 deletions

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config,AlicloudDiskDevice"; DO NOT EDIT.
package ecs
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config,BlockDevices,BlockDevice"; DO NOT EDIT.
package chroot
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type VaultAWSEngineOptions,AssumeRoleConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type BlockDevice"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type AmiFilterOptions,SecurityGroupFilterOptions,SubnetFilterOptions,VpcFilterOptions,PolicyDocument,Statement"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type AWSPollingConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package ebs
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config,RootBlockDevice,BlockDevice"; DO NOT EDIT.
package ebssurrogate
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config,BlockDevice"; DO NOT EDIT.
package ebsvolume
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package instance
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config,SharedImageGallery,SharedImageGalleryDestination,PlanInformation"; DO NOT EDIT.
package arm
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package chroot
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type SharedImageGalleryDestination,TargetRegion"; DO NOT EDIT.
package chroot
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config,SharedImageGallery,SharedImageGalleryDestination,DtlArtifact,ArtifactParameter"; DO NOT EDIT.
package dtl
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package cloudstack
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package digitalocean
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package docker
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package file
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config,CustomerEncryptionKey"; DO NOT EDIT.
package googlecompute
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type IAPConfig"; DO NOT EDIT.
package googlecompute
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config,imageFilter"; DO NOT EDIT.
package hcloud
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package hyperone
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type OutputConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package iso
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package vmcx
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package jdcloud
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package linode
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package lxc
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package lxd
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package ncloud
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package null
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package oneandone
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config,ImageFilter,ImageFilterOptions"; DO NOT EDIT.
package openstack
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package classic
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config,CreateVNICDetails,ListImagesRequest"; DO NOT EDIT.
package oci
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package bsu
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config,RootBlockDevice"; DO NOT EDIT.
package bsusurrogate
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config,BlockDevice"; DO NOT EDIT.
package bsuvolume
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package chroot
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type SecurityGroupFilterOptions,OmiFilterOptions,SubnetFilterOptions,NetFilterOptions,BlockDevice"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package iso
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package pvm
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package profitbricks
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package proxmoxclone
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config,nicConfig,diskConfig,vgaConfig,storageConfig"; DO NOT EDIT.
package proxmox
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config,nicConfig,diskConfig,vgaConfig"; DO NOT EDIT.
package proxmoxiso
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config,QemuImgArgs"; DO NOT EDIT.
package qemu
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package scaleway
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package cvm
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type tencentCloudDataDisk"; DO NOT EDIT.
package cvm
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package triton
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type MachineImageFilter"; DO NOT EDIT.
package triton
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type ImageDestination"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package uhost
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package vagrant
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package iso
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package ovf
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package vm
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package iso
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package vmx
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package clone
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type CloneConfig,vAppConfig"; DO NOT EDIT.
package clone
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type CustomizeConfig,LinuxOptions,NetworkInterfaces,NetworkInterface,GlobalDnsSettings,GlobalRoutingSettings"; DO NOT EDIT.
package clone
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type LocationConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type OutputConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type CDRomConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type FloppyConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type ConfigParamsConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type ConnectConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type ExportConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type HardwareConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type ContentLibraryDestinationConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type RemoveCDRomConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type RunConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type ShutdownConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type WaitIpConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type StorageConfig,DiskConfig"; DO NOT EDIT.
package common
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package iso
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type NIC,CreateConfig"; DO NOT EDIT.
package iso
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package yandex
import (

View File

@ -141,7 +141,7 @@ func main() {
out := bytes.NewBuffer(nil)
fmt.Fprintf(out, `// Code generated by "%s %s"; DO NOT EDIT.`, mapstructureToHCL2, strings.Join(os.Args[1:], " "))
fmt.Fprintf(out, "\npackage %s\n", topPkg.Name)
fmt.Fprintf(out, "\n\npackage %s\n", topPkg.Name)
delete(usedImports, NamePath{topPkg.Name, topPkg.PkgPath})
usedImports[NamePath{"hcldec", "github.com/hashicorp/hcl/v2/hcldec"}] = types.NewPackage("hcldec", "github.com/hashicorp/hcl/v2/hcldec")

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type MockConfig,NestedMockConfig,MockTag"; DO NOT EDIT.
package hcl2template
import (

View File

@ -1,6 +1,6 @@
/*
The acctest package provides an acceptance testing framework for testing
builders and provisioners.
Package acctest provides an acceptance testing framework for testing builders
and provisioners.
Writing Provisioner Acceptance Tests
@ -240,5 +240,4 @@ Once you finish these steps, you should be ready to run your new provisioner
acceptance test by setting the name used in the BuildersAccTest map as your
`ACC_TEST_BUILDERS` environment variable.
*/
package acctest

View File

@ -1,9 +1,8 @@
/*
The provisioneracc package creates a framework for provisioner acceptance
Package provisioneracc creates a framework for provisioner acceptance
testing. For builder acceptance testing, use the top level tooling in the
acctest package.
*/
package provisioneracc
import (

View File

@ -1,3 +1,5 @@
// Package testutils provides some simple ease-of-use tools for implementing
// acceptance testing.
package testutils
import "os"

View File

@ -10,5 +10,4 @@ You may want to use this adapter if you are writing a provisioner that wraps a
tool which under normal usage would be run locally and form a connection to the
remote instance itself.
*/
package adapter

View File

@ -1,13 +1,10 @@
/*
Package bootcommand generates and sends boot commands to the remote instance.
This package is relevant to people who want to create new builders, particularly
builders with the capacity to build a VM from an iso.
You can choose between three different drivers to send the command: a vnc
driver, a usb driver, and a PX-XT keyboard driver. The driver you choose will
depend on what kind of keyboard codes your hypervisor expects, and how you want
to implement the connection.
*/
// Package bootcommand generates and sends boot commands to the remote instance.
//
// This package is relevant to people who want to create new builders, particularly
// builders with the capacity to build a VM from an iso.
//
// You can choose between three different drivers to send the command: a vnc
// driver, a usb driver, and a PX-XT keyboard driver. The driver you choose will
// depend on what kind of keyboard codes your hypervisor expects, and how you want
// to implement the connection.
package bootcommand

View File

@ -1,3 +1,3 @@
package bootcommand
//go:generate pigeon -o boot_command.go boot_command.pigeon
package bootcommand

View File

@ -21,5 +21,4 @@ The HashiCorp-maintained Amazon and Azure builder plugins have chroot builders
which use this option and can serve as an example for how the chroot steps and
communicator are used.
*/
package chroot

View File

@ -1,3 +1,8 @@
// Package common provides the PackerConfig structure that gets passed to every
// plugin and contains information populated by the Packer core. This config
// contains data about command line flags that were used, as well as template
// information and information about the Packer core's version. It also
// proivdes string constants to use to access that config.
package common
import (

View File

@ -7,7 +7,10 @@ import (
"github.com/hashicorp/packer/packer-plugin-sdk/multistep"
)
// Generic commHost function that should work for most cloud builders.
// CommHost determines the IP address of the cloud instance that Packer
// should connect to. A custom CommHost function can be implemented in each
// builder if need be; this is a generic function that should work for most
// cloud builders.
func CommHost(host string, statebagKey string) func(multistep.StateBag) (string, error) {
return func(state multistep.StateBag) (string, error) {
if host != "" {

View File

@ -24,8 +24,9 @@ import (
"golang.org/x/crypto/ssh/agent"
)
// Config is the common configuration that communicators allow within
// a builder.
// Config is the common a builder uses to define and configure a Packer
// communicator. Embed this struct in your builder config to implement
// communicator support.
type Config struct {
// Packer currently supports three kinds of communicators:
//
@ -59,6 +60,7 @@ type Config struct {
WinRM `mapstructure:",squash"`
}
// The SSH config defines configuration for the SSH communicator.
type SSH struct {
// The address to SSH to. This usually is automatically configured by the
// builder.
@ -189,7 +191,7 @@ type SSH struct {
}
// When no ssh credentials are specified, Packer will generate a temporary SSH
// keypair for the instance, you can change the algorithm type and bits
// keypair for the instance. You can change the algorithm type and bits
// settings.
type SSHTemporaryKeyPair struct {
// `dsa` | `ecdsa` | `ed25519` | `rsa` ( the default )
@ -208,6 +210,7 @@ type SSHTemporaryKeyPair struct {
SSHTemporaryKeyPairBits int `mapstructure:"temporary_key_pair_bits"`
}
// The WinRM config defines configuration for the WinRM communicator.
type WinRM struct {
// The username to use to connect to WinRM.
WinRMUser string `mapstructure:"winrm_username"`
@ -244,14 +247,19 @@ type WinRM struct {
WinRMTransportDecorator func() winrm.Transporter
}
func (c *SSH) ConfigSpec() hcldec.ObjectSpec { return c.FlatMapstructure().HCL2Spec() }
// The ConfigSpec funcs are used by the Packer core to parse HCL2 templates.
func (c *SSH) ConfigSpec() hcldec.ObjectSpec { return c.FlatMapstructure().HCL2Spec() }
// The ConfigSpec funcs are used by the Packer core to parse HCL2 templates.
func (c *WinRM) ConfigSpec() hcldec.ObjectSpec { return c.FlatMapstructure().HCL2Spec() }
// Configure parses the json template into the Config structs
func (c *SSH) Configure(raws ...interface{}) ([]string, error) {
err := config.Decode(c, nil, raws...)
return nil, err
}
// Configure parses the json template into the Config structs
func (c *WinRM) Configure(raws ...interface{}) ([]string, error) {
err := config.Decode(c, nil, raws...)
return nil, err
@ -262,6 +270,8 @@ var (
_ packersdk.ConfigurableCommunicator = new(WinRM)
)
// SSHInterface defines whether to use public or private, addresses, and whether
// to use IPv4 or IPv6.
type SSHInterface struct {
// One of `public_ip`, `private_ip`, `public_dns`, or `private_dns`. If
// set, either the public IP address, private IP address, public DNS name
@ -282,7 +292,7 @@ type SSHInterface struct {
SSHIPVersion string `mapstructure:"ssh_ip_version"`
}
// ReadSSHPrivateKeyFile returns the SSH private key bytes
// ReadSSHPrivateKeyFile returns the SSH private key bytes.
func (c *Config) ReadSSHPrivateKeyFile() ([]byte, error) {
var privateKey []byte

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type MockPostProcessor"; DO NOT EDIT.
package packer
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package alicloudimport
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package amazonimport
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package artifice
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package checksum
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package compress
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package digitaloceanimport
import (

View File

@ -1,4 +1,5 @@
// Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
package dockerimport
import (

Some files were not shown because too many files have changed in this diff Show More