Commit Graph

108 Commits

Author SHA1 Message Date
jswxstw
adc056f547
feat: support running commands via non-command line arguments (#3290) 2024-01-30 20:14:13 +08:00
John Guo
4b8eaac73f
fix issue #3232 (#3247) 2024-01-15 20:33:30 +08:00
John Guo
ea5d52cb2f
fix issue #3147 (#3161) 2023-11-22 21:05:39 +08:00
Hunk Zhu
0b407c5e6d
fix "gf gen pb" api and ctrl not working well. (#3076) 2023-11-08 21:26:51 +08:00
Lonely
ea6a773d60
fix: marked gcode.CodeInternalPanic for panic (#2860) 2023-08-14 09:53:13 +08:00
John Guo
da8297d770
improve AddObject to support Command/*Command parameter for package gcmd (#2587) 2023-04-18 10:09:07 +08:00
黄骞
e254b4f3c0
add ut cases for package gcache (#2341)
* gTcp Example Function:
1.NewConn 2.NewConnTLS 3.NewConnKeyCrt

* gTcp Example Function:
1.Send

* add example function ExampleConn_Recv and ExampleConn_RecvWithTimeout

* add example function
1. ExampleConn_SendWithTimeout
2. ExampleConn_RecvLine
3. ExampleConn_RecvTill

* add example function
1. ExampleConn_SendRecv
2. ExampleConn_SendRecvWithTimeout
3. ExampleConn_SetDeadline
4. ExampleConn_SetReceiveBufferWait

* add gtcp test function
1. Test_Package_Option_HeadSize4
2. Test_Package_Option_Error

* add gtcp example function
1. ExampleGetFreePorts
2. ExampleSend
3. ExampleSendRecv
4. ExampleSendWithTimeout
5. ExampleSendRecvWithTimeout
6. ExampleMustGetFreePort

* add gtcp example function
1. ExampleSendPkg
2. ExampleSendRecvPkg
3. ExampleSendPkgWithTimeout
4. ExampleSendRecvPkgWithTimeout

* add gtcp test function
1. Test_Pool_Send
2. Test_Pool_Recv
3. Test_Pool_RecvLine
4. Test_Pool_RecvTill
5. Test_Pool_RecvWithTimeout
6. Test_Pool_SendWithTimeout
7. Test_Pool_SendRecvWithTimeout

* fix

* add gtcp example function
1. ExampleGetServer
2. ExampleSetAddress
3. ExampleSetHandler
4. ExampleRun_NilHandle

* exec CI

* exec CI

* exec CI

* modify test server address

* modify and exec CI

* modify and exec CI

* modify and exec CI

* modify and exec CI

* modify and exec CI

* modify and exec CI

* add example funcion ExampleConn_Recv_Once and fix

* fix

* add some error case in example function

* add some error case in example function

* 1.add example function ExampleNewServerKeyCrt
2.add function SendRecvPkgWithTimeout unit test

* add function Test_Server_NewServerKeyCrt unit test

* revert

* add function Test_Package_Timeout, Test_Package_Option_HeadSize3, Test_Conn_RecvPkgError unit test

* fix

* add example function
1.ExampleClient_Clone
2.ExampleLoadKeyCrt

* add example function
1.ExampleNewNetConnKeyCrt

* fix

* add example function
1.ExampleClient_DeleteBytes
2.ExampleClient_HeadBytes
3.ExampleClient_PatchBytes
4.ExampleClient_ConnectBytes
5.ExampleClient_OptionsBytes
6.ExampleClient_TraceBytes
7.ExampleClient_PutBytes

* add example function
1.ExampleClient_Prefix
2.ExampleClient_Retry
3.ExampleClient_RedirectLimit

* add example function
1.ExampleClient_SetBrowserMode
2.ExampleClient_SetHeader
3.ExampleClient_SetRedirectLimit

* add example function
1.ExampleClient_SetTLSKeyCrt
2.ExampleClient_SetTLSConfig
modify example funcion
1.ExampleClient_SetProxy
2.ExampleClient_Proxy

* add example function
1.ExampleClient_PutContent
2.ExampleClient_DeleteContent
3.ExampleClient_HeadContent
4.ExampleClient_PatchContent
5.ExampleClient_ConnectContent
6.ExampleClient_OptionsContent
7.ExampleClient_TraceContent
8.ExampleClient_RequestContent

* add example function
1.ExampleClient_RawRequest

* add unit function
1.TestGetFreePorts
2.TestNewConn
3.TestNewConnTLS
4.TestNewConnKeyCrt
5.TestConn_SendWithTimeout

* add unit function
1.TestConn_Send
2.TestConn_SendRecv
3.TestConn_SendRecvWithTimeout

* modify

* modify

* add example function
1.TestConn_SetReceiveBufferWait
2.TestNewNetConnKeyCrt
3.TestSend

* add example function
1.TestSendRecv
2.TestSendWithTimeout

* add unit function
1.TestMustGetFreePort
2.TestSendRecvWithTimeout
3.TestSendPkg

* add client recevied server's response content assert

* modify

* modify

* add example function
1.TestSendRecvPkg
2.TestSendPkgWithTimeout
3.TestSendRecvPkgWithTimeout

* add GetAddress() function
add unit funciton
1.TestNewServer
2.TestGetServer
3.TestServer_SetAddress
4.TestServer_SetHandler
5.TestServer_Run

* modify

* modify

* add unit funciton
1.TestLoadKeyCrt

* modify

* delete function fromHex

* add gclient dump unit test

* add example function
1.ExampleClient_Put
2.ExampleClient_Delete
3.ExampleClient_Head
4.ExampleClient_Patch
5.ExampleClient_Connect
6.ExampleClient_Options
7.ExampleClient_Trace

* add example function
1.TestClient_DoRequest

* add example function
1.ExampleClient_PutVar
2.ExampleClient_DeleteVar
3.ExampleClient_HeadVar
4.ExampleClient_PatchVar
5.ExampleClient_ConnectVar
6.ExampleClient_OptionsVar
7.ExampleClient_TraceVar

* modify

* modify

* add CustomProvider function

* modify

* add unit funciton
1.Test_NewConn
2.Test_GetFreePorts

* add unit funciton
1.Test_Server

* garray_normal_any code converage

* garray_normal_int code converage

* garray_normal_str code converage

* garray_sorted_any code converage

* garray_sorted_int code converage

* garray_sorted_str code converage

* glist code converage

* gmap, gmap_hash_any_any_map code converage

* gmap_hash_int_any_map code converage

* gmap_hash_int_any_map code converage

* gmap_hash_int_int_map code converage

* gmap_hash_int_str_map code converage

* gmap_hash_str_any_map code converage

* gmap_hash_str_int_map code converage

* gmap_hash_str_str_map code converage

* gmap_list_map code converage

* gmap_list_map code converage

* revert gf.yml

* add gtest unit test function

* add ut cases for package gcache

* add ut cases for package gcache

* add ut cases for package gcache

* add ut cases for package gcache

* add ut cases for package gcache

* modify

Co-authored-by: John Guo <john@johng.cn>
2022-12-20 14:49:31 +08:00
John Guo
73dc8c9c4b
fix cache issue in Count/Value functions for gdb.Model (#2300)
* add Tag* functions to retreive most commonly used tag value from struct field for package gstructs; use description tag as default value if brief is empty for gcmd.Argument

* fix cache issue in Count/Value functions for gdb.Model

* add more ut case for package gdb

* version updates
2022-11-16 10:04:49 +08:00
John Guo
576f1a798c
add Tag* functions to retreive most commonly used tag value from struct field for package gstructs; use description tag as default value if brief is empty for gcmd.Argument (#2299) 2022-11-15 17:05:34 +08:00
John Guo
8c71d579b5
add command fix and up (#2280) 2022-11-10 19:56:12 +08:00
John Guo
ee58255418
move common used tag from packages to package gtag for maintainability (#2256)
* move common used tag from packages to package gtag for maintainability

* move common used tag from packages to package gtag for maintainability

Co-authored-by: houseme <housemecn@gmail.com>
2022-11-07 17:51:37 +08:00
houseme
1793bf0863
add golangci feature to guarantee codes quality (#2229) 2022-11-01 20:12:21 +08:00
ivothgle
33fdde6afd
opt: parameter verification of optimized handler methods (#2224) 2022-10-20 19:36:01 +08:00
John Guo
b7794a8783
use method name as its command name if no name defined in Meta of input struct for package gcmd (#2019) 2022-07-19 16:30:00 +08:00
John Guo
1e8237446e add tracing logging content if trace id is available in context for package gcmd 2022-06-17 17:42:49 +08:00
John Guo
b2b2044786 add tracing logging content if trace id is available in context for package gcmd 2022-06-17 17:41:10 +08:00
John Guo
c2e742335b add otel support for package gcmd 2022-06-17 15:16:35 +08:00
John Guo
a2905977ec improve package gcmd, adding CaseSensitive option for options parsing, default is CaseInsensitive 2022-05-13 15:24:10 +08:00
John Guo
b63e01adf6 add internal log content for package gcmd 2022-05-13 14:48:22 +08:00
John Guo
d8d9996464 fix issue #1662 2022-03-11 10:24:42 +08:00
John Guo
546b6b1724 t.Assert(err, nil) -> t.AssertNil(err) 2022-03-10 11:36:40 +08:00
huangqian
f08c18594b Merge branch 'master' of https://github.com/gogf/gf 2022-03-07 22:35:39 +08:00
John Guo
3fcd6ef877 fix issue orphan value parsing for sructured arguments of command for package gcmd 2022-03-03 21:03:42 +08:00
huangqian
0516159ae3 Improving gcmd Code Coverage 2022-02-28 21:11:53 +08:00
huangqian
8acffd1186 Improving gcmd Code Coverage 2022-02-27 21:00:23 +08:00
huangqian
814450fd17 gcmd example 2022-02-27 13:22:26 +08:00
John Guo
43f1354e79 fix configuration support for package gcmd 2022-01-24 10:32:19 +08:00
John Guo
7401fb09c9 add examples for package gcmd 2022-01-19 23:35:23 +08:00
John Guo
bb37e5ac88 remove Handler feature for gcmd.Parser 2022-01-19 21:07:48 +08:00
John Guo
69935f3d1c remove ContainsOpt from package gcmd 2022-01-19 20:25:04 +08:00
John Guo
3bbbe1db9c change pointer receiver that implements interface MarshalJSON to struct receiver for all packages 2022-01-19 16:55:57 +08:00
John Guo
9486f6e7e9 improve package gcmd/ghttp 2022-01-12 19:39:38 +08:00
John Guo
ee25d696eb improve package gcmd 2022-01-01 20:20:49 +08:00
John Guo
c17530a6db improve command not found error for package gcmd 2022-01-01 19:57:43 +08:00
John Guo
c1586a3b81 improve package gcmd 2022-01-01 00:58:10 +08:00
John Guo
09f9d1cb7a improve package gcmd 2022-01-01 00:18:50 +08:00
John Guo
63d384b676 help content update for pakcga egcmd 2021-12-18 23:27:41 +08:00
John Guo
3658faafae improve help content printing for package gcmd 2021-12-17 15:47:48 +08:00
John Guo
f4e8eff813 improve help content printing for package gcmd 2021-12-16 12:45:00 +08:00
John Guo
4c7e409e61 improve argument/option printing content for package gcmd 2021-12-14 22:34:06 +08:00
John Guo
7d84ab761b improve package gcmd for help content printing 2021-12-13 20:30:56 +08:00
John Guo
80daed6bdf add repeated checks for command name, argument name and short name for package gcmd 2021-12-13 20:18:13 +08:00
John Guo
1015fb5338 improve package gcmd 2021-12-13 19:59:41 +08:00
John Guo
a1fb5f18dc improve package gcmd 2021-12-11 01:11:40 +08:00
John Guo
780d06b19e improve package gcmd 2021-12-11 00:57:26 +08:00
John Guo
3a20883a81 improve package gcmd 2021-12-11 00:12:58 +08:00
John Guo
f0c25d8476 improve package gcmd/gtag 2021-12-10 23:58:10 +08:00
John Guo
f25f8e8033 add argument feature for package gcmd 2021-12-09 23:49:39 +08:00
John Guo
01930c9899 improve package gcmd 2021-12-08 19:50:28 +08:00
John Guo
4f0b45aeac improve package gcmd 2021-12-08 19:21:25 +08:00