vagrant/builtin/myplugin/mappers.go
oss-core-libraries-dashboard[bot] 614fcb0549
[COMPLIANCE] Update Copyright and License Headers (Batch 1 of 7) (#13765)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2025-12-22 16:38:56 +05:30

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)
}