[US-1146] Using custom http.Client in digital signature timestamp service#291
Merged
sampila merged 3 commits intounidoc:masterfrom Oct 15, 2025
Merged
[US-1146] Using custom http.Client in digital signature timestamp service#291sampila merged 3 commits intounidoc:masterfrom
http.Client in digital signature timestamp service#291sampila merged 3 commits intounidoc:masterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR demonstrates how to use a custom HTTP client with the timestamp service in digital signature operations and updates multiple files to use modern Go standard library functions by replacing deprecated ioutil calls with their os package equivalents.
Key Changes:
- Adds a new example
pdf_sign_custom_client.goshowcasing custom timestamp client configuration with HTTP timeout settings - Replaces deprecated
ioutil.ReadFileandioutil.WriteFilewithos.ReadFileandos.WriteFileacross multiple signature example files - Updates import statement in
pdf_sign_external_google_cloud_kms.goto use the current kmspb package path
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| signatures/pdf_sign_custom_client.go | New example demonstrating custom timestamp client usage with configurable HTTP timeout |
| signatures/pdf_sign_twice_visible_annotation.go | Replaced deprecated ioutil.WriteFile with os.WriteFile |
| signatures/pdf_sign_timestamp.go | Replaced deprecated ioutil.ReadFile with os.ReadFile |
| signatures/pdf_sign_pkcs12.go | Replaced deprecated ioutil.ReadFile with os.ReadFile |
| signatures/pdf_sign_pem_multicert.go | Replaced deprecated ioutil.ReadFile with os.ReadFile in two locations |
| signatures/pdf_sign_pades_b_t.go | Replaced deprecated ioutil.ReadFile with os.ReadFile in two locations |
| signatures/pdf_sign_pades_b_lta.go | Replaced deprecated ioutil.ReadFile with os.ReadFile in two locations |
| signatures/pdf_sign_pades_b_lt.go | Replaced deprecated ioutil.ReadFile with os.ReadFile in two locations |
| signatures/pdf_sign_pades_b_b.go | Replaced deprecated ioutil.ReadFile with os.ReadFile in two locations |
| signatures/pdf_sign_external_google_cloud_kms.go | Multiple updates: replaced ioutil functions, updated kmspb import, improved defer error handling |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
htpp.Client in digital signature timestamp servicehttp.Client in digital signature timestamp service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds
pdf_sign_custom_client.goto showcases how to use a custom timestamp client.Other updates is to implements linter suggestion.