allow datetime string as --timestamp parameter

This commit is contained in:
Philipp Wolfer 2023-12-10 16:15:09 +01:00
parent c6be6c558f
commit be1cfdac9e
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
4 changed files with 25 additions and 13 deletions

View file

@ -17,8 +17,6 @@ Scotty. If not, see <https://www.gnu.org/licenses/>.
package cmd
import (
"math"
"github.com/spf13/cobra"
"go.uploadedlobster.com/scotty/internal/backends"
"go.uploadedlobster.com/scotty/internal/cli"
@ -60,5 +58,5 @@ func init() {
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// beamLovesCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
beamLovesCmd.Flags().Int64P("timestamp", "t", math.MinInt64, "Only import loves newer then given Unix timestamp")
beamLovesCmd.Flags().StringP("timestamp", "t", "", "only import loves newer then given timestamp")
}