CasaOS/pkg/utils/udev_helper.go
link cee34ec1c2
0.3.5 (#451)
* initial completion of the sharing function

* Adjusting multi-partition disk mounts

* Add file sharing function

* update usb auto mount shell

* update samba config

* add umount disk function

* update change log

* update usb auto mount \

* update usb auto mount

* Update periodical.go
2022-08-15 11:37:21 +08:00

34 lines
863 B
Go

/*
* @Author: LinkLeong link@icewhale.org
* @Date: 2022-08-10 16:06:12
* @LastEditors: LinkLeong
* @LastEditTime: 2022-08-10 16:11:37
* @FilePath: /CasaOS/pkg/utils/udev_helper.go
* @Description:
* @Website: https://www.casaos.io
* Copyright (c) 2022 by icewhale, All Rights Reserved.
*/
package utils
// func getOptionnalMatcher() (matcher netlink.Matcher, err error) {
// if filePath == nil || *filePath == "" {
// return nil, nil
// }
// stream, err := ioutil.ReadFile(*filePath)
// if err != nil {
// return nil, err
// }
// if stream == nil {
// return nil, fmt.Errorf("Empty, no rules provided in \"%s\", err: %w", *filePath, err)
// }
// var rules netlink.RuleDefinitions
// if err := json.Unmarshal(stream, &rules); err != nil {
// return nil, fmt.Errorf("Wrong rule syntax, err: %w", err)
// }
// return &rules, nil
// }