From 0af1b8e57192ff8007b0ac5c5e7f39dbbb335330 Mon Sep 17 00:00:00 2001 From: goodliu Date: Mon, 16 Oct 2023 20:05:56 +0800 Subject: [PATCH] run go fmt ./... (#3) --- CONTRIBUTING.md | 176 +++++++++--------- CONTRIBUTING.zh_CN.md | 118 ++++++++++++ debuglog/log.go | 9 +- debuglog/log_factory.go | 9 +- debuglog/log_test.go | 9 +- debuglog/rule.go | 9 +- debuglog/rule_test.go | 9 +- degrade/concurrency.go | 9 +- degrade/degrade.go | 9 +- degrade/degrade_test.go | 9 +- degrade/go.sum | 2 +- degrade/internal/cgroup/cpu.go | 9 +- degrade/internal/cgroup/cpu_test.go | 9 +- degrade/internal/cgroup/memory.go | 9 +- degrade/internal/cgroup/memory_test.go | 9 +- degrade/internal/cgroup/utils.go | 9 +- degrade/internal/cgroup/utils_test.go | 9 +- degrade/stat.go | 9 +- degrade/stat_test.go | 9 +- filterextensions/cfg.go | 9 +- filterextensions/plugin.go | 9 +- filterextensions/plugin_test.go | 9 +- hystrix/hystrix.go | 9 +- hystrix/hystrix_test.go | 9 +- jwt/jwt.go | 9 +- jwt/jwt_factory.go | 9 +- jwt/jwt_factory_test.go | 9 +- jwt/jwt_test.go | 9 +- jwt/signer.go | 9 +- jwt/signer_test.go | 9 +- masking/deep.go | 9 +- masking/masking.go | 9 +- masking/masking_factory.go | 9 +- masking/masking_factory_test.go | 9 +- masking/masking_test.go | 9 +- mock/mock.go | 9 +- mock/mock_factory.go | 9 +- mock/mock_test.go | 9 +- recovery/recovery.go | 9 +- recovery/recovery_test.go | 9 +- referer/referer.go | 9 +- referer/referer_factory.go | 9 +- referer/referer_factory_test.go | 9 +- referer/referer_test.go | 9 +- slime/cfg.go | 9 +- slime/client_retries_internal_test.go | 12 +- slime/cpmsg/copy_msg.go | 9 +- slime/cpmsg/copy_msg_test.go | 9 +- slime/filter.go | 9 +- slime/hedging/hedging.go | 9 +- slime/hedging/hedging_internal_test.go | 9 +- slime/hedging/hedging_test.go | 10 +- slime/hedging/hedging_throttle_test.go | 9 +- slime/hedging/impl.go | 9 +- slime/hedging/throttled_hedging.go | 9 +- slime/manager.go | 9 +- slime/once/once.go | 9 +- slime/once/once_test.go | 9 +- slime/opts.go | 9 +- slime/proto_naming_mismatch_test.go | 10 +- slime/pushback/pushback.go | 9 +- slime/retry/customized_backoff.go | 9 +- slime/retry/expotential_backoff.go | 9 +- slime/retry/impl.go | 9 +- slime/retry/linear_backoff.go | 9 +- slime/retry/retry.go | 9 +- slime/retry/retry_internal_test.go | 9 +- slime/retry/retry_test.go | 10 +- slime/retry/retry_throttle_test.go | 9 +- slime/retry/throttled_retry.go | 9 +- slime/special_codec_test/http/hedging_test.go | 9 +- slime/special_codec_test/http/http_test.go | 10 +- slime/special_codec_test/http/retry_test.go | 9 +- slime/throttle/throttle_none.go | 9 +- slime/throttle/throttler.go | 9 +- slime/throttle/token_bucket.go | 9 +- slime/throttle/token_bucket_internal_test.go | 9 +- slime/view/log/log.go | 9 +- slime/view/log/log_test.go | 9 +- slime/view/log/noop.go | 9 +- slime/view/metrics/noop.go | 9 +- slime/view/metrics/prometheus/prom.go | 9 +- slime/view/metrics/prometheus/prom_test.go | 9 +- slime/view/metrics/report.go | 9 +- slime/view/metrics/report_test.go | 9 +- slime/view/stat.go | 9 +- transinfo-blocker/factory.go | 9 +- transinfo-blocker/factory_test.go | 9 +- transinfo-blocker/whitelist.go | 9 +- transinfo-blocker/whitelist_test.go | 9 +- tvar/export.go | 9 +- tvar/export_test.go | 9 +- tvar/filter.go | 9 +- tvar/filter_test.go | 9 +- tvar/latency.go | 9 +- tvar/meterprovider/config.go | 9 +- tvar/meterprovider/exporter.go | 9 +- tvar/meterprovider/exporter_test.go | 9 +- tvar/metrics.go | 9 +- tvar/observer_linux.go | 9 +- tvar/observer_linux_test.go | 9 +- tvar/observer_noop.go | 9 +- tvar/plugin.go | 9 +- tvar/plugin_test.go | 9 +- tvar/slidingwindow/doc.go | 19 +- tvar/slidingwindow/slidingwindow.go | 9 +- tvar/slidingwindow/slidingwindow_test.go | 9 +- tvar/slidingwindow/window.go | 9 +- validation/validation.go | 9 +- validation/validation_factory.go | 9 +- validation/validation_factory_test.go | 9 +- validation/validation_test.go | 9 +- 112 files changed, 1087 insertions(+), 207 deletions(-) create mode 100644 CONTRIBUTING.zh_CN.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f702e8a..b5aa430 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,126 +1,128 @@ -# How to Contribute +English | [中文](CONTRIBUTING.zh_CN.md) -Thank you for your interest and support in tRPC! +# How to Contribute -We welcome and appreciate any form of contribution, including but not limited to submitting issues, providing improvement suggestions, improving documentation, fixing bugs, and adding features. +Thank you for your interest and support in go-filter! +We welcome and appreciate any form of contribution, including but not limited to submitting issues, providing improvement suggestions, improving documentation, fixing bugs, and adding features. This document aims to provide you with a detailed contribution guide to help you better participate in the project. - Please read this guide carefully before contributing and make sure to follow the rules here. - We look forward to working with you to make this project better together! -## Before submitting an issue - -Please make sure that you have reviewed the project's documentation, FAQ, and existing issues. - -This can avoid submitting known issues repeatedly and save your and the project maintainer's time. - -When you decide to submit an issue, please follow these rules: -- Select appropriate labels for the issue. This helps us to quickly locate the problem and solve it as soon as possible. -- Ensure that the issue title is concise and accurately summarizes the problem. Avoid using vague words such as "problem" or "error". - -In the issue description, please provide a detailed description of the problem you encountered. - -This includes but is not limited to the following: -- Problem description: briefly describe the symptoms and impact of the problem. -- Reproduction steps: describe in detail how to reproduce the problem, so that we can locate and solve the problem more quickly. -- Environment information: relevant information including operating system, browser, project version, etc. -- Error log: if there are relevant error logs, please provide them. -- Expected results: describe what the correct result should be. -- Screenshots or screen recordings: if possible, provide screenshots or screen recordings of the problem. +## Before contributing code -Please be polite and friendly. +The project welcomes code patches, but to make sure things are well coordinated you should discuss any significant change before starting the work. +It's recommended that you signal your intention to contribute in the issue tracker, either by claiming an [existing one](https://github.com/trpc-ecosystem/go-filter/issues) or by [opening a new issue](https://github.com/trpc-ecosystem/go-filter/issues/new). -We attach great importance to the environment of the project and hope that everyone can grow together in a friendly and inclusive environment. +### Checking the issue tracker -## Rules for submitting PRs +Whether you already know what contribution to make, or you are searching for an idea, the [issue tracker](https://github.com/trpc-ecosystem/go-filter/issues) is always the first place to go. +Issues are triaged to categorize them and manage the workflow. -We welcome you to submit code for the project. +Most issues will be marked with one of the following workflow labels: +- **NeedsInvestigation**: The issue is not fully understood and requires analysis to understand the root cause. +- **NeedsDecision**: The issue is relatively well understood, but the go-filter team hasn't yet decided the best way to address it. + It would be better to wait for a decision before writing code. + If you are interested in working on an issue in this state, feel free to "ping" maintainers in the issue's comments if some time has passed without a decision. +- **NeedsFix**: The issue is fully understood and code can be written to fix it. -Before submitting a PR, please make sure that you have read this contribution guide. +### Opening an issue for any new problem -Here are some suggestions and rules regarding submitting PRs. +Excluding very trivial changes, all contributions should be connected to an existing issue. +Feel free to open one and discuss your plans. +This process gives everyone a chance to validate the design, helps prevent duplication of effort, and ensures that the idea fits inside the goals for the language and tools. +It also checks that the design is sound before code is written; the code review tool is not the place for high-level discussions. -Please read them carefully before submitting: -- Ensure that your code conforms to the project's code specifications. This includes but is not limited to code style, comment specifications, etc. This helps us to maintain the cleanliness and consistency of the project. -- Before submitting a PR, please make sure that you have tested your code locally. Ensure that the code has no obvious errors and can run normally. -- Please select appropriate labels for your PR. This helps us to process your PR more quickly. -- Ensure that your PR title is concise and accurately summarizes your changes. Avoid using vague words such as "update" or "modify". -- In the PR description, please provide a detailed description of your changes. This includes but is not limited to the following: - - Reason for modification: briefly explain why this modification is necessary. - - Modification content: describe in detail what you have modified and how you have implemented it. - - Scope of impact: describe the functions or modules that may be affected by the modification. - - Testing: describe the testing you have done locally and the results. -- If your PR resolves a certain issue, please associate the corresponding issue in the PR description. For example: Fixes #123. +When opening an issue, make sure to answer these five questions: +1. What version of go-filter are you using ? +2. What operating system and processor architecture are you using(`go env`)? +3. What did you do? +4. What did you expect to see? +5. What did you see instead? -## Communication and Consultation +For change proposals, see Proposing Changes To [tRPC-Proposals](https://github.com/trpc-group/trpc/tree/main/proposal). -We welcome you to participate in the project's communication and consultation. +## Contributing code -You can interact with us through the following channels: -- Submit your questions or suggestions in the project's discussions. -- Join our technical communication group. +Follow the [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow) to [create a GitHub pull request](https://docs.github.com/en/get-started/quickstart/github-flow#create-a-pull-request). +If this is your first time submitting a PR to the go-filter project, you will be reminded in the "Conversation" tab of the PR to sign and submit the [Contributor License Agreement](https://github.com/trpc-group/cla-database/blob/main/Tencent-Contributor-License-Agreement.md). +Only when you have signed the Contributor License Agreement, your submitted PR has the possibility of being accepted. ---- +Some things to keep in mind: +- Ensure that your code conforms to the project's code specifications. + This includes but is not limited to code style, comment specifications, etc. This helps us to maintain the cleanliness and consistency of the project. +- Before submitting a PR, please make sure that you have tested your code locally(`go test ./...`). + Ensure that the code has no obvious errors and can run normally. +- To update the pull request with new code, just push it to the branch; + you can either add more commits, or rebase and force-push (both styles are accepted). +- If the request is accepted, all commits will be squashed, and the final commit description will be composed by concatenating the pull request's title and description. + The individual commits' descriptions will be discarded. + See following "Write good commit messages" for some suggestions. -# 如何作出贡献 +### Writing good commit messages -首先,感谢您对本开源项目的关注和支持! +Commit messages in go-filter follow a specific set of conventions, which we discuss in this section. -我们非常欢迎和感谢任何形式的贡献,包括但不限于提交问题、提出改进意见、完善文档、修复缺陷以及新增功能。 +Here is an example of a good one: -本文档旨在为您提供一份详尽的贡献指南,以便您更好地参与到项目中。 -请在参与贡献之前仔细阅读本指南,并确保遵循其中的规则和建议。 +> math: improve Sin, Cos and Tan precision for very large arguments +> +> The existing implementation has poor numerical properties for +> large arguments, so use the McGillicutty algorithm to improve +> accuracy above 1e10. +> +> The algorithm is described at https://wikipedia.org/wiki/McGillicutty_Algorithm +> +> Fixes #159 -我们期待与您一起打造一个更加完善的开源项目! -## 提交 issue 的规则 +#### First line -在提交 issue 之前,请先确保您已经查看了项目的文档、常见问题解答以及已有的 issue。 +The first line of the change description is conventionally a short one-line summary of the change, prefixed by the primary affected package. -这样可以避免重复提交已知问题,节省您和项目维护者的时间。 +A rule of thumb is that it should be written so to complete the sentence "This change modifies go-filter to _____." +That means it does not start with a capital letter, is not a complete sentence, and actually summarizes the result of the change. -当您确定需要提交一个 issue 时,请遵循以下规则: -- 为 issue 选择合适的标签。这有助于我们更快地找到问题所在,以便尽快解决。 -- 请确保您的 issue 标题简洁明了,能够准确概括问题所在。避免使用模糊的词语,如“问题”、“错误”等。 +Follow the first line by a blank line. -在 issue 描述中,请详细说明您遇到的问题。 +#### Main content -包括但不限于以下内容: -- 问题描述:简要说明问题的现象和影响。 -- 复现步骤:详细描述如何复现问题,让我们能够更快地定位和解决问题。 -- 环境信息:包括操作系统、浏览器、项目版本等相关信息。 -- 错误日志:如果有相关错误日志,请一并提供。 -- 期望结果:描述您期望的正确结果是什么。 -- 截图或录屏:如果可能,请提供问题现象的截图或录屏。 +The rest of the description elaborates and should provide context for the change and explain what it does. +Write in complete sentences with correct punctuation, just like for your comments in go-filter. +Don't use HTML, Markdown, or any other markup language. +Add any relevant information, such as benchmark data if the change affects performance. +The [benchstat](https://godoc.org/golang.org/x/perf/cmd/benchstat) tool is conventionally used to format benchmark data for change descriptions. -请保持礼貌和友好。我们非常重视项目的氛围,希望每个人都能够在友好、包容的环境中共同成长。 +#### Referencing issues -## 提交 PR 的规则 +The special notation "Fixes #12345" associates the change with issue 12345 in the go-filter issue tracker. +When this change is eventually applied, the issue tracker will automatically mark the issue as fixed. -我们非常欢迎您为项目提交代码。 -在提交 PR 之前,请确保您已经阅读了项目的文档以及本贡献指南。 +## Miscellaneous topics -以下是关于提交 PR 的一些建议和规则,请在提交前仔细阅读: +### Copyright headers -- 请确保您的代码符合项目的代码规范。这包括但不限于代码风格、注释规范等。这有助于我们保持项目的整洁和一致性。 -- 在提交 PR 之前,请确保您已经在本地测试过您的代码。确保代码没有明显的错误,并能够正常运行。 -- 请为您的 PR 选择合适的标签。这有助于我们更快地处理您的 PR。 -- 请确保您的 PR 标题简洁明了,能够准确概括您的修改。避免使用模糊的词语,如“更新”、“修改”等。 -- 在 PR 描述中,请详细说明您的修改内容。包括但不限于以下内容: - - 修改原因:简要说明为什么要进行这次修改。 - - 修改内容:详细描述您修改了哪些内容,以及修改的具体实现。 - - 影响范围:说明修改可能影响到的功能或模块。 - - 测试情况:描述您在本地测试的情况,以及测试结果。 -- 如果您的 PR 解决了某个 issue,请在 PR 描述中关联对应的 issue。例如:Fixes #123。 +Files in the go-filter repository don't list author names, both to avoid clutter and to avoid having to keep the lists up to date. +Instead, your name will appear in the change log. -## 技术交流与问题咨询 +New files that you contribute should use the standard copyright header: -我们非常欢迎您参与到项目的技术交流和问题咨询中来。 +```go +// +// +// Tencent is pleased to support the open source community by making tRPC available. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// +// If you have downloaded a copy of the tRPC source code from Tencent, +// please note that tRPC source code is licensed under the Apache 2.0 License, +// A copy of the Apache 2.0 License is included in this file. +// +// +``` -您可以通过以下途径与我们互动: -- 在项目的 discussions 中提交您的问题或建议 -- 加入我们的技术交流群 +Files in the repository are copyrighted the year they are added. +Do not update the copyright year on files that you change. \ No newline at end of file diff --git a/CONTRIBUTING.zh_CN.md b/CONTRIBUTING.zh_CN.md new file mode 100644 index 0000000..f694faf --- /dev/null +++ b/CONTRIBUTING.zh_CN.md @@ -0,0 +1,118 @@ +[English](CONTRIBUTING.md) | 中文 + +# 如何贡献 + +感谢您对 go-filter 的关注和支持! + +我们欢迎并感激任何形式的贡献,包括但不限于提交 issue、提供改进建议、改进文档、修复错误和添加功能。 +本文档旨在为您提供详细的贡献指南,以帮助您更好地参与项目。 +在贡献之前,请仔细阅读本指南并确保遵循这里的规则。 +我们期待与您共同努力,使这个项目变得更好! + +## 在贡献代码之前 + +项目欢迎代码补丁,但为了确保事情得到良好协调,您应该在开始工作之前讨论任何重大变更。 +建议您在 issue 跟踪器中表明您的贡献意图,可以通过[认领现有 issue](https://github.com/trpc-ecosystem/go-filter/issues)或[创建新 issue](https://github.com/trpc-ecosystem/go-filter/issues/new) 来实现。 + +### 查看 issue 跟踪器 + +无论您已经知道要做哪些贡献,还是正在寻找想法,[issue 跟踪器](https://github.com/trpc-ecosystem/go-filter/issues)始终是您的第一个去处。 +issue 会被分类以管理工作流程。 + +大多数 issue 都会被标记为以下工作流标签之一: +- **NeedsInvestigation**:issue 尚未完全理解,需要分析以了解根本原因。 +- **NeedsDecision**:issue 相对已经理解得很好,但 go-filter 团队尚未决定解决 issue 的最佳方法。 + 在编写代码之前最好等待决策。 + 如果一段时间内没有决策且您有兴趣处理处于这种状态的 issue,请随时在 issue 评论中“ping”维护者。 +- **NeedsFix**:issue 已完全理解,可以编写代码进行修复。 + +### 为任何新问题打开一个 issue + +除非是非常细小的变更,否则所有贡献都应与现有 issue 有关。 +请随时打开一个 issue 并讨论您的计划。 +这个过程让每个人都有机会验证设计,有助于防止工作重复,确保想法符合语言和工具的目标。 +在编写代码之前,还可以检查设计是否合理;代码审查工具并非用于高层次的讨论。 + +在提交 issue 时,请确保回答以下五个问题: +1. 您正在使用哪个版本的go-filter? +2. 您正在使用哪个操作系统和处理器架构(go env)? +3. 您做了什么? +4. 您期望看到什么? +5. 您实际看到的是什么? + +关于变更提案,请参阅 [tRPC-Proposals](https://github.com/trpc-group/trpc/tree/main/proposal) 提议变更。 + +## 贡献代码 + +遵循 [GitHub 流程](https://docs.github.com/en/get-started/quickstart/github-flow)来[创建 GitHub PR(Pull Request)](https://docs.github.com/en/get-started/quickstart/github-flow#create-a-pull-request)。 + +如果你是第一次向 go-filter 项目提交 PR,那么在该 PR 的对话栏中会提醒你签署并提交[贡献者许可协议](https://github.com/trpc-group/cla-database/blob/main/Tencent-Contributor-License-Agreement.md)。 +只有当你签署过贡献者许可协议,你提交的 PR 才有可能被接受。 +请记住以下几点: + +- 确保您的代码符合项目的代码规范。 + 这包括但不限于代码风格、注释规范等。这有助于我们维护项目的整洁性和一致性。 +- 在提交 PR 之前,请确保您已在本地测试过您的代码。 确保代码没有明显的错误并且可以正常运行。 +- 要使用新代码更新拉取请求,只需将其推送到分支; 您可以添加更多提交,也可以 rebase 并 force-push(两种风格都可以接受)。 +- 如果请求被接受,所有提交将被压缩,最终提交描述将由 PR 的标题和描述组成。 + 单个提交的描述将被丢弃。 请参阅以下“编写良好的提交消息”以获取一些建议。 + +### 编写良好的提交消息 + +go-filter 中的提交消息遵循一套特定的约定,我们将在本节中讨论。 + +以下是一个良好的示例: +> math: improve Sin, Cos and Tan precision for very large arguments +> +> The existing implementation has poor numerical properties for large arguments, so use the McGillicutty algorithm to improve accuracy above 1e10. +> +> The algorithm is described at https://wikipedia.org/wiki/McGillicutty_Algorithm +> +> Fixes #159 + +#### 第一行 + +变更描述的第一行通常是一个简短的一行摘要,描述变更的内容,并以主要受影响的包为前缀。 + +一个经验法则是,它应该被写成完成句子 "This change modifies go-filter to _____." 这意味着它不以大写字母开头,不是一个完整的句子,而且确实概括了变更的结果。 + +在第一行之后空一行。 + +#### 主要内容 + +描述的其余部分应该详细说明,为变更提供上下文并解释它的作用。 +像在 go-filter 中的注释一样,使用正确的标点符号写完整的句子。 +不要使用 HTML、Markdown 或任何其他标记语言。 +添加任何相关信息,例如如果变更影响性能,请添加基准数据。 +[benchstat](https://godoc.org/golang.org/x/perf/cmd/benchstat)工具通常用于为变更描述格式化基准数据。 + +#### 引用 issue + +特殊表示法 "Fixes #12345" 将变更与 go-filter issue 跟踪器中的 issue 12345关联。 +当此变更最终应用时,issue 跟踪器将自动将该 issue 标记为已修复。 + +## 其他主题 + +### 版权声明 + +go-filter 代码仓库中的文件不列出作者姓名,以避免混乱并避免不断更新列表。 +而您的名字将出现在变更日志中。 + +您贡献的新文件应使用标准版权声明: +```go +// +// +// Tencent is pleased to support the open source community by making tRPC available. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// +// If you have downloaded a copy of the tRPC source code from Tencent, +// please note that tRPC source code is licensed under the Apache 2.0 License, +// A copy of the Apache 2.0 License is included in this file. +// +// +``` + +代码仓库中的文件在添加时受版权保护。 +在变更文件时,请勿更新版权年份。 \ No newline at end of file diff --git a/debuglog/log.go b/debuglog/log.go index 8c24b45..4a44315 100644 --- a/debuglog/log.go +++ b/debuglog/log.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package debuglog is a logger trpc-filter to printing server/client RPC calls. package debuglog diff --git a/debuglog/log_factory.go b/debuglog/log_factory.go index 465f272..4b9a8f7 100644 --- a/debuglog/log_factory.go +++ b/debuglog/log_factory.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package debuglog diff --git a/debuglog/log_test.go b/debuglog/log_test.go index 48ba5d8..5d834b9 100644 --- a/debuglog/log_test.go +++ b/debuglog/log_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package debuglog diff --git a/debuglog/rule.go b/debuglog/rule.go index 9b6d3a7..73fe175 100644 --- a/debuglog/rule.go +++ b/debuglog/rule.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package debuglog diff --git a/debuglog/rule_test.go b/debuglog/rule_test.go index 10eb35d..d8c7b6b 100644 --- a/debuglog/rule_test.go +++ b/debuglog/rule_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package debuglog diff --git a/degrade/concurrency.go b/degrade/concurrency.go index 86ee8ed..7d29169 100644 --- a/degrade/concurrency.go +++ b/degrade/concurrency.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package degrade diff --git a/degrade/degrade.go b/degrade/degrade.go index 73de7ed..d6a070d 100644 --- a/degrade/degrade.go +++ b/degrade/degrade.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package degrade 熔断限流插件 // 熔断限流插件 diff --git a/degrade/degrade_test.go b/degrade/degrade_test.go index 2883291..8127f69 100644 --- a/degrade/degrade_test.go +++ b/degrade/degrade_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package degrade diff --git a/degrade/go.sum b/degrade/go.sum index c21ff49..ecb6277 100644 --- a/degrade/go.sum +++ b/degrade/go.sum @@ -130,7 +130,7 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= trpc.group/trpc-go/tnet v0.0.0-20230810071536-9d05338021cf h1:Qo0p6ZJV60Qd5XajiIDidVgx1NDM9UHL7DzDKc2gqns= trpc.group/trpc-go/tnet v0.0.0-20230810071536-9d05338021cf/go.mod h1:s/webUFYWEFBHErKyFmj7LYC7XfC2LTLCcwfSnJ04M0= -trpc.group/trpc-go/trpc-go v0.0.0-20230919115157-95737ac0b3e8 h1:/jrNYARZOITHDsjgijDrth8AyTXnz37ggqahEYxirCk= +trpc.group/trpc-go/trpc-go v0.0.0-20230919115157-95737ac0b3e8 h1:GuA6LnlVHK6l9vDqMN53xB4DS9EgUvt1Nu8GuxRcA5c= trpc.group/trpc-go/trpc-go v0.0.0-20230919115157-95737ac0b3e8/go.mod h1:ve2YyZleGVbnKr0RLUJcu35dXw2zZmsi3RdKVPgL4+4= trpc.group/trpc/trpc-protocol/pb/go/trpc v0.0.0-20230803031059-de4168eb5952 h1:AhjP72IKa1YKnSIayk1X5xSzKrem0EanjZ7oMc2HYOw= trpc.group/trpc/trpc-protocol/pb/go/trpc v0.0.0-20230803031059-de4168eb5952/go.mod h1:K+a1K/Gnlcg9BFHWx30vLBIEDhxODhl25gi1JjA54CQ= diff --git a/degrade/internal/cgroup/cpu.go b/degrade/internal/cgroup/cpu.go index 767752b..9d53f8f 100644 --- a/degrade/internal/cgroup/cpu.go +++ b/degrade/internal/cgroup/cpu.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package cgroup diff --git a/degrade/internal/cgroup/cpu_test.go b/degrade/internal/cgroup/cpu_test.go index 5f2fcda..9c609e4 100644 --- a/degrade/internal/cgroup/cpu_test.go +++ b/degrade/internal/cgroup/cpu_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package cgroup diff --git a/degrade/internal/cgroup/memory.go b/degrade/internal/cgroup/memory.go index 195c152..dfc833d 100644 --- a/degrade/internal/cgroup/memory.go +++ b/degrade/internal/cgroup/memory.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package cgroup diff --git a/degrade/internal/cgroup/memory_test.go b/degrade/internal/cgroup/memory_test.go index ca2bfdd..297efc1 100644 --- a/degrade/internal/cgroup/memory_test.go +++ b/degrade/internal/cgroup/memory_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package cgroup diff --git a/degrade/internal/cgroup/utils.go b/degrade/internal/cgroup/utils.go index b66079f..4ab04a1 100644 --- a/degrade/internal/cgroup/utils.go +++ b/degrade/internal/cgroup/utils.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package cgroup diff --git a/degrade/internal/cgroup/utils_test.go b/degrade/internal/cgroup/utils_test.go index d0c5b98..7283cb7 100644 --- a/degrade/internal/cgroup/utils_test.go +++ b/degrade/internal/cgroup/utils_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package cgroup diff --git a/degrade/stat.go b/degrade/stat.go index 2126a8d..88d6283 100644 --- a/degrade/stat.go +++ b/degrade/stat.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package degrade diff --git a/degrade/stat_test.go b/degrade/stat_test.go index 7544c30..4ed011a 100644 --- a/degrade/stat_test.go +++ b/degrade/stat_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package degrade diff --git a/filterextensions/cfg.go b/filterextensions/cfg.go index 6259be0..78c5ba3 100644 --- a/filterextensions/cfg.go +++ b/filterextensions/cfg.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package filterextensions diff --git a/filterextensions/plugin.go b/filterextensions/plugin.go index efb7dd6..d8bf0b5 100644 --- a/filterextensions/plugin.go +++ b/filterextensions/plugin.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package filterextensions 是对 tRPC-Go yaml 配置的一个拓展。它允许用户定义 method 粒度的 filter。 package filterextensions diff --git a/filterextensions/plugin_test.go b/filterextensions/plugin_test.go index 18ef4b0..cd11488 100644 --- a/filterextensions/plugin_test.go +++ b/filterextensions/plugin_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package filterextensions_test diff --git a/hystrix/hystrix.go b/hystrix/hystrix.go index 5b6fec1..86e5ac8 100644 --- a/hystrix/hystrix.go +++ b/hystrix/hystrix.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package hystrix is server fuse downgrade protection filter. package hystrix diff --git a/hystrix/hystrix_test.go b/hystrix/hystrix_test.go index fa5f6a6..35ad5ff 100644 --- a/hystrix/hystrix_test.go +++ b/hystrix/hystrix_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package hystrix diff --git a/jwt/jwt.go b/jwt/jwt.go index 2f237dc..d2fbe97 100644 --- a/jwt/jwt.go +++ b/jwt/jwt.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package jwt 身份认证 package jwt diff --git a/jwt/jwt_factory.go b/jwt/jwt_factory.go index f82d646..24412c9 100644 --- a/jwt/jwt_factory.go +++ b/jwt/jwt_factory.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package jwt diff --git a/jwt/jwt_factory_test.go b/jwt/jwt_factory_test.go index 55828a7..5b4aeec 100644 --- a/jwt/jwt_factory_test.go +++ b/jwt/jwt_factory_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package jwt diff --git a/jwt/jwt_test.go b/jwt/jwt_test.go index 3b69ec1..6a5c795 100644 --- a/jwt/jwt_test.go +++ b/jwt/jwt_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package jwt diff --git a/jwt/signer.go b/jwt/signer.go index 50b66b1..9107037 100644 --- a/jwt/signer.go +++ b/jwt/signer.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package jwt diff --git a/jwt/signer_test.go b/jwt/signer_test.go index c4af191..e6dc662 100644 --- a/jwt/signer_test.go +++ b/jwt/signer_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package jwt diff --git a/masking/deep.go b/masking/deep.go index 604cd52..ad9f8c2 100644 --- a/masking/deep.go +++ b/masking/deep.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package masking 敏感信息脱敏拦截器 package masking diff --git a/masking/masking.go b/masking/masking.go index 46a0210..47cee6c 100644 --- a/masking/masking.go +++ b/masking/masking.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package masking 敏感信息脱敏拦截器 package masking diff --git a/masking/masking_factory.go b/masking/masking_factory.go index bda2fc6..71b49dc 100644 --- a/masking/masking_factory.go +++ b/masking/masking_factory.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package masking 敏感信息脱敏拦截器 package masking diff --git a/masking/masking_factory_test.go b/masking/masking_factory_test.go index 72f1967..044e189 100644 --- a/masking/masking_factory_test.go +++ b/masking/masking_factory_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package masking diff --git a/masking/masking_test.go b/masking/masking_test.go index 4b8d2a7..e832e9c 100644 --- a/masking/masking_test.go +++ b/masking/masking_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package masking diff --git a/mock/mock.go b/mock/mock.go index e848dcb..1dcea15 100644 --- a/mock/mock.go +++ b/mock/mock.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package mock implements interface mock calls through interceptors. package mock diff --git a/mock/mock_factory.go b/mock/mock_factory.go index feae1ee..d17cc3d 100644 --- a/mock/mock_factory.go +++ b/mock/mock_factory.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package mock diff --git a/mock/mock_test.go b/mock/mock_test.go index 59249cd..46e5bc3 100644 --- a/mock/mock_test.go +++ b/mock/mock_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package mock diff --git a/recovery/recovery.go b/recovery/recovery.go index 09b5e05..f361d76 100644 --- a/recovery/recovery.go +++ b/recovery/recovery.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package recovery is a tRPC filter used to recover the server side from a panic. package recovery diff --git a/recovery/recovery_test.go b/recovery/recovery_test.go index 8e14ff2..cd75b58 100644 --- a/recovery/recovery_test.go +++ b/recovery/recovery_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package recovery diff --git a/referer/referer.go b/referer/referer.go index 3a12feb..bc49d57 100644 --- a/referer/referer.go +++ b/referer/referer.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package referer 安全验证 package referer diff --git a/referer/referer_factory.go b/referer/referer_factory.go index 665dd39..547d37d 100644 --- a/referer/referer_factory.go +++ b/referer/referer_factory.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package referer diff --git a/referer/referer_factory_test.go b/referer/referer_factory_test.go index c5469ae..0741ea3 100644 --- a/referer/referer_factory_test.go +++ b/referer/referer_factory_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package referer diff --git a/referer/referer_test.go b/referer/referer_test.go index 4ebf97f..a0ec1c2 100644 --- a/referer/referer_test.go +++ b/referer/referer_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package referer diff --git a/slime/cfg.go b/slime/cfg.go index b4cc976..0e77e1e 100644 --- a/slime/cfg.go +++ b/slime/cfg.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package slime diff --git a/slime/client_retries_internal_test.go b/slime/client_retries_internal_test.go index fe8eb0d..87ccd16 100644 --- a/slime/client_retries_internal_test.go +++ b/slime/client_retries_internal_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package slime @@ -16,9 +23,6 @@ import ( "time" "github.com/stretchr/testify/require" - "gopkg.in/yaml.v2" - "trpc.group/trpc-go/trpc-go" - "trpc.group/trpc-go/trpc-filter/slime/hedging" "trpc.group/trpc-go/trpc-filter/slime/retry" "trpc.group/trpc-go/trpc-filter/slime/throttle" diff --git a/slime/cpmsg/copy_msg.go b/slime/cpmsg/copy_msg.go index cceb3d1..8da0c2c 100644 --- a/slime/cpmsg/copy_msg.go +++ b/slime/cpmsg/copy_msg.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package cpmsg diff --git a/slime/cpmsg/copy_msg_test.go b/slime/cpmsg/copy_msg_test.go index 9ab50a4..0560478 100644 --- a/slime/cpmsg/copy_msg_test.go +++ b/slime/cpmsg/copy_msg_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package cpmsg_test diff --git a/slime/filter.go b/slime/filter.go index 7250d45..4e4e812 100644 --- a/slime/filter.go +++ b/slime/filter.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package slime implement retry/hedging plugin. // diff --git a/slime/hedging/hedging.go b/slime/hedging/hedging.go index 21cfe21..f4743b6 100644 --- a/slime/hedging/hedging.go +++ b/slime/hedging/hedging.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package hedging defines hedging policy. package hedging diff --git a/slime/hedging/hedging_internal_test.go b/slime/hedging/hedging_internal_test.go index 3c18a29..0eb8a31 100644 --- a/slime/hedging/hedging_internal_test.go +++ b/slime/hedging/hedging_internal_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package hedging diff --git a/slime/hedging/hedging_test.go b/slime/hedging/hedging_test.go index 654d3f2..2ea3e9f 100644 --- a/slime/hedging/hedging_test.go +++ b/slime/hedging/hedging_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package hedging_test @@ -17,7 +24,6 @@ import ( "time" prom "trpc.group/trpc-go/trpc-filter/slime/view/metrics/prometheus" - "trpc.group/trpc-go/trpc-go" "trpc.group/trpc-go/trpc-go/codec" "trpc.group/trpc-go/trpc-go/errs" "trpc.group/trpc-go/trpc-go/naming/bannednodes" diff --git a/slime/hedging/hedging_throttle_test.go b/slime/hedging/hedging_throttle_test.go index 983d2ef..6d7a9e9 100644 --- a/slime/hedging/hedging_throttle_test.go +++ b/slime/hedging/hedging_throttle_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package hedging_test diff --git a/slime/hedging/impl.go b/slime/hedging/impl.go index 7b71605..8dd2284 100644 --- a/slime/hedging/impl.go +++ b/slime/hedging/impl.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package hedging diff --git a/slime/hedging/throttled_hedging.go b/slime/hedging/throttled_hedging.go index b60ec8e..0395589 100644 --- a/slime/hedging/throttled_hedging.go +++ b/slime/hedging/throttled_hedging.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package hedging diff --git a/slime/manager.go b/slime/manager.go index cee6f46..8fa398c 100644 --- a/slime/manager.go +++ b/slime/manager.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package slime diff --git a/slime/once/once.go b/slime/once/once.go index cf72d5c..ebc5e04 100644 --- a/slime/once/once.go +++ b/slime/once/once.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package once defines the Once type which trivially wraps filter.ClientHandleFunc. package once diff --git a/slime/once/once_test.go b/slime/once/once_test.go index 9c4b3fa..08c59ce 100644 --- a/slime/once/once_test.go +++ b/slime/once/once_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package once_test diff --git a/slime/opts.go b/slime/opts.go index 0c83a1b..a1c2fee 100644 --- a/slime/opts.go +++ b/slime/opts.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package slime diff --git a/slime/proto_naming_mismatch_test.go b/slime/proto_naming_mismatch_test.go index 90cecac..c21fb3e 100644 --- a/slime/proto_naming_mismatch_test.go +++ b/slime/proto_naming_mismatch_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package slime @@ -13,7 +20,6 @@ import ( "os" "testing" - "trpc.group/trpc-go/trpc-go" "trpc.group/trpc-go/trpc-go/filter" helloworld "trpc.group/trpc-go/trpc-go/testdata/trpc/helloworld" diff --git a/slime/pushback/pushback.go b/slime/pushback/pushback.go index 692ad9a..4146659 100644 --- a/slime/pushback/pushback.go +++ b/slime/pushback/pushback.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package pushback is a middleware that delays the response of a request. package pushback diff --git a/slime/retry/customized_backoff.go b/slime/retry/customized_backoff.go index 4e84ab8..db182b4 100644 --- a/slime/retry/customized_backoff.go +++ b/slime/retry/customized_backoff.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package retry diff --git a/slime/retry/expotential_backoff.go b/slime/retry/expotential_backoff.go index 1403b24..e615554 100644 --- a/slime/retry/expotential_backoff.go +++ b/slime/retry/expotential_backoff.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package retry diff --git a/slime/retry/impl.go b/slime/retry/impl.go index 8fc0d12..a3d94d9 100644 --- a/slime/retry/impl.go +++ b/slime/retry/impl.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package retry diff --git a/slime/retry/linear_backoff.go b/slime/retry/linear_backoff.go index 882d408..285cb16 100644 --- a/slime/retry/linear_backoff.go +++ b/slime/retry/linear_backoff.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package retry diff --git a/slime/retry/retry.go b/slime/retry/retry.go index 8e56428..f260b59 100644 --- a/slime/retry/retry.go +++ b/slime/retry/retry.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package retry defines the retry policy in a narrow sense. package retry diff --git a/slime/retry/retry_internal_test.go b/slime/retry/retry_internal_test.go index daeb513..fa9d1f4 100644 --- a/slime/retry/retry_internal_test.go +++ b/slime/retry/retry_internal_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package retry diff --git a/slime/retry/retry_test.go b/slime/retry/retry_test.go index be5f84b..f6a7f54 100644 --- a/slime/retry/retry_test.go +++ b/slime/retry/retry_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package retry_test @@ -17,7 +24,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/atomic" - "trpc.group/trpc-go/trpc-go" "trpc.group/trpc-go/trpc-go/codec" "trpc.group/trpc-go/trpc-go/errs" "trpc.group/trpc-go/trpc-go/naming/bannednodes" diff --git a/slime/retry/retry_throttle_test.go b/slime/retry/retry_throttle_test.go index fb710d5..eb1b484 100644 --- a/slime/retry/retry_throttle_test.go +++ b/slime/retry/retry_throttle_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package retry_test diff --git a/slime/retry/throttled_retry.go b/slime/retry/throttled_retry.go index 576ea39..96e9b98 100644 --- a/slime/retry/throttled_retry.go +++ b/slime/retry/throttled_retry.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package retry diff --git a/slime/special_codec_test/http/hedging_test.go b/slime/special_codec_test/http/hedging_test.go index 647c3df..0d6cc94 100644 --- a/slime/special_codec_test/http/hedging_test.go +++ b/slime/special_codec_test/http/hedging_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package http_test diff --git a/slime/special_codec_test/http/http_test.go b/slime/special_codec_test/http/http_test.go index 87b2c50..686e76a 100644 --- a/slime/special_codec_test/http/http_test.go +++ b/slime/special_codec_test/http/http_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package http_test @@ -19,7 +26,6 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "trpc.group/trpc-go/trpc-go" "trpc.group/trpc-go/trpc-go/client" "trpc.group/trpc-go/trpc-go/codec" "trpc.group/trpc-go/trpc-go/filter" diff --git a/slime/special_codec_test/http/retry_test.go b/slime/special_codec_test/http/retry_test.go index c593e4f..f86542b 100644 --- a/slime/special_codec_test/http/retry_test.go +++ b/slime/special_codec_test/http/retry_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package http_test diff --git a/slime/throttle/throttle_none.go b/slime/throttle/throttle_none.go index d95feb7..38a4c11 100644 --- a/slime/throttle/throttle_none.go +++ b/slime/throttle/throttle_none.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package throttle diff --git a/slime/throttle/throttler.go b/slime/throttle/throttler.go index d2da5cf..490a9be 100644 --- a/slime/throttle/throttler.go +++ b/slime/throttle/throttler.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package throttle diff --git a/slime/throttle/token_bucket.go b/slime/throttle/token_bucket.go index eb3b09e..a1b29a5 100644 --- a/slime/throttle/token_bucket.go +++ b/slime/throttle/token_bucket.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package throttle implement the throttle for retry/hedging request. package throttle diff --git a/slime/throttle/token_bucket_internal_test.go b/slime/throttle/token_bucket_internal_test.go index 7b1f9b2..2fe987e 100644 --- a/slime/throttle/token_bucket_internal_test.go +++ b/slime/throttle/token_bucket_internal_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package throttle diff --git a/slime/view/log/log.go b/slime/view/log/log.go index 5c5e96d..98e3c96 100644 --- a/slime/view/log/log.go +++ b/slime/view/log/log.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package log provides log utils used by retry/hedging. package log diff --git a/slime/view/log/log_test.go b/slime/view/log/log_test.go index b8793d2..08b45d8 100644 --- a/slime/view/log/log_test.go +++ b/slime/view/log/log_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package log_test diff --git a/slime/view/log/noop.go b/slime/view/log/noop.go index af50bc2..beacbdb 100644 --- a/slime/view/log/noop.go +++ b/slime/view/log/noop.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package log diff --git a/slime/view/metrics/noop.go b/slime/view/metrics/noop.go index cd0d104..3ee168c 100644 --- a/slime/view/metrics/noop.go +++ b/slime/view/metrics/noop.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package metrics diff --git a/slime/view/metrics/prometheus/prom.go b/slime/view/metrics/prometheus/prom.go index 81f4d18..df76ba3 100644 --- a/slime/view/metrics/prometheus/prom.go +++ b/slime/view/metrics/prometheus/prom.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package prom is a prometheus reporter. package prom diff --git a/slime/view/metrics/prometheus/prom_test.go b/slime/view/metrics/prometheus/prom_test.go index 3bdb205..5e74a0c 100644 --- a/slime/view/metrics/prometheus/prom_test.go +++ b/slime/view/metrics/prometheus/prom_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package prom_test diff --git a/slime/view/metrics/report.go b/slime/view/metrics/report.go index fb20766..ec3fa64 100644 --- a/slime/view/metrics/report.go +++ b/slime/view/metrics/report.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package metrics diff --git a/slime/view/metrics/report_test.go b/slime/view/metrics/report_test.go index 37d9267..1b9e22c 100644 --- a/slime/view/metrics/report_test.go +++ b/slime/view/metrics/report_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package metrics_test diff --git a/slime/view/stat.go b/slime/view/stat.go index c8a12dd..8711d34 100644 --- a/slime/view/stat.go +++ b/slime/view/stat.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package view defines common interfaces about visualization of retry/hedging. package view diff --git a/transinfo-blocker/factory.go b/transinfo-blocker/factory.go index 8341cc8..8abbf3a 100644 --- a/transinfo-blocker/factory.go +++ b/transinfo-blocker/factory.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package blocker 用于屏蔽调用下游的字段,避免登录态及其他敏感信息泄露问题 // @Title factory.go diff --git a/transinfo-blocker/factory_test.go b/transinfo-blocker/factory_test.go index 38fe859..e2df4e3 100644 --- a/transinfo-blocker/factory_test.go +++ b/transinfo-blocker/factory_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // @Title factory_test.go // @Description 测试解析配置正确性,以及生成配置结构体正确性 diff --git a/transinfo-blocker/whitelist.go b/transinfo-blocker/whitelist.go index 997d66f..68e29db 100644 --- a/transinfo-blocker/whitelist.go +++ b/transinfo-blocker/whitelist.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package blocker 用于屏蔽调用下游的字段,避免登录态及其他敏感信息泄露问题 // @Title whitelist.go diff --git a/transinfo-blocker/whitelist_test.go b/transinfo-blocker/whitelist_test.go index cb173ad..c6efd28 100644 --- a/transinfo-blocker/whitelist_test.go +++ b/transinfo-blocker/whitelist_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // @Title whitelist_test.go // @Description 测试client-filter生效情况 diff --git a/tvar/export.go b/tvar/export.go index f906e34..63b0d48 100644 --- a/tvar/export.go +++ b/tvar/export.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package tvar diff --git a/tvar/export_test.go b/tvar/export_test.go index f8b26e2..66f228c 100644 --- a/tvar/export_test.go +++ b/tvar/export_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package tvar diff --git a/tvar/filter.go b/tvar/filter.go index 5c5eea5..f756ee4 100644 --- a/tvar/filter.go +++ b/tvar/filter.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package tvar 对rpc请求量、成功量、失败量、耗时分布、qps、百分位数进行统计上报 package tvar diff --git a/tvar/filter_test.go b/tvar/filter_test.go index 00fe3da..b4cf807 100644 --- a/tvar/filter_test.go +++ b/tvar/filter_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package tvar 对rpc请求量、成功量、失败量、耗时分布、qps、百分位数进行统计上报 package tvar diff --git a/tvar/latency.go b/tvar/latency.go index 6773985..6e60bc3 100644 --- a/tvar/latency.go +++ b/tvar/latency.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package tvar diff --git a/tvar/meterprovider/config.go b/tvar/meterprovider/config.go index cd09ecc..66a987c 100644 --- a/tvar/meterprovider/config.go +++ b/tvar/meterprovider/config.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package meterprovider diff --git a/tvar/meterprovider/exporter.go b/tvar/meterprovider/exporter.go index 2853921..7e55ffa 100644 --- a/tvar/meterprovider/exporter.go +++ b/tvar/meterprovider/exporter.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package meterprovider diff --git a/tvar/meterprovider/exporter_test.go b/tvar/meterprovider/exporter_test.go index 382a820..caa1784 100644 --- a/tvar/meterprovider/exporter_test.go +++ b/tvar/meterprovider/exporter_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package meterprovider diff --git a/tvar/metrics.go b/tvar/metrics.go index 35e07dd..0a3c124 100644 --- a/tvar/metrics.go +++ b/tvar/metrics.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package tvar diff --git a/tvar/observer_linux.go b/tvar/observer_linux.go index b4521a9..e8924a4 100644 --- a/tvar/observer_linux.go +++ b/tvar/observer_linux.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// //go:build linux // +build linux diff --git a/tvar/observer_linux_test.go b/tvar/observer_linux_test.go index 131ebb3..f7153dd 100644 --- a/tvar/observer_linux_test.go +++ b/tvar/observer_linux_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// //go:build linux // +build linux diff --git a/tvar/observer_noop.go b/tvar/observer_noop.go index 7bba2b8..7d101c5 100644 --- a/tvar/observer_noop.go +++ b/tvar/observer_noop.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// //go:build !linux // +build !linux diff --git a/tvar/plugin.go b/tvar/plugin.go index a48e99a..f896c4b 100644 --- a/tvar/plugin.go +++ b/tvar/plugin.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package tvar diff --git a/tvar/plugin_test.go b/tvar/plugin_test.go index 08fe7e6..f618942 100644 --- a/tvar/plugin_test.go +++ b/tvar/plugin_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package tvar diff --git a/tvar/slidingwindow/doc.go b/tvar/slidingwindow/doc.go index a4c572c..81aa4e8 100644 --- a/tvar/slidingwindow/doc.go +++ b/tvar/slidingwindow/doc.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package slidingwindow provides an implementation of Sliding Window Algorithm. // @@ -13,7 +20,9 @@ // internal sliding window will be as below: // // ``` -// Sliding Window +// +// Sliding Window +// // |-------------------------------------| // | Previous Window | Current Window | window size: 60s // |------------------|------------------| @@ -31,8 +40,10 @@ // // ``` // count = 86 * ((60-15)/60) + 12 -// = 86 * 0.75 + 12 -// = 76.5 events +// +// = 86 * 0.75 + 12 +// = 76.5 events +// // ``` // // In the example, count of requests is recorded in the slidingwindow. Actually we can see the request as an event, diff --git a/tvar/slidingwindow/slidingwindow.go b/tvar/slidingwindow/slidingwindow.go index 064e471..406f859 100644 --- a/tvar/slidingwindow/slidingwindow.go +++ b/tvar/slidingwindow/slidingwindow.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package slidingwindow diff --git a/tvar/slidingwindow/slidingwindow_test.go b/tvar/slidingwindow/slidingwindow_test.go index e79629f..c24e8fc 100644 --- a/tvar/slidingwindow/slidingwindow_test.go +++ b/tvar/slidingwindow/slidingwindow_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package slidingwindow diff --git a/tvar/slidingwindow/window.go b/tvar/slidingwindow/window.go index 39ac80b..645da51 100644 --- a/tvar/slidingwindow/window.go +++ b/tvar/slidingwindow/window.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package slidingwindow diff --git a/validation/validation.go b/validation/validation.go index 303e770..98a54bc 100644 --- a/validation/validation.go +++ b/validation/validation.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// // Package validation is the interceptor for parameter validation. package validation diff --git a/validation/validation_factory.go b/validation/validation_factory.go index d4c4cd3..75f0ee2 100644 --- a/validation/validation_factory.go +++ b/validation/validation_factory.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package validation diff --git a/validation/validation_factory_test.go b/validation/validation_factory_test.go index 665a208..7ea2561 100644 --- a/validation/validation_factory_test.go +++ b/validation/validation_factory_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package validation diff --git a/validation/validation_test.go b/validation/validation_test.go index 1f6f6d7..2699628 100644 --- a/validation/validation_test.go +++ b/validation/validation_test.go @@ -1,8 +1,15 @@ +// +// // Tencent is pleased to support the open source community by making tRPC available. -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. +// +// Copyright (C) 2023 THL A29 Limited, a Tencent company. +// All rights reserved. +// // If you have downloaded a copy of the tRPC source code from Tencent, // please note that tRPC source code is licensed under the Apache 2.0 License, // A copy of the Apache 2.0 License is included in this file. +// +// package validation