mirror of
https://github.com/opbnq-q/nto-cli.git
synced 2025-12-06 19:20:34 +07:00
service file name -> to lower case
This commit is contained in:
@@ -3,16 +3,16 @@ package generation
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GenerateService(structName, mkName string) {
|
func GenerateService(structName, mkName string) {
|
||||||
serviceFile, err := os.Create(mkName + "/service.ts")
|
serviceFile, err := os.Create(mkName + "/" + strings.ToLower(structName) + ".service.ts")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
defer serviceFile.Close()
|
defer serviceFile.Close()
|
||||||
_, err = serviceFile.WriteString(fmt.Sprintf(`
|
_, err = serviceFile.WriteString(fmt.Sprintf(`export class %sService {
|
||||||
export class %sService {
|
|
||||||
async read() {
|
async read() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user