Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@3ace
Copy link
Contributor

@3ace 3ace commented Oct 15, 2025

This PR adds pdf_sign_custom_client.go to showcases how to use a custom timestamp client.

Other updates is to implements linter suggestion.

@3ace 3ace requested review from anovik, Copilot and sampila October 15, 2025 07:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.go showcasing custom timestamp client configuration with HTTP timeout settings
  • Replaces deprecated ioutil.ReadFile and ioutil.WriteFile with os.ReadFile and os.WriteFile across multiple signature example files
  • Updates import statement in pdf_sign_external_google_cloud_kms.go to 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.

@anovik anovik changed the title [US-1146] Using custom htpp.Client in digital signature timestamp service [US-1146] Using custom http.Client in digital signature timestamp service Oct 15, 2025
Copy link
Contributor

@anovik anovik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@sampila sampila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@sampila sampila merged commit c415379 into unidoc:master Oct 15, 2025
4 checks passed
@3ace 3ace deleted the us-1146-custom-client branch October 15, 2025 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants