-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c2884d
commit 0e046da
Showing
1 changed file
with
1 addition
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,11 @@ | ||
package test | ||
|
||
import ( | ||
"encoding/base64" | ||
"fmt" | ||
"strings" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
// used as a testing wrapper to just test fun stuff quickly. | ||
|
||
func TestFlow(t *testing.T) { | ||
// Decoding base64 string | ||
bodyString := "CiEyNTAwMDAwMC4wMDAwMDAwMDAwMDAwMDAwMDBhZXZtb3M=" | ||
decodedBody, err := base64.StdEncoding.DecodeString(bodyString) | ||
require.Nil(t, err) | ||
fmt.Println("Decoded body:", string(decodedBody)) // Output the decoded body | ||
resultString := strings.ReplaceAll(string(decodedBody), "!", "") | ||
fmt.Println("Result:", resultString) // Output the decoded body | ||
|
||
} |