Skip to content

Refactoring: create new internal package #221

@adarsh0728

Description

@adarsh0728
  • Is the content of metadata.go same in all packages ?

If so, one option to share code is to create a new package internal/metadata/metadata.go (internal/ directory is special in Golang, only this package can import the packages under internal/). The re-export them:

//file: pkg/mapper/metadata.go
import "github.com/numaproj/numaflow-go/internal/metadata"

type SystemMetadata = metadata.SystemMetadata
var NewSystemMetadata = metadata.NewSystemMetadata

Originally posted by @BulkBeing in #208 (comment)

  • Also, to not expose internal implementations like shared pkg as public API

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions