github.com/qiniu/go-sdk/v7@v7.27.0/internal/api-generator/utils.go (about) 1 package main 2 3 import ( 4 "path/filepath" 5 "strings" 6 ) 7 8 func extractApiSpecName(name string) string { 9 baseName := filepath.Base(name) 10 if index := strings.Index(baseName, "."); index >= 0 { 11 baseName = baseName[:index] 12 } 13 return baseName 14 }