File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -58,30 +58,35 @@ func (val Value) As(dst interface{}) error {
5858 return fmt .Errorf ("can't unmarshal %s into %T, expected string" , val .typ , dst )
5959 }
6060 * target = v
61+ return nil
6162 case * big.Float :
6263 v , ok := val .value .(* big.Float )
6364 if ! ok {
6465 return fmt .Errorf ("can't unmarshal %s into %T, expected *big.Float" , val .typ , dst )
6566 }
6667 target .Set (v )
68+ return nil
6769 case * bool :
6870 v , ok := val .value .(bool )
6971 if ! ok {
7072 return fmt .Errorf ("can't unmarshal %s into %T, expected boolean" , val .typ , dst )
7173 }
7274 * target = v
75+ return nil
7376 case * map [string ]Value :
7477 v , ok := val .value .(map [string ]Value )
7578 if ! ok {
7679 return fmt .Errorf ("can't unmarshal %s into %T, expected map[string]tftypes.Value" , val .typ , dst )
7780 }
7881 * target = v
82+ return nil
7983 case * []Value :
8084 v , ok := val .value .([]Value )
8185 if ! ok {
8286 return fmt .Errorf ("can't unmarshal %s into %T expected []tftypes.Value" , val .typ , dst )
8387 }
8488 * target = v
89+ return nil
8590 }
8691 return fmt .Errorf ("can't unmarshal into %T, needs UnmarshalTerraform5Type method" , dst )
8792}
You can’t perform that action at this time.
0 commit comments