@@ -26,59 +26,6 @@ Options:
26
26
27
27
### Go package documentation
28
28
29
- ``` go
30
- import " github.com/awslabs/aws-cloudformation-template-formatter/format"
31
- ```
32
-
33
- Package format provides functions for formatting CloudFormation
34
- templates using an opinionated, idiomatic format as used in AWS
35
- documentation.
36
-
37
- For each function, CloudFormation templates should be represented using
38
- a ` map[string]interface{} ` as output by other libraries that parse
39
- JSON/YAML such as ` github.com/awslabs/goformation ` and ` encoding/json ` .
40
-
41
- Comments can be passed along with the template data in the following
42
- format:
43
-
44
- ``` go
45
- map [interface {}]interface {}{
46
- " " : " This is a top-level comment" ,
47
- " Resources" : map [interface {}]interface {}{
48
- " " : " This is a comment on the whole `Resources` property" ,
49
- " MyBucket" : map [interface {}]interface {}{
50
- " Properties" : map [interface {}]interface {}{
51
- " BucketName" : " This is a comment on BucketName" ,
52
- },
53
- },
54
- },
55
- }
56
- ```
57
-
58
- Empty string keys are taken to represent a comment on the overall node
59
- that the comment is attached to. Numeric keys can be used to reference
60
- elements of arrays in the source data.
61
-
62
- #### Functions
29
+ ** The API for cfn-format will be changing in 1.0.0**
63
30
64
- ``` go
65
- func Json (data map [string ]interface {}) string
66
- Json formats the CloudFormation template as a Json string
67
- ```
68
-
69
- ```go
70
- func JsonWithComments(data map[string]interface{}, comments map [interface {}]interface {}) string
71
- JsonWithComments formats the CloudFormation template as a Json string
72
- with comments as provided
73
- ```
74
-
75
- ``` go
76
- func Yaml (data map [string ]interface {}) string
77
- Yaml formats the CloudFormation template as a Yaml string
78
- ```
79
-
80
- ```go
81
- func YamlWithComments(data map[string]interface{}, comments map [interface {}]interface {}) string
82
- YamlWithComments formats the CloudFormation template as a Yaml string
83
- with comments as provided
84
- ```
31
+ To see the current Go documentation for cfn-format, please check <format/doc.go>.
0 commit comments