mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-05-27 20:30:17 -04:00
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
15 lines
433 B
Go
15 lines
433 B
Go
// Copyright IBM Corp. 2010, 2025
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package myplugin
|
|
|
|
import (
|
|
pb "github.com/hashicorp/vagrant/builtin/myplugin/proto"
|
|
"github.com/mitchellh/mapstructure"
|
|
"google.golang.org/protobuf/types/known/structpb"
|
|
)
|
|
|
|
func StructToCommunincatorOptions(in *structpb.Struct) (*pb.CommunicatorOptions, error) {
|
|
var result pb.CommunicatorOptions
|
|
return &result, mapstructure.Decode(in.AsMap(), &result)
|
|
}
|