babygo icon indicating copy to clipboard operation
babygo copied to clipboard

Implement `gopackages` subcommand

Open DQNEO opened this issue 1 year ago • 0 comments

$ gopackages -mode types ./lib/mylib
Go package "github.com/DQNEO/babygo/lib/mylib":
	package mylib
	has complete exported type info
	file /Users/DQNEO/src/github.com/DQNEO/babygo/lib/mylib/mylib.go
	import "github.com/DQNEO/babygo/lib/mylib2"
	import "os"
	func InArray(x string, list []string) bool
	const Msg string
	func Readdirnames(dir string) ([]string, error)
	func SortStrings(ss []string)
	func Sum(a int, b int) int
	func Sum2(a int, b int) int
	type Type struct{Field int}
	method (*Type) Method() int

TODO

  • Implement babygo gopackages <pkg>
  • Ensure all packages output the same result
  • Add test in Makefile to check the results. (compare babygo 2gen with the official gopackages)

DQNEO avatar Jul 27 '23 07:07 DQNEO