aboutsummaryrefslogtreecommitdiff
path: root/script_example_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-09-23 21:52:48 +0700
committerShulhan <ms@kilabit.info>2023-09-23 21:52:48 +0700
commitb91779462ac492d237ed89bd631ffa74aa8be03f (patch)
tree6e7730b534e73828ac70e2098554ef1ddc0549ed /script_example_test.go
parentd07b8aa2619b78dd22d093d23da890e8ceba26fb (diff)
downloadawwan-b91779462ac492d237ed89bd631ffa74aa8be03f.tar.xz
all: merge some functions into NewScript and ParseScript
Previously, we have NewScriptForLocal, NewScriptForRemote, ParseScriptForLocal, and ParseScriptForRemote. Since script for local and remote actually the same and since we remove applying environment variables at 858c26d3d940 on local, we can merge them into NewScript and ParseScript.
Diffstat (limited to 'script_example_test.go')
-rw-r--r--script_example_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/script_example_test.go b/script_example_test.go
index def544a..e0156af 100644
--- a/script_example_test.go
+++ b/script_example_test.go
@@ -8,7 +8,7 @@ import (
"log"
)
-func ExampleParseScriptForLocal() {
+func ExampleParseScript() {
var (
envContent = `
[section]
@@ -33,7 +33,7 @@ end;
log.Fatal(err)
}
- s, err = ParseScriptForLocal(ses, []byte(scriptContent))
+ s, err = ParseScript(ses, []byte(scriptContent))
if err != nil {
log.Fatal(err)
}