From 6cc918f44a77497ce05c92821b1374c6e2212226 Mon Sep 17 00:00:00 2001 From: Shunsuke Suzuki Date: Wed, 26 May 2021 08:58:47 +0900 Subject: [PATCH 1/2] add toml to API description --- backend/file/file.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/file/file.go b/backend/file/file.go index 18592ae..06f9bb3 100644 --- a/backend/file/file.go +++ b/backend/file/file.go @@ -13,7 +13,7 @@ import ( ) // Backend that loads a configuration from a file. -// It supports json and yaml formats. +// It supports JSON, YAML, and TOML formats. type Backend struct { path string name string @@ -51,7 +51,7 @@ func NewOptionalBackend(path string) *Backend { } // Unmarshal takes a struct pointer and unmarshals the file into it, -// using either json or yaml based on the file extention. +// using one of JSON, YAML, or TOML based on the file extention. func (b *Backend) Unmarshal(ctx context.Context, to interface{}) error { f, err := os.Open(b.path) if err != nil { From 9633bd510e7447a731af3ba67cbc74bec09121b5 Mon Sep 17 00:00:00 2001 From: Shunsuke Suzuki Date: Wed, 26 May 2021 09:10:05 +0900 Subject: [PATCH 2/2] fix typo --- backend/file/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/file/file.go b/backend/file/file.go index 06f9bb3..79e1f26 100644 --- a/backend/file/file.go +++ b/backend/file/file.go @@ -51,7 +51,7 @@ func NewOptionalBackend(path string) *Backend { } // Unmarshal takes a struct pointer and unmarshals the file into it, -// using one of JSON, YAML, or TOML based on the file extention. +// using one of JSON, YAML, or TOML based on the file extension. func (b *Backend) Unmarshal(ctx context.Context, to interface{}) error { f, err := os.Open(b.path) if err != nil {