Closed SamYuan1990 closed 1 year ago
convert to draft now, as #79 is high priority
The files you are moving are already internal and not part of the public API. Is there a particular reason you want all internals under a top-level
internal
package rather than closer to the code that uses them?
From the naming as internal, I suppose we don't want to expose those packages. and I found those package appears at https://pkg.go.dev/github.com/hyperledger/fabric-admin-sdk@v0.0.0-20230128060135-ea99b189b606/pkg/internal/gateway ... wait should I move from internal package to package internal package? https://pkg.go.dev/github.com/hyperledger/fabric-admin-sdk#section-directories
in my point of view, a fix should be applied to avoid internal package appears in go doc. I will further refine this pr by go doc command.
I am not sure why that site is including internal packages or if there is anything we can do to stop that. Code appearing anywhere under a package named internal
is not accessible to code outside if the package that contains the internal package. By moving things up to a higher level internal package, their scope of visibility is actually being broadened.
I am not sure why that site is including internal packages or if there is anything we can do to stop that. Code appearing anywhere under a package named
internal
is not accessible to code outside if the package that contains the internal package. By moving things up to a higher level internal package, their scope of visibility is actually being broadened.
ok, then I will move all pkg/a/internal packages to internal package to keep same with fabric
Fabric also has core/ledger/internal
and common/metrics/internal
packages. Not everything is in a top-level internal
package.
close this PR for now.
adjust package structure, if those packages are internal, hence we don't want they are expose .... as https://pkg.go.dev/github.com/hyperledger/fabric-admin-sdk@v0.0.0-20230128060135-ea99b189b606/pkg/internal/gateway
and refactor for package tools, moving function for test usage only to test package.
Signed-off-by: Sam Yuan yy19902439@126.com