Files
kubevela/pkg/apiserver/common/utils.go
wangyuan249 fa57fcf66e Merge velacp to apiserver branch in oam repo (#2039)
* move velacp into vela core as apiserver

* fix lint

* add license

* fix err lint

* fix err

* rm vela install service

* add makefile
2021-08-12 11:13:41 +08:00

28 lines
851 B
Go

/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package common
import "github.com/oam-dev/kubevela/pkg/apiserver/proto/model"
// Reverse reverse properties in list
func Reverse(arr *[]*model.Properties) {
length := len(*arr)
for i := 0; i < length/2; i++ {
(*arr)[i], (*arr)[length-1-i] = (*arr)[length-1-i], (*arr)[i]
}
}