// NewDiskRepository returns a new LinkRepository that stores data in
// disk using Badger DB.
NewDiskRepository returns a new LinkRepository that stores data in
disk using Badger DB.
// NewDiskRepository returns a new LinkRepository that stores data in // disk using Badger DB .
func NewDiskRepository(path string) (LinkRepository, error) {
	db, err := badger.Open(badger.DefaultOptions(path))
	if err != nil {
		return nil, err
	}
	return &badgerRepo{db}, nil
}
func NewDiskRepository ( path string ) ( LinkRepository , error ) { db , err := badger . Open ( badger . DefaultOptions ( path ) ) if err != nil { return nil , err } return & badgerRepo { db } , nil }
NewDiskRepository returns a new LinkRepository that stores data in
disk using Badger DB.
NewDiskRepository returns a new LinkRepository that stores data in disk using Badger DB .