From a970501d54a9291dc041c9e4e313d5ee135e733f Mon Sep 17 00:00:00 2001 From: HAYAMA_Kaoru Date: Sat, 3 May 2025 18:41:17 +0900 Subject: [PATCH] refactor: clarify argument descriptions in RunFile and RunString comments Rewrote the function comments for RunFile and RunString to improve clarity and stability under `go fmt`. The previous indentation-based formatting was not preserved by `go fmt`, so the description style was revised to use distinct bullet points for each argument. --- main.go | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/main.go b/main.go index 8f402ae..45e7aa7 100644 --- a/main.go +++ b/main.go @@ -8,10 +8,11 @@ import ( ) // RunFile loads and executes a Lisp script from the specified file. -// - fname: the path to the Lisp source file to be executed. -// - args: typically corresponds to os.Args[1:], where: -// - args[0] is the script file name (not used directly), -// - args[1:] are the arguments passed to the script. +// +// - fname: the path to the Lisp source file to be executed. +// - args: typically corresponds to os.Args[1:]. +// - args[0]: the script file name (not used directly). +// - args[1:]: arguments passed to the script. func RunFile(fname string, args []string) error { script, err := os.ReadFile(fname) if err != nil { @@ -20,11 +21,12 @@ func RunFile(fname string, args []string) error { return RunString(string(script), args) } -// RunString executes a Lisp script provided as a string. -// - script: the Lisp code to be executed. -// - args: typically corresponds to os.Args[1:], where: -// - args[0] is a pseudo script name, -// - args[1:] are the arguments passed to the script. +// RunString executes a Lisp script given directly as a string. +// +// - script: the Lisp source code to be executed (equivalent to the contents of a file). +// - args: typically corresponds to os.Args[1:]. +// - args[0]: the script file name (not used directly). +// - args[1:]: arguments passed to the script. func RunString(script string, args []string) error { term, err := NewTerm() if err != nil {