From 173c3c068fb3f891750984cef7483d4862c835c5 Mon Sep 17 00:00:00 2001 From: Zherphy <1123678689@qq.com> Date: Thu, 12 Dec 2024 16:01:38 +0800 Subject: [PATCH] edit: edit server_test.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 多个const并列时组合到一个。若无逻辑关系按从短到长排列 --- server/server_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/server_test.go b/server/server_test.go index dc787fe..881afc3 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -36,9 +36,11 @@ var serverInfo = ServerInfo{ isAuthorized: auth.GiteeAuth(), } -const unexpectedPanic = "unexpected panic value or wantErr mismatch" -const expectedPanic = "expected panic but none occurred" -const batchUrlPath = "/owner/repo/objects/batch" +const ( + batchUrlPath = "/owner/repo/objects/batch" + expectedPanic = "expected panic but none occurred" + unexpectedPanic = "unexpected panic value or wantErr mismatch" +) func TestNew(t *testing.T) { type args struct {