From 75fcfdcc703c5d2081386c3a8dc4f0e881a8a273 Mon Sep 17 00:00:00 2001 From: acevest Date: Tue, 22 Sep 2020 23:40:07 +0800 Subject: [PATCH] cs time style --- tools/comm/cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/comm/cs b/tools/comm/cs index f9cb854..178ca8d 100755 --- a/tools/comm/cs +++ b/tools/comm/cs @@ -6,7 +6,9 @@ # Description: Create Source Code # ------------------------------------------------------------------------ use strict; -use POSIX qw(strftime); +use POSIX qw(strftime setlocale); + +setlocale(&POSIX::LC_ALL,'en_US.UTF-8'); my $filename = " File Name: "; my $author = " Author: Zhao Yanbai\n"; @@ -90,13 +92,18 @@ foreach my $file (@ARGV) { $f = "H_" . uc($f) . "__"; $as .= "\n#pragma once\n"; } elsif($index eq "go") { + $as .= "\n"; $as .= "package main\n"; + $as .= "\n"; $as .= "import (\n"; $as .= "\t\"fmt\"\n"; - $as .= ")\n\n"; + $as .= ")\n"; + $as .= "\n"; $as .= "func main() {\n"; - $as .= "\tdefer fmt.Println(\"Program Exited...\")\n\n"; + $as .= "\tdefer fmt.Println(\"Program Exited...\")\n"; + $as .= "\n"; $as .= "}"; + $as .= "\n"; $as = "" unless($create_main); } elsif($index eq "py") { } elsif($index eq "rb") { -- 2.44.0