code: func (s *KVStore) Open(ctx context.Context) error {
  	// Ensure the required directory structure exists.
  	if err := os.MkdirAll(filepath.Dir(s.path), 0700); err != nil {
  		return fmt.Errorf("unable to create directory %s: %v", s.path, err)
  	}
  
  	if _, err := os.Stat(s.path); err != nil && !os.IsNotExist(err) {
  		return err
  	}
  
  	// Open database file.
  	db, err := bolt.Open(s.path, 0600, &bolt.Options{Timeout: 1 * time.Second})
  	if err != nil {
  		return fmt.Errorf("unable to open boltdb file %v", err)
  	}
  	s.db = db
  
  	s.logger.Info("Resources opened", zap.String("path", s.path))
  	return nil
  }
docs: // Open creates boltDB file it doesn't exists and opens it otherwise.