added in License

This commit is contained in:
2024-11-18 20:53:13 +05:30
parent 9d40c9d7ec
commit a2739dbbcd
38 changed files with 222 additions and 39 deletions

View File

@@ -1,3 +1,7 @@
// Copyright 2024 Patial Tech. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package crypto
import (

View File

@@ -1,3 +1,7 @@
// Copyright 2024 Patial Tech. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package crypto
import "testing"

View File

@@ -1,3 +1,7 @@
// Copyright 2024 Patial Tech. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package logger
import (

View File

@@ -1,5 +1,9 @@
//go:build darwin
// Copyright 2024 Patial Tech. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package open
import (

View File

@@ -1,5 +1,9 @@
//go:build linux
// Copyright 2024 Patial Tech. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package open
import (

View File

@@ -1,3 +1,7 @@
// Copyright 2024 Patial Tech. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package open
// WithDefaultApp open a file, directory, or URI using the OS's default application for that object type.

View File

@@ -1,5 +1,9 @@
//go:build windows
// Copyright 2024 Patial Tech. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package open
import (

View File

@@ -1,3 +1,7 @@
// Copyright 2024 Patial Tech. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package structs
import (

View File

@@ -1,3 +1,7 @@
// Copyright 2024 Patial Tech. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package uid
import "github.com/sqids/sqids-go"

23
util/uid/uuid.go Normal file
View File

@@ -0,0 +1,23 @@
// Copyright 2024 Patial Tech. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package uid
import (
"context"
"fmt"
"time"
"github.com/google/uuid"
"gitserver.in/patialtech/rano/util/logger"
)
func NewUUID() string {
id, err := uuid.NewV7()
if err != nil {
logger.Incident(context.Background(), "New UUID", err.Error())
return fmt.Sprintf("%d", time.Now().UTC().UnixNano())
}
return id.String()
}

View File

@@ -1,3 +1,7 @@
// Copyright 2024 Patial Tech. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package validate
import (