aboutsummaryrefslogtreecommitdiff
path: root/example.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-02-16 01:35:08 +0700
committerShulhan <ms@kilabit.info>2024-02-16 01:43:53 +0700
commit3209221c94634a3e49bad6c90896919745be8e85 (patch)
treef70980d8b7c893cab04bf3a52ca086efc56542f8 /example.go
parent05837bccf9aadea42ad9a67947b1c0c7a5e7ac56 (diff)
downloadgorankusu-3209221c94634a3e49bad6c90896919745be8e85.tar.xz
target: changes Opts to non-pointer
Previously, we use pointer to indicated that the Target can be attacked or not. Since HTTPTarget now have AllowAttack, this options can be changes to non-pointer.
Diffstat (limited to 'example.go')
-rw-r--r--example.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/example.go b/example.go
index 73c97f3..60bed1c 100644
--- a/example.go
+++ b/example.go
@@ -209,7 +209,7 @@ func (ex *Example) registerTargetHTTP() (err error) {
Name: `Example HTTP`,
Hint: `This section provide an example of HTTP endpoints that can be tested and attacked.`,
BaseURL: fmt.Sprintf(`http://%s`, ex.Gorankusu.Env.ListenAddress),
- Opts: &AttackOptions{
+ Opts: AttackOptions{
Duration: 10 * time.Second,
RatePerSecond: 1,
},
@@ -412,7 +412,6 @@ func (ex *Example) registerTargetWebSocket() (err error) {
Name: `Example WebSocket`,
Hint: `This section provide an example of WebSocket endpoints that can be tested.`,
BaseURL: fmt.Sprintf(`ws://%s`, websocketAddress),
- Opts: &AttackOptions{},
Vars: KeyFormInput{
`WebSocketVar`: FormInput{
Label: `WebSocketVar`,