From eab5e2288625eb9c2b68555563bbd62d6b9eb5af Mon Sep 17 00:00:00 2001 From: kellem negasi Date: Thu, 22 Feb 2024 21:28:21 +0300 Subject: [PATCH 1/2] remove comment in init function --- table-info/partition_text.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/table-info/partition_text.go b/table-info/partition_text.go index 221b44b8..7af52e18 100644 --- a/table-info/partition_text.go +++ b/table-info/partition_text.go @@ -11,18 +11,20 @@ import ( "os" "strconv" + "github.com/unidoc/unipdf/v3/common/license" "github.com/unidoc/unipdf/v3/extractor" "github.com/unidoc/unipdf/v3/model" ) -// func init() { -// // Make sure to load your metered License API key prior to using the library. -// // If you need a key, you can sign up and create a free one at https://cloud.unidoc.io -// err := license.SetMeteredKey(os.Getenv(`UNIDOC_LICENSE_API_KEY`)) -// if err != nil { -// panic(err) -// } -// } +func init() { + // Make sure to load your metered License API key prior to using the library. + // If you need a key, you can sign up and create a free one at https://cloud.unidoc.io + err := license.SetMeteredKey(os.Getenv(`UNIDOC_LICENSE_API_KEY`)) + if err != nil { + panic(err) + } +} + func main() { if len(os.Args) < 3 { From 78703a60c1121060cecf896aacd1819390bba9de Mon Sep 17 00:00:00 2001 From: kellem negasi Date: Fri, 23 Feb 2024 11:49:16 +0300 Subject: [PATCH 2/2] remove white space in main function --- table-info/partition_text.go | 1 - 1 file changed, 1 deletion(-) diff --git a/table-info/partition_text.go b/table-info/partition_text.go index 7af52e18..5d0f3cd4 100644 --- a/table-info/partition_text.go +++ b/table-info/partition_text.go @@ -26,7 +26,6 @@ func init() { } func main() { - if len(os.Args) < 3 { fmt.Printf("Usage: go run partition_text.go inputFile.pdf pageNum\n") os.Exit(1)